public void SetupUi(QDialog PassphraseDialog)
        {
            if (PassphraseDialog.ObjectName == "")
            PassphraseDialog.ObjectName = "PassphraseDialog";
            QSize Size = new QSize(493, 118);
            Size = Size.ExpandedTo(PassphraseDialog.MinimumSizeHint);
            PassphraseDialog.Size = Size;
            verticalLayout = new QVBoxLayout(PassphraseDialog);
            verticalLayout.ObjectName = "verticalLayout";
            mMessageLabel = new QLabel(PassphraseDialog);
            mMessageLabel.ObjectName = "mMessageLabel";

            verticalLayout.AddWidget(mMessageLabel, 0, Qt.AlignmentFlag.AlignHCenter);

            mPassphraseLineEdit = new QLineEdit(PassphraseDialog);
            mPassphraseLineEdit.ObjectName = "mPassphraseLineEdit";
            mPassphraseLineEdit.echoMode = QLineEdit.EchoMode.Password;

            verticalLayout.AddWidget(mPassphraseLineEdit);

            mButtonBox = new QDialogButtonBox(PassphraseDialog);
            mButtonBox.ObjectName = "mButtonBox";
            mButtonBox.Orientation = Qt.Orientation.Horizontal;
            mButtonBox.StandardButtons = QDialogButtonBox.StandardButton.Cancel | QDialogButtonBox.StandardButton.Ok;

            verticalLayout.AddWidget(mButtonBox);

            RetranslateUi(PassphraseDialog);
            QObject.Connect(mButtonBox, Qt.SIGNAL("accepted()"), PassphraseDialog, Qt.SLOT("accept()"));
            QObject.Connect(mButtonBox, Qt.SIGNAL("rejected()"), PassphraseDialog, Qt.SLOT("reject()"));

            QMetaObject.ConnectSlotsByName(PassphraseDialog);
        }
예제 #2
0
파일: QSizeTests.cs 프로젝트: nanox/QtSharp
        public void TestDivWidthIntegerOperator()
        {
            var size = new QSize(500, 100);
            size /= 5;

            Assert.AreEqual(100, size.Width);
            Assert.AreEqual(20, size.Height);
        }
예제 #3
0
파일: QSizeTests.cs 프로젝트: nanox/QtSharp
        public void TestDivOperator()
        {
            var size = new QSize(500, 100);

            var res = size / 5;

            Assert.AreEqual(100, res.Width);
            Assert.AreEqual(20, res.Height);
        }
예제 #4
0
파일: QSizeTests.cs 프로젝트: nanox/QtSharp
        public void TestAddOperator()
        {
            var size = new QSize(500, 100);
            var size2 = new QSize(500, 100);

            var res = size + size2;

            Assert.AreEqual(1000, res.Width);
            Assert.AreEqual(200, res.Height);
        }
예제 #5
0
    public void SetupUi(QWidget Form)
    {
        if (Form.ObjectName == "")
        Form.ObjectName = "Form";
        QSize Size = new QSize(887, 679);
        Size = Size.ExpandedTo(Form.MinimumSizeHint());
        Form.Size = Size;
        vboxLayout = new QVBoxLayout(Form);
        vboxLayout.ObjectName = "vboxLayout";
        tabWidget = new QTabWidget(Form);
        tabWidget.ObjectName = "tabWidget";
        tab = new QWidget();
        tab.ObjectName = "tab";
        tabWidget.AddTab(tab, QApplication.Translate("Form", "Tab 1", null, QApplication.Encoding.UnicodeUTF8));
        tab_2 = new QWidget();
        tab_2.ObjectName = "tab_2";
        vboxLayout1 = new QVBoxLayout(tab_2);
        vboxLayout1.ObjectName = "vboxLayout1";
        listView = new QListView(tab_2);
        listView.ObjectName = "listView";

        vboxLayout1.AddWidget(listView);

        groupBox = new QGroupBox(tab_2);
        groupBox.ObjectName = "groupBox";
        groupBox.MinimumSize = new QSize(0, 64);
        pushButton = new QPushButton(groupBox);
        pushButton.ObjectName = "pushButton";
        pushButton.Geometry = new QRect(690, 6, 151, 51);
        radioButton = new QRadioButton(groupBox);
        radioButton.ObjectName = "radioButton";
        radioButton.Geometry = new QRect(120, 10, 109, 22);
        radioButton_2 = new QRadioButton(groupBox);
        radioButton_2.ObjectName = "radioButton_2";
        radioButton_2.Geometry = new QRect(120, 40, 109, 22);
        lineEdit = new QLineEdit(groupBox);
        lineEdit.ObjectName = "lineEdit";
        lineEdit.Geometry = new QRect(280, 20, 371, 27);

        vboxLayout1.AddWidget(groupBox);

        tabWidget.AddTab(tab_2, QApplication.Translate("Form", "Join", null, QApplication.Encoding.UnicodeUTF8));
        tab_3 = new QWidget();
        tab_3.ObjectName = "tab_3";
        tabWidget.AddTab(tab_3, QApplication.Translate("Form", "Page", null, QApplication.Encoding.UnicodeUTF8));

        vboxLayout.AddWidget(tabWidget);

        RetranslateUi(Form);

        tabWidget.CurrentIndex = 1;

        QMetaObject.ConnectSlotsByName(Form);
    }
예제 #6
0
파일: QSizeTests.cs 프로젝트: nanox/QtSharp
        public void TestBoundedTo()
        {
            this._qSize.Width = 500;
            this._qSize.Height = 100;

            var other = new QSize();
            other.Width = 400;
            other.Height = 500;

            var res = _qSize.BoundedTo(other);

            Assert.AreEqual(400, res.Width);
            Assert.AreEqual(100, res.Height);
        }
        public void SetupUi(QWidget LifetimeConstraintWidget)
        {
            if (LifetimeConstraintWidget.ObjectName == "")
            LifetimeConstraintWidget.ObjectName = "LifetimeConstraintWidget";
            QSize Size = new QSize(283, 48);
            Size = Size.ExpandedTo(LifetimeConstraintWidget.MinimumSizeHint);
            LifetimeConstraintWidget.Size = Size;
            horizontalLayout = new QHBoxLayout(LifetimeConstraintWidget);
            horizontalLayout.SetContentsMargins(0, 0, 0, 0);
            horizontalLayout.ObjectName = "horizontalLayout";
            horizontalLayout.sizeConstraint = QLayout.SizeConstraint.SetNoConstraint;
            mCheckBox = new QCheckBox(LifetimeConstraintWidget);
            mCheckBox.ObjectName = "mCheckBox";
            QSizePolicy sizePolicy = new QSizePolicy(QSizePolicy.Policy.Fixed, QSizePolicy.Policy.Fixed);
            sizePolicy.SetHorizontalStretch(0);
            sizePolicy.SetVerticalStretch(0);
            sizePolicy.SetHeightForWidth(mCheckBox.SizePolicy.HasHeightForWidth);
            mCheckBox.SizePolicy = sizePolicy;

            horizontalLayout.AddWidget(mCheckBox);

            mLineEdit = new QLineEdit(LifetimeConstraintWidget);
            mLineEdit.ObjectName = "mLineEdit";
            mLineEdit.Enabled = false;
            sizePolicy.SetHeightForWidth(mLineEdit.SizePolicy.HasHeightForWidth);
            mLineEdit.SizePolicy = sizePolicy;
            mLineEdit.MaximumSize = new QSize(40, 16777215);
            mLineEdit.InputMethodHints = Qt.InputMethodHint.ImhPreferNumbers;

            horizontalLayout.AddWidget(mLineEdit);

            mSecondsLable = new QLabel(LifetimeConstraintWidget);
            mSecondsLable.ObjectName = "mSecondsLable";
            mSecondsLable.Enabled = false;

            horizontalLayout.AddWidget(mSecondsLable);

            spacerItem = new QSpacerItem(90, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum);

            horizontalLayout.AddItem(spacerItem);

            RetranslateUi(LifetimeConstraintWidget);
            QObject.Connect(mCheckBox, Qt.SIGNAL("toggled(bool)"), mLineEdit, Qt.SLOT("setEnabled(bool)"));
            QObject.Connect(mCheckBox, Qt.SIGNAL("toggled(bool)"), mSecondsLable, Qt.SLOT("setEnabled(bool)"));
            QObject.Connect(mCheckBox, Qt.SIGNAL("toggled(bool)"), mLineEdit, Qt.SLOT("setFocus()"));

            QMetaObject.ConnectSlotsByName(LifetimeConstraintWidget);
        }
예제 #8
0
    public void SetupUi(QDialog ScanningDialog)
    {
        if (ScanningDialog.ObjectName == "")
        ScanningDialog.ObjectName = "ScanningDialog";
        QSize Size = new QSize(750, 100);
        Size = Size.ExpandedTo(ScanningDialog.MinimumSizeHint());
        ScanningDialog.Size = Size;
        ScanningDialog.MinimumSize = new QSize(750, 100);
        ScanningDialog.MaximumSize = new QSize(750, 100);
        ScanningDialog.WindowIcon = new QIcon(":/main/themonospot_48.png");
        ScanningDialog.Modal = true;
        vboxLayout = new QVBoxLayout(ScanningDialog);
        vboxLayout.ObjectName = "vboxLayout";
        lblOperation = new QLabel(ScanningDialog);
        lblOperation.ObjectName = "lblOperation";
        lblOperation.Alignment = Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignCenter");
        lblOperation.Margin = 1;

        vboxLayout.AddWidget(lblOperation);

        lblFileName = new QLabel(ScanningDialog);
        lblFileName.ObjectName = "lblFileName";
        lblFileName.Alignment = Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignCenter");
        lblFileName.WordWrap = true;
        lblFileName.Margin = 1;

        vboxLayout.AddWidget(lblFileName);

        buttonBox = new QDialogButtonBox(ScanningDialog);
        buttonBox.ObjectName = "buttonBox";
        buttonBox.Orientation = Qt.Orientation.Horizontal;
        buttonBox.StandardButtons = Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Cancel");
        buttonBox.CenterButtons = true;

        vboxLayout.AddWidget(buttonBox);

        RetranslateUi(ScanningDialog);

        QMetaObject.ConnectSlotsByName(ScanningDialog);
    }
예제 #9
0
파일: QSizeTests.cs 프로젝트: nanox/QtSharp
        public void TestIntConstructor()
        {
            var s = new QSize(100, 200);

            Assert.AreEqual(200, s.Height);
            Assert.AreEqual(100, s.Width);
        }
예제 #10
0
파일: QSizeTests.cs 프로젝트: nanox/QtSharp
        public void TestSubOperator()
        {
            var size = new QSize(500, 100);
            var size2 = new QSize(500, 100);

            var res = size - size2;

            Assert.AreEqual(0, res.Width);
            Assert.AreEqual(0, res.Height);
        }
예제 #11
0
    public void SetupUi(QMainWindow MainWindow)
    {
        if (MainWindow.ObjectName == "")
        {
            MainWindow.ObjectName = "MainWindow";
        }
        QSize Size = new QSize(631, 570);

        Size                             = Size.ExpandedTo(MainWindow.MinimumSizeHint());
        MainWindow.Size                  = Size;
        MainWindow.MinimumSize           = new QSize(600, 550);
        MainWindow.WindowIcon            = new QIcon(":/main/resources/Images/comex_256.png");
        action_Open                      = new QAction(MainWindow);
        action_Open.ObjectName           = "action_Open";
        action_Open.icon                 = new QIcon(":/main/resources/Images/document-open.png");
        action_Close                     = new QAction(MainWindow);
        action_Close.ObjectName          = "action_Close";
        action_Close.Enabled             = false;
        action_Close.icon                = new QIcon(":/main/resources/Images/document-close.png");
        action_Exit                      = new QAction(MainWindow);
        action_Exit.ObjectName           = "action_Exit";
        action_Exit.icon                 = new QIcon(":/main/resources/Images/application-exit.png");
        action_Info                      = new QAction(MainWindow);
        action_Info.ObjectName           = "action_Info";
        action_Info.icon                 = new QIcon(":/main/resources/Images/dialog-information.png");
        action_ATR                       = new QAction(MainWindow);
        action_ATR.ObjectName            = "action_ATR";
        action_ATR.icon                  = new QIcon(":/main/resources/Images/quickopen.png");
        action_Exec_Command              = new QAction(MainWindow);
        action_Exec_Command.ObjectName   = "action_Exec_Command";
        action_SerialSettings            = new QAction(MainWindow);
        action_SerialSettings.ObjectName = "action_SerialSettings";
        action_SerialSettings.icon       = new QIcon(":/main/resources/Images/configure.png");
        centralwidget                    = new QWidget(MainWindow);
        centralwidget.ObjectName         = "centralwidget";
        gridLayout                       = new QGridLayout(centralwidget);
        gridLayout.ObjectName            = "gridLayout";
        FrameATR                         = new QGroupBox(centralwidget);
        FrameATR.ObjectName              = "FrameATR";
        QSizePolicy sizePolicy = new QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Fixed);

        sizePolicy.SetHorizontalStretch(0);
        sizePolicy.SetVerticalStretch(0);
        sizePolicy.SetHeightForWidth(FrameATR.SizePolicy.HasHeightForWidth());
        FrameATR.SizePolicy    = sizePolicy;
        gridLayout1            = new QGridLayout(FrameATR);
        gridLayout1.ObjectName = "gridLayout1";
        TxtATR            = new QLineEdit(FrameATR);
        TxtATR.ObjectName = "TxtATR";
        TxtATR.StyleSheet = "color: rgb(30, 109, 30);";
        TxtATR.ReadOnly   = true;

        gridLayout1.AddWidget(TxtATR, 0, 0, 1, 1);


        gridLayout.AddWidget(FrameATR, 0, 0, 1, 1);

        FrameFile                = new QGroupBox(centralwidget);
        FrameFile.ObjectName     = "FrameFile";
        gridLayout2              = new QGridLayout(FrameFile);
        gridLayout2.ObjectName   = "gridLayout2";
        LstCommands              = new QListWidget(FrameFile);
        LstCommands.ObjectName   = "LstCommands";
        LstCommands.EditTriggers = Qyoto.Qyoto.GetCPPEnumValue("QAbstractItemView", "NoEditTriggers");

        gridLayout2.AddWidget(LstCommands, 0, 0, 1, 1);


        gridLayout.AddWidget(FrameFile, 1, 0, 1, 1);

        FrameExchange            = new QGroupBox(centralwidget);
        FrameExchange.ObjectName = "FrameExchange";
        sizePolicy.SetHeightForWidth(FrameExchange.SizePolicy.HasHeightForWidth());
        FrameExchange.SizePolicy = sizePolicy;
        gridLayout3            = new QGridLayout(FrameExchange);
        gridLayout3.ObjectName = "gridLayout3";
        LblCommand             = new QLabel(FrameExchange);
        LblCommand.ObjectName  = "LblCommand";

        gridLayout3.AddWidget(LblCommand, 0, 0, 1, 1);

        TxtCmd            = new QLineEdit(FrameExchange);
        TxtCmd.ObjectName = "TxtCmd";
        TxtCmd.StyleSheet = "color: rgb(30, 109, 30);";

        gridLayout3.AddWidget(TxtCmd, 0, 1, 1, 1);

        BtnSend            = new QPushButton(FrameExchange);
        BtnSend.ObjectName = "BtnSend";
        BtnSend.icon       = new QIcon(":/main/resources/Images/arrow-right.png");

        gridLayout3.AddWidget(BtnSend, 0, 2, 1, 1);

        LblResponse            = new QLabel(FrameExchange);
        LblResponse.ObjectName = "LblResponse";

        gridLayout3.AddWidget(LblResponse, 1, 0, 1, 1);

        TxtResp            = new QLineEdit(FrameExchange);
        TxtResp.ObjectName = "TxtResp";
        TxtResp.StyleSheet = "color: rgb(0, 0, 255);";
        TxtResp.ReadOnly   = true;

        gridLayout3.AddWidget(TxtResp, 1, 1, 1, 1);


        gridLayout.AddWidget(FrameExchange, 2, 0, 1, 1);

        MainWindow.SetCentralWidget(centralwidget);
        menubar                = new QMenuBar(MainWindow);
        menubar.ObjectName     = "menubar";
        menubar.Geometry       = new QRect(0, 0, 631, 24);
        menu_File              = new QMenu(menubar);
        menu_File.ObjectName   = "menu_File";
        menu_Reader            = new QMenu(menubar);
        menu_Reader.ObjectName = "menu_Reader";
        menu_About             = new QMenu(menubar);
        menu_About.ObjectName  = "menu_About";
        MainWindow.SetMenuBar(menubar);
        statusbar            = new QStatusBar(MainWindow);
        statusbar.ObjectName = "statusbar";
        MainWindow.SetStatusBar(statusbar);
        toolBar                 = new QToolBar(MainWindow);
        toolBar.ObjectName      = "toolBar";
        toolBar.Movable         = false;
        toolBar.ToolButtonStyle = Qt.ToolButtonStyle.ToolButtonTextBesideIcon;
        toolBar.Floatable       = false;
        MainWindow.AddToolBar(Qt.ToolBarArea.TopToolBarArea, toolBar);

        menubar.AddAction(menu_File.MenuAction());
        menubar.AddAction(menu_Reader.MenuAction());
        menubar.AddAction(menu_About.MenuAction());
        menu_File.AddAction(action_Open);
        menu_File.AddAction(action_Close);
        menu_File.AddSeparator();
        menu_File.AddAction(action_SerialSettings);
        menu_File.AddSeparator();
        menu_File.AddAction(action_Exit);
        menu_About.AddAction(action_Info);
        toolBar.AddAction(action_Open);
        toolBar.AddAction(action_Close);
        toolBar.AddAction(action_SerialSettings);
        toolBar.AddAction(action_ATR);
        toolBar.AddAction(action_Info);
        toolBar.AddSeparator();
        toolBar.AddAction(action_Exit);

        RetranslateUi(MainWindow);

        QMetaObject.ConnectSlotsByName(MainWindow);
    } // SetupUi
예제 #12
0
    public void SetupUi(QDialog ChangePinStatusDialog)
    {
        if (ChangePinStatusDialog.ObjectName == "")
        {
            ChangePinStatusDialog.ObjectName = "ChangePinStatusDialog";
        }
        QSize Size = new QSize(357, 159);

        Size = Size.ExpandedTo(ChangePinStatusDialog.MinimumSizeHint());
        ChangePinStatusDialog.Size       = Size;
        ChangePinStatusDialog.WindowIcon = new QIcon(":/main/resources/monosim_128.png");
        gridLayout            = new QGridLayout(ChangePinStatusDialog);
        gridLayout.ObjectName = "gridLayout";
        LblTitle            = new QLabel(ChangePinStatusDialog);
        LblTitle.ObjectName = "LblTitle";
        LblTitle.Alignment  = Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignCenter");
        LblTitle.WordWrap   = true;

        gridLayout.AddWidget(LblTitle, 0, 0, 1, 2);

        LblPin1            = new QLabel(ChangePinStatusDialog);
        LblPin1.ObjectName = "LblPin1";

        gridLayout.AddWidget(LblPin1, 2, 0, 1, 1);

        TxtPin1            = new QLineEdit(ChangePinStatusDialog);
        TxtPin1.ObjectName = "TxtPin1";
        TxtPin1.MaxLength  = 4;
        TxtPin1.echoMode   = QLineEdit.EchoMode.Password;

        gridLayout.AddWidget(TxtPin1, 2, 1, 1, 1);

        LblPin1check            = new QLabel(ChangePinStatusDialog);
        LblPin1check.ObjectName = "LblPin1check";

        gridLayout.AddWidget(LblPin1check, 3, 0, 1, 1);

        TxtPin1check            = new QLineEdit(ChangePinStatusDialog);
        TxtPin1check.ObjectName = "TxtPin1check";
        TxtPin1check.MaxLength  = 4;
        TxtPin1check.echoMode   = QLineEdit.EchoMode.Password;

        gridLayout.AddWidget(TxtPin1check, 3, 1, 1, 1);

        spacerItem = new QSpacerItem(282, 37, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding);

        gridLayout.AddItem(spacerItem, 4, 1, 1, 1);

        Buttons                 = new QDialogButtonBox(ChangePinStatusDialog);
        Buttons.ObjectName      = "Buttons";
        Buttons.Orientation     = Qt.Orientation.Horizontal;
        Buttons.StandardButtons = Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Cancel") | Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Ok");

        gridLayout.AddWidget(Buttons, 5, 0, 1, 2);

        spacerItem1 = new QSpacerItem(20, 8, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Fixed);

        gridLayout.AddItem(spacerItem1, 1, 0, 1, 1);


        RetranslateUi(ChangePinStatusDialog);
        QObject.Connect(Buttons, Qt.SIGNAL("accepted()"), ChangePinStatusDialog, Qt.SLOT("accept()"));
        QObject.Connect(Buttons,Qt.SIGNAL("rejected()"),ChangePinStatusDialog,Qt.SLOT("reject()"));

        QMetaObject.ConnectSlotsByName(ChangePinStatusDialog);
    } // SetupUi
예제 #13
0
파일: QRectTests.cs 프로젝트: nanox/QtSharp
        public void TestPointSizeConstructor()
        {
            var p1 = new QPoint(50, 100);
            var p2 = new QSize(200, 150);

            var s = new QRect(p1, p2);

            Assert.AreEqual(50, s.Left);
            Assert.AreEqual(100, s.Top);
            Assert.AreEqual(200, s.Width);
            Assert.AreEqual(150, s.Height);
        }
예제 #14
0
파일: QSizeTests.cs 프로젝트: nanox/QtSharp
 public void TestEmpyConstructor()
 {
     var s = new QSize();
 }
예제 #15
0
    public void SetupUi(QDialog AboutDialog)
    {
        if (AboutDialog.ObjectName == "")
        AboutDialog.ObjectName = "AboutDialog";
        QSize Size = new QSize(660, 460);
        Size = Size.ExpandedTo(AboutDialog.MinimumSizeHint());
        AboutDialog.Size = Size;
        AboutDialog.MinimumSize = new QSize(660, 460);
        AboutDialog.WindowIcon = new QIcon(":/main/resources/Images/comex_256.png");
        AboutDialog.Modal = true;
        gridLayout = new QGridLayout(AboutDialog);
        gridLayout.ObjectName = "gridLayout";
        vboxLayout = new QVBoxLayout();
        vboxLayout.ObjectName = "vboxLayout";
        FrameTop = new QFrame(AboutDialog);
        FrameTop.ObjectName = "FrameTop";
        FrameTop.MinimumSize = new QSize(0, 64);
        FrameTop.AutoFillBackground = false;
        FrameTop.FrameShape = QFrame.Shape.StyledPanel;
        FrameTop.FrameShadow = QFrame.Shadow.Raised;
        gridLayout1 = new QGridLayout(FrameTop);
        gridLayout1.ObjectName = "gridLayout1";
        Logo = new QWidget(FrameTop);
        Logo.ObjectName = "Logo";
        Logo.MinimumSize = new QSize(48, 48);
        Logo.MaximumSize = new QSize(48, 48);
        Logo.StyleSheet = "background-image: url(:/main/resources/Images/comex_48.png);";

        gridLayout1.AddWidget(Logo, 0, 0, 1, 1);

        vboxLayout1 = new QVBoxLayout();
        vboxLayout1.ObjectName = "vboxLayout1";
        LblName = new QLabel(FrameTop);
        LblName.ObjectName = "LblName";
        QFont font = new QFont();
        font.SetBold(true);
        font.SetWeight(75);
        LblName.Font = font;
        LblName.Margin = 1;

        vboxLayout1.AddWidget(LblName);

        LblDesc = new QLabel(FrameTop);
        LblDesc.ObjectName = "LblDesc";
        LblDesc.Margin = 1;

        vboxLayout1.AddWidget(LblDesc);

        gridLayout1.AddLayout(vboxLayout1, 0, 1, 1, 1);

        vboxLayout.AddWidget(FrameTop);

        tabInfo = new QTabWidget(AboutDialog);
        tabInfo.ObjectName = "tabInfo";
        tabInfo.AutoFillBackground = false;
        Informations = new QWidget();
        Informations.ObjectName = "Informations";
        gridLayout2 = new QGridLayout(Informations);
        gridLayout2.ObjectName = "gridLayout2";
        TxtInfo = new QTextEdit(Informations);
        TxtInfo.ObjectName = "TxtInfo";
        TxtInfo.lineWrapMode = QTextEdit.LineWrapMode.NoWrap;
        TxtInfo.ReadOnly = true;

        gridLayout2.AddWidget(TxtInfo, 0, 0, 1, 1);

        tabInfo.AddTab(Informations, QApplication.Translate("AboutDialog", "Informazioni su", null, QApplication.Encoding.UnicodeUTF8));
        Components = new QWidget();
        Components.ObjectName = "Components";
        gridLayout3 = new QGridLayout(Components);
        gridLayout3.ObjectName = "gridLayout3";
        TxtThanks = new QTextEdit(Components);
        TxtThanks.ObjectName = "TxtThanks";
        TxtThanks.ReadOnly = true;

        gridLayout3.AddWidget(TxtThanks, 0, 0, 1, 1);

        tabInfo.AddTab(Components, QApplication.Translate("AboutDialog", "Componenti", null, QApplication.Encoding.UnicodeUTF8));

        vboxLayout.AddWidget(tabInfo);

        buttonBox = new QDialogButtonBox(AboutDialog);
        buttonBox.ObjectName = "buttonBox";
        buttonBox.StandardButtons = Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Ok");

        vboxLayout.AddWidget(buttonBox);

        gridLayout.AddLayout(vboxLayout, 0, 0, 1, 1);

        RetranslateUi(AboutDialog);

        tabInfo.CurrentIndex = 0;

        QMetaObject.ConnectSlotsByName(AboutDialog);
    }
예제 #16
0
    public void SetupUi(QDialog SettingsDialog)
    {
        if (SettingsDialog.ObjectName == "")
        {
            SettingsDialog.ObjectName = "SettingsDialog";
        }
        QSize Size = new QSize(320, 280);

        Size = Size.ExpandedTo(SettingsDialog.MinimumSizeHint());
        SettingsDialog.Size        = Size;
        SettingsDialog.MinimumSize = new QSize(320, 280);
        SettingsDialog.Modal       = true;
        gridLayout                   = new QGridLayout(SettingsDialog);
        gridLayout.ObjectName        = "gridLayout";
        FrameSettings                = new QGroupBox(SettingsDialog);
        FrameSettings.ObjectName     = "FrameSettings";
        gridLayout1                  = new QGridLayout(FrameSettings);
        gridLayout1.ObjectName       = "gridLayout1";
        LblPortSpeedReset            = new QLabel(FrameSettings);
        LblPortSpeedReset.ObjectName = "LblPortSpeedReset";
        QSizePolicy sizePolicy = new QSizePolicy(QSizePolicy.Policy.Fixed, QSizePolicy.Policy.Preferred);

        sizePolicy.SetHorizontalStretch(0);
        sizePolicy.SetVerticalStretch(0);
        sizePolicy.SetHeightForWidth(LblPortSpeedReset.SizePolicy.HasHeightForWidth());
        LblPortSpeedReset.SizePolicy = sizePolicy;

        gridLayout1.AddWidget(LblPortSpeedReset, 0, 0, 1, 1);

        CmbPortSpeedReset            = new QComboBox(FrameSettings);
        CmbPortSpeedReset.ObjectName = "CmbPortSpeedReset";

        gridLayout1.AddWidget(CmbPortSpeedReset, 0, 1, 1, 1);

        LblPortSpeed            = new QLabel(FrameSettings);
        LblPortSpeed.ObjectName = "LblPortSpeed";
        sizePolicy.SetHeightForWidth(LblPortSpeed.SizePolicy.HasHeightForWidth());
        LblPortSpeed.SizePolicy = sizePolicy;

        gridLayout1.AddWidget(LblPortSpeed, 1, 0, 1, 1);

        CmbPortSpeed            = new QComboBox(FrameSettings);
        CmbPortSpeed.ObjectName = "CmbPortSpeed";

        gridLayout1.AddWidget(CmbPortSpeed, 1, 1, 1, 1);

        LblDataBits            = new QLabel(FrameSettings);
        LblDataBits.ObjectName = "LblDataBits";
        sizePolicy.SetHeightForWidth(LblDataBits.SizePolicy.HasHeightForWidth());
        LblDataBits.SizePolicy = sizePolicy;

        gridLayout1.AddWidget(LblDataBits, 2, 0, 1, 1);

        CmbDataBits            = new QComboBox(FrameSettings);
        CmbDataBits.ObjectName = "CmbDataBits";

        gridLayout1.AddWidget(CmbDataBits, 2, 1, 1, 1);

        LblStopBits            = new QLabel(FrameSettings);
        LblStopBits.ObjectName = "LblStopBits";
        sizePolicy.SetHeightForWidth(LblStopBits.SizePolicy.HasHeightForWidth());
        LblStopBits.SizePolicy = sizePolicy;

        gridLayout1.AddWidget(LblStopBits, 3, 0, 1, 1);

        CmbStopBits            = new QComboBox(FrameSettings);
        CmbStopBits.ObjectName = "CmbStopBits";

        gridLayout1.AddWidget(CmbStopBits, 3, 1, 1, 1);

        LblParity            = new QLabel(FrameSettings);
        LblParity.ObjectName = "LblParity";
        sizePolicy.SetHeightForWidth(LblParity.SizePolicy.HasHeightForWidth());
        LblParity.SizePolicy = sizePolicy;

        gridLayout1.AddWidget(LblParity, 4, 0, 1, 1);

        CmbParity            = new QComboBox(FrameSettings);
        CmbParity.ObjectName = "CmbParity";

        gridLayout1.AddWidget(CmbParity, 4, 1, 1, 1);

        LblConvention            = new QLabel(FrameSettings);
        LblConvention.ObjectName = "LblConvention";
        sizePolicy.SetHeightForWidth(LblConvention.SizePolicy.HasHeightForWidth());
        LblConvention.SizePolicy = sizePolicy;

        gridLayout1.AddWidget(LblConvention, 5, 0, 1, 1);

        CmbConvention            = new QComboBox(FrameSettings);
        CmbConvention.ObjectName = "CmbConvention";

        gridLayout1.AddWidget(CmbConvention, 5, 1, 1, 1);


        gridLayout.AddWidget(FrameSettings, 1, 0, 1, 1);

        Buttons                 = new QDialogButtonBox(SettingsDialog);
        Buttons.ObjectName      = "Buttons";
        Buttons.Orientation     = Qt.Orientation.Horizontal;
        Buttons.StandardButtons = Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Cancel") | Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Ok");

        gridLayout.AddWidget(Buttons, 2, 0, 1, 1);


        RetranslateUi(SettingsDialog);

        QMetaObject.ConnectSlotsByName(SettingsDialog);
    } // SetupUi
예제 #17
0
    public void SetupUi(QDialog AboutDialog)
    {
        if (AboutDialog.ObjectName == "")
        {
            AboutDialog.ObjectName = "AboutDialog";
        }
        QSize Size = new QSize(660, 460);

        Size                        = Size.ExpandedTo(AboutDialog.MinimumSizeHint());
        AboutDialog.Size            = Size;
        AboutDialog.MinimumSize     = new QSize(660, 460);
        AboutDialog.WindowIcon      = new QIcon(":/main/resources/Images/comex_256.png");
        AboutDialog.Modal           = true;
        gridLayout                  = new QGridLayout(AboutDialog);
        gridLayout.ObjectName       = "gridLayout";
        vboxLayout                  = new QVBoxLayout();
        vboxLayout.ObjectName       = "vboxLayout";
        FrameTop                    = new QFrame(AboutDialog);
        FrameTop.ObjectName         = "FrameTop";
        FrameTop.MinimumSize        = new QSize(0, 64);
        FrameTop.AutoFillBackground = false;
        FrameTop.FrameShape         = QFrame.Shape.StyledPanel;
        FrameTop.FrameShadow        = QFrame.Shadow.Raised;
        gridLayout1                 = new QGridLayout(FrameTop);
        gridLayout1.ObjectName      = "gridLayout1";
        Logo                        = new QWidget(FrameTop);
        Logo.ObjectName             = "Logo";
        Logo.MinimumSize            = new QSize(48, 48);
        Logo.MaximumSize            = new QSize(48, 48);
        Logo.StyleSheet             = "background-image: url(:/main/resources/Images/comex_48.png);";

        gridLayout1.AddWidget(Logo, 0, 0, 1, 1);

        vboxLayout1            = new QVBoxLayout();
        vboxLayout1.ObjectName = "vboxLayout1";
        LblName            = new QLabel(FrameTop);
        LblName.ObjectName = "LblName";
        QFont font = new QFont();

        font.SetBold(true);
        font.SetWeight(75);
        LblName.Font   = font;
        LblName.Margin = 1;

        vboxLayout1.AddWidget(LblName);

        LblDesc            = new QLabel(FrameTop);
        LblDesc.ObjectName = "LblDesc";
        LblDesc.Margin     = 1;

        vboxLayout1.AddWidget(LblDesc);


        gridLayout1.AddLayout(vboxLayout1, 0, 1, 1, 1);


        vboxLayout.AddWidget(FrameTop);

        tabInfo                    = new QTabWidget(AboutDialog);
        tabInfo.ObjectName         = "tabInfo";
        tabInfo.AutoFillBackground = false;
        Informations               = new QWidget();
        Informations.ObjectName    = "Informations";
        gridLayout2                = new QGridLayout(Informations);
        gridLayout2.ObjectName     = "gridLayout2";
        TxtInfo                    = new QTextEdit(Informations);
        TxtInfo.ObjectName         = "TxtInfo";
        TxtInfo.lineWrapMode       = QTextEdit.LineWrapMode.NoWrap;
        TxtInfo.ReadOnly           = true;

        gridLayout2.AddWidget(TxtInfo, 0, 0, 1, 1);

        tabInfo.AddTab(Informations, QApplication.Translate("AboutDialog", "Informazioni su", null, QApplication.Encoding.UnicodeUTF8));
        Components             = new QWidget();
        Components.ObjectName  = "Components";
        gridLayout3            = new QGridLayout(Components);
        gridLayout3.ObjectName = "gridLayout3";
        TxtThanks            = new QTextEdit(Components);
        TxtThanks.ObjectName = "TxtThanks";
        TxtThanks.ReadOnly   = true;

        gridLayout3.AddWidget(TxtThanks, 0, 0, 1, 1);

        tabInfo.AddTab(Components, QApplication.Translate("AboutDialog", "Componenti", null, QApplication.Encoding.UnicodeUTF8));

        vboxLayout.AddWidget(tabInfo);

        buttonBox                 = new QDialogButtonBox(AboutDialog);
        buttonBox.ObjectName      = "buttonBox";
        buttonBox.StandardButtons = Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Ok");

        vboxLayout.AddWidget(buttonBox);


        gridLayout.AddLayout(vboxLayout, 0, 0, 1, 1);


        RetranslateUi(AboutDialog);

        tabInfo.CurrentIndex = 0;


        QMetaObject.ConnectSlotsByName(AboutDialog);
    } // SetupUi
예제 #18
0
파일: QSizeTests.cs 프로젝트: nanox/QtSharp
        public void TestMultOperator()
        {
            var size = new QSize(500, 100);

            var res = size * 50;

            Assert.AreEqual(500 * 50, res.Width);
            Assert.AreEqual(50 * 100, res.Height);
        }
예제 #19
0
파일: QSizeTests.cs 프로젝트: nanox/QtSharp
        public void TestMultWidthIntegerOperator()
        {
            var size = new QSize(500, 100);
            size *= 5;

            Assert.AreEqual(2500, size.Width);
            Assert.AreEqual(500, size.Height);
        }
예제 #20
0
파일: QSizeTests.cs 프로젝트: nanox/QtSharp
        public void TestEqualOperator()
        {
            var size = new QSize(500, 100);
            var size2 = new QSize(500, 100);

            Assert.AreEqual(size, size2);
        }
예제 #21
0
파일: QSizeTests.cs 프로젝트: nanox/QtSharp
        public void TestScaledWithInteger()
        {
            var s1 = new QSize(10, 12);
            var res1 = s1.Scaled(60, 60, AspectRatioMode.IgnoreAspectRatio);
            Assert.AreEqual(60, res1.Width);
            Assert.AreEqual(60, res1.Height);

            var s2 = new QSize(10, 12);
            var res2 = s2.Scaled(60, 60, AspectRatioMode.KeepAspectRatio);
            Assert.AreEqual(50, res2.Width);
            Assert.AreEqual(60, res2.Height);

            var s3 = new QSize(10, 12);
            var res3 = s3.Scaled(60, 60, AspectRatioMode.KeepAspectRatioByExpanding);
            Assert.AreEqual(60, res3.Width);
            Assert.AreEqual(72, res3.Height);
        }
예제 #22
0
    public void SetupUi(QMainWindow MainWindow)
    {
        if (MainWindow.ObjectName == "")
        MainWindow.ObjectName = "MainWindow";
        QSize Size = new QSize(631, 570);
        Size = Size.ExpandedTo(MainWindow.MinimumSizeHint());
        MainWindow.Size = Size;
        MainWindow.MinimumSize = new QSize(600, 550);
        MainWindow.WindowIcon = new QIcon(":/main/resources/Images/comex_256.png");
        action_Open = new QAction(MainWindow);
        action_Open.ObjectName = "action_Open";
        action_Open.icon = new QIcon(":/main/resources/Images/document-open.png");
        action_Close = new QAction(MainWindow);
        action_Close.ObjectName = "action_Close";
        action_Close.Enabled = false;
        action_Close.icon = new QIcon(":/main/resources/Images/document-close.png");
        action_Exit = new QAction(MainWindow);
        action_Exit.ObjectName = "action_Exit";
        action_Exit.icon = new QIcon(":/main/resources/Images/application-exit.png");
        action_Info = new QAction(MainWindow);
        action_Info.ObjectName = "action_Info";
        action_Info.icon = new QIcon(":/main/resources/Images/dialog-information.png");
        action_ATR = new QAction(MainWindow);
        action_ATR.ObjectName = "action_ATR";
        action_ATR.icon = new QIcon(":/main/resources/Images/quickopen.png");
        action_Exec_Command = new QAction(MainWindow);
        action_Exec_Command.ObjectName = "action_Exec_Command";
        action_SerialSettings = new QAction(MainWindow);
        action_SerialSettings.ObjectName = "action_SerialSettings";
        action_SerialSettings.icon = new QIcon(":/main/resources/Images/configure.png");
        centralwidget = new QWidget(MainWindow);
        centralwidget.ObjectName = "centralwidget";
        gridLayout = new QGridLayout(centralwidget);
        gridLayout.ObjectName = "gridLayout";
        FrameATR = new QGroupBox(centralwidget);
        FrameATR.ObjectName = "FrameATR";
        QSizePolicy sizePolicy = new QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Fixed);
        sizePolicy.SetHorizontalStretch(0);
        sizePolicy.SetVerticalStretch(0);
        sizePolicy.SetHeightForWidth(FrameATR.SizePolicy.HasHeightForWidth());
        FrameATR.SizePolicy = sizePolicy;
        gridLayout1 = new QGridLayout(FrameATR);
        gridLayout1.ObjectName = "gridLayout1";
        TxtATR = new QLineEdit(FrameATR);
        TxtATR.ObjectName = "TxtATR";
        TxtATR.StyleSheet = "color: rgb(30, 109, 30);";
        TxtATR.ReadOnly = true;

        gridLayout1.AddWidget(TxtATR, 0, 0, 1, 1);

        gridLayout.AddWidget(FrameATR, 0, 0, 1, 1);

        FrameFile = new QGroupBox(centralwidget);
        FrameFile.ObjectName = "FrameFile";
        gridLayout2 = new QGridLayout(FrameFile);
        gridLayout2.ObjectName = "gridLayout2";
        LstCommands = new QListWidget(FrameFile);
        LstCommands.ObjectName = "LstCommands";
        LstCommands.EditTriggers = Qyoto.Qyoto.GetCPPEnumValue("QAbstractItemView", "NoEditTriggers");

        gridLayout2.AddWidget(LstCommands, 0, 0, 1, 1);

        gridLayout.AddWidget(FrameFile, 1, 0, 1, 1);

        FrameExchange = new QGroupBox(centralwidget);
        FrameExchange.ObjectName = "FrameExchange";
        sizePolicy.SetHeightForWidth(FrameExchange.SizePolicy.HasHeightForWidth());
        FrameExchange.SizePolicy = sizePolicy;
        gridLayout3 = new QGridLayout(FrameExchange);
        gridLayout3.ObjectName = "gridLayout3";
        LblCommand = new QLabel(FrameExchange);
        LblCommand.ObjectName = "LblCommand";

        gridLayout3.AddWidget(LblCommand, 0, 0, 1, 1);

        TxtCmd = new QLineEdit(FrameExchange);
        TxtCmd.ObjectName = "TxtCmd";
        TxtCmd.StyleSheet = "color: rgb(30, 109, 30);";

        gridLayout3.AddWidget(TxtCmd, 0, 1, 1, 1);

        BtnSend = new QPushButton(FrameExchange);
        BtnSend.ObjectName = "BtnSend";
        BtnSend.icon = new QIcon(":/main/resources/Images/arrow-right.png");

        gridLayout3.AddWidget(BtnSend, 0, 2, 1, 1);

        LblResponse = new QLabel(FrameExchange);
        LblResponse.ObjectName = "LblResponse";

        gridLayout3.AddWidget(LblResponse, 1, 0, 1, 1);

        TxtResp = new QLineEdit(FrameExchange);
        TxtResp.ObjectName = "TxtResp";
        TxtResp.StyleSheet = "color: rgb(0, 0, 255);";
        TxtResp.ReadOnly = true;

        gridLayout3.AddWidget(TxtResp, 1, 1, 1, 1);

        gridLayout.AddWidget(FrameExchange, 2, 0, 1, 1);

        MainWindow.SetCentralWidget(centralwidget);
        menubar = new QMenuBar(MainWindow);
        menubar.ObjectName = "menubar";
        menubar.Geometry = new QRect(0, 0, 631, 24);
        menu_File = new QMenu(menubar);
        menu_File.ObjectName = "menu_File";
        menu_Reader = new QMenu(menubar);
        menu_Reader.ObjectName = "menu_Reader";
        menu_About = new QMenu(menubar);
        menu_About.ObjectName = "menu_About";
        MainWindow.SetMenuBar(menubar);
        statusbar = new QStatusBar(MainWindow);
        statusbar.ObjectName = "statusbar";
        MainWindow.SetStatusBar(statusbar);
        toolBar = new QToolBar(MainWindow);
        toolBar.ObjectName = "toolBar";
        toolBar.Movable = false;
        toolBar.ToolButtonStyle = Qt.ToolButtonStyle.ToolButtonTextBesideIcon;
        toolBar.Floatable = false;
        MainWindow.AddToolBar(Qt.ToolBarArea.TopToolBarArea, toolBar);

        menubar.AddAction(menu_File.MenuAction());
        menubar.AddAction(menu_Reader.MenuAction());
        menubar.AddAction(menu_About.MenuAction());
        menu_File.AddAction(action_Open);
        menu_File.AddAction(action_Close);
        menu_File.AddSeparator();
        menu_File.AddAction(action_SerialSettings);
        menu_File.AddSeparator();
        menu_File.AddAction(action_Exit);
        menu_About.AddAction(action_Info);
        toolBar.AddAction(action_Open);
        toolBar.AddAction(action_Close);
        toolBar.AddAction(action_SerialSettings);
        toolBar.AddAction(action_ATR);
        toolBar.AddAction(action_Info);
        toolBar.AddSeparator();
        toolBar.AddAction(action_Exit);

        RetranslateUi(MainWindow);

        QMetaObject.ConnectSlotsByName(MainWindow);
    }
예제 #23
0
파일: QSizeTests.cs 프로젝트: nanox/QtSharp
 public void Init()
 {
     // TODO: Add Init code.
     _qSize = new QSize(500, 100);
 }
예제 #24
0
    public void SetupUi(QDialog SettingsDialog)
    {
        if (SettingsDialog.ObjectName == "")
        SettingsDialog.ObjectName = "SettingsDialog";
        QSize Size = new QSize(320, 280);
        Size = Size.ExpandedTo(SettingsDialog.MinimumSizeHint());
        SettingsDialog.Size = Size;
        SettingsDialog.MinimumSize = new QSize(320, 280);
        SettingsDialog.Modal = true;
        gridLayout = new QGridLayout(SettingsDialog);
        gridLayout.ObjectName = "gridLayout";
        FrameSettings = new QGroupBox(SettingsDialog);
        FrameSettings.ObjectName = "FrameSettings";
        gridLayout1 = new QGridLayout(FrameSettings);
        gridLayout1.ObjectName = "gridLayout1";
        LblPortSpeedReset = new QLabel(FrameSettings);
        LblPortSpeedReset.ObjectName = "LblPortSpeedReset";
        QSizePolicy sizePolicy = new QSizePolicy(QSizePolicy.Policy.Fixed, QSizePolicy.Policy.Preferred);
        sizePolicy.SetHorizontalStretch(0);
        sizePolicy.SetVerticalStretch(0);
        sizePolicy.SetHeightForWidth(LblPortSpeedReset.SizePolicy.HasHeightForWidth());
        LblPortSpeedReset.SizePolicy = sizePolicy;

        gridLayout1.AddWidget(LblPortSpeedReset, 0, 0, 1, 1);

        CmbPortSpeedReset = new QComboBox(FrameSettings);
        CmbPortSpeedReset.ObjectName = "CmbPortSpeedReset";

        gridLayout1.AddWidget(CmbPortSpeedReset, 0, 1, 1, 1);

        LblPortSpeed = new QLabel(FrameSettings);
        LblPortSpeed.ObjectName = "LblPortSpeed";
        sizePolicy.SetHeightForWidth(LblPortSpeed.SizePolicy.HasHeightForWidth());
        LblPortSpeed.SizePolicy = sizePolicy;

        gridLayout1.AddWidget(LblPortSpeed, 1, 0, 1, 1);

        CmbPortSpeed = new QComboBox(FrameSettings);
        CmbPortSpeed.ObjectName = "CmbPortSpeed";

        gridLayout1.AddWidget(CmbPortSpeed, 1, 1, 1, 1);

        LblDataBits = new QLabel(FrameSettings);
        LblDataBits.ObjectName = "LblDataBits";
        sizePolicy.SetHeightForWidth(LblDataBits.SizePolicy.HasHeightForWidth());
        LblDataBits.SizePolicy = sizePolicy;

        gridLayout1.AddWidget(LblDataBits, 2, 0, 1, 1);

        CmbDataBits = new QComboBox(FrameSettings);
        CmbDataBits.ObjectName = "CmbDataBits";

        gridLayout1.AddWidget(CmbDataBits, 2, 1, 1, 1);

        LblStopBits = new QLabel(FrameSettings);
        LblStopBits.ObjectName = "LblStopBits";
        sizePolicy.SetHeightForWidth(LblStopBits.SizePolicy.HasHeightForWidth());
        LblStopBits.SizePolicy = sizePolicy;

        gridLayout1.AddWidget(LblStopBits, 3, 0, 1, 1);

        CmbStopBits = new QComboBox(FrameSettings);
        CmbStopBits.ObjectName = "CmbStopBits";

        gridLayout1.AddWidget(CmbStopBits, 3, 1, 1, 1);

        LblParity = new QLabel(FrameSettings);
        LblParity.ObjectName = "LblParity";
        sizePolicy.SetHeightForWidth(LblParity.SizePolicy.HasHeightForWidth());
        LblParity.SizePolicy = sizePolicy;

        gridLayout1.AddWidget(LblParity, 4, 0, 1, 1);

        CmbParity = new QComboBox(FrameSettings);
        CmbParity.ObjectName = "CmbParity";

        gridLayout1.AddWidget(CmbParity, 4, 1, 1, 1);

        LblConvention = new QLabel(FrameSettings);
        LblConvention.ObjectName = "LblConvention";
        sizePolicy.SetHeightForWidth(LblConvention.SizePolicy.HasHeightForWidth());
        LblConvention.SizePolicy = sizePolicy;

        gridLayout1.AddWidget(LblConvention, 5, 0, 1, 1);

        CmbConvention = new QComboBox(FrameSettings);
        CmbConvention.ObjectName = "CmbConvention";

        gridLayout1.AddWidget(CmbConvention, 5, 1, 1, 1);

        gridLayout.AddWidget(FrameSettings, 1, 0, 1, 1);

        Buttons = new QDialogButtonBox(SettingsDialog);
        Buttons.ObjectName = "Buttons";
        Buttons.Orientation = Qt.Orientation.Horizontal;
        Buttons.StandardButtons = Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Cancel") | Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Ok");

        gridLayout.AddWidget(Buttons, 2, 0, 1, 1);

        RetranslateUi(SettingsDialog);

        QMetaObject.ConnectSlotsByName(SettingsDialog);
    }
예제 #25
0
파일: QSizeTests.cs 프로젝트: nanox/QtSharp
        public void TestScaleWithSize()
        {
            var s1 = new QSize(10, 12);
            var sS1 = new QSize(60, 60);
            s1.Scale(sS1, AspectRatioMode.IgnoreAspectRatio);
            Assert.AreEqual(60, s1.Width);
            Assert.AreEqual(60, s1.Height);

            var s2 = new QSize(10, 12);
            var sS2 = new QSize(60, 60);
            s2.Scale(sS2, AspectRatioMode.KeepAspectRatio);
            Assert.AreEqual(50, s2.Width);
            Assert.AreEqual(60, s2.Height);

            var s3 = new QSize(10, 12);
            var sS3 = new QSize(60, 60);
            s3.Scale(sS3, AspectRatioMode.KeepAspectRatioByExpanding);
            Assert.AreEqual(60, s3.Width);
            Assert.AreEqual(72, s3.Height);
        }
예제 #26
0
        public void SetupUi(QWidget KeyManagerFrame)
        {
            if (KeyManagerFrame.ObjectName == "")
            KeyManagerFrame.ObjectName = "KeyManagerFrame";
            QSize Size = new QSize(787, 318);
            Size = Size.ExpandedTo(KeyManagerFrame.MinimumSizeHint);
            KeyManagerFrame.Size = Size;
            verticalLayout = new QVBoxLayout(KeyManagerFrame);
            verticalLayout.ObjectName = "verticalLayout";
            mStackedWidget = new QStackedWidget(KeyManagerFrame);
            mStackedWidget.ObjectName = "mStackedWidget";
            mMessagePage = new QWidget();
            mMessagePage.ObjectName = "mMessagePage";
            mMessagePaneLayout_3 = new QHBoxLayout(mMessagePage);
            mMessagePaneLayout_3.SetContentsMargins(0, 0, 0, 0);
            mMessagePaneLayout_3.ObjectName = "mMessagePaneLayout_3";
            mMessageLabel = new QLabel(mMessagePage);
            mMessageLabel.ObjectName = "mMessageLabel";
            QFont font = new QFont();
            font.PointSize = 12;
            mMessageLabel.Font = font;
            mMessageLabel.AcceptDrops = true;
            mMessageLabel.Alignment = Qt.AlignmentFlag.AlignCenter;

            mMessagePaneLayout_3.AddWidget(mMessageLabel);

            mStackedWidget.AddWidget(mMessagePage);
            mTablePage = new QWidget();
            mTablePage.ObjectName = "mTablePage";
            horizontalLayout_2 = new QHBoxLayout(mTablePage);
            horizontalLayout_2.SetContentsMargins(0, 0, 0, 0);
            horizontalLayout_2.ObjectName = "horizontalLayout_2";
            mTableWidget = new QTableWidget(mTablePage);
            mTableWidget.ObjectName = "mTableWidget";
            QFont font1 = new QFont();
            font1.PointSize = 8;
            mTableWidget.Font = font1;
            mTableWidget.FocusPolicy = Qt.FocusPolicy.NoFocus;
            mTableWidget.AcceptDrops = true;
            mTableWidget.EditTriggers = QAbstractItemView.EditTrigger.NoEditTriggers;
            mTableWidget.dragDropMode = QAbstractItemView.DragDropMode.DropOnly;
            mTableWidget.DefaultDropAction = Qt.DropAction.CopyAction;
            mTableWidget.AlternatingRowColors = true;
            mTableWidget.selectionMode = QAbstractItemView.SelectionMode.MultiSelection;
            mTableWidget.selectionBehavior = QAbstractItemView.SelectionBehavior.SelectRows;
            mTableWidget.ShowGrid = false;
            mTableWidget.WordWrap = false;
            mTableWidget.RowCount = 0;
            mTableWidget.ColumnCount = 6;
            mTableWidget.HorizontalHeader.StretchLastSection = true;
            mTableWidget.VerticalHeader.Visible = false;

            horizontalLayout_2.AddWidget(mTableWidget);

            mStackedWidget.AddWidget(mTablePage);

            verticalLayout.AddWidget(mStackedWidget);

            mButtonLayout = new QHBoxLayout();
            mButtonLayout.ObjectName = "mButtonLayout";
            mLockButton = new QPushButton(KeyManagerFrame);
            mLockButton.ObjectName = "mLockButton";
            mLockButton.Checkable = false;

            mButtonLayout.AddWidget(mLockButton);

            mUnlockButton = new QPushButton(KeyManagerFrame);
            mUnlockButton.ObjectName = "mUnlockButton";

            mButtonLayout.AddWidget(mUnlockButton);

            mAddButton = new QPushButton(KeyManagerFrame);
            mAddButton.ObjectName = "mAddButton";

            mButtonLayout.AddWidget(mAddButton);

            mRemoveButton = new QPushButton(KeyManagerFrame);
            mRemoveButton.ObjectName = "mRemoveButton";

            mButtonLayout.AddWidget(mRemoveButton);

            mRemoveAllButton = new QPushButton(KeyManagerFrame);
            mRemoveAllButton.ObjectName = "mRemoveAllButton";

            mButtonLayout.AddWidget(mRemoveAllButton);

            mRefreshButton = new QPushButton(KeyManagerFrame);
            mRefreshButton.ObjectName = "mRefreshButton";

            mButtonLayout.AddWidget(mRefreshButton);

            verticalLayout.AddLayout(mButtonLayout);

            RetranslateUi(KeyManagerFrame);

            mStackedWidget.CurrentIndex = 1;

            QMetaObject.ConnectSlotsByName(KeyManagerFrame);
        }
예제 #27
0
 public void SetIconSize(QSize size)
 {
     interceptor.Invoke("setIconSize#", "setIconSize(const QSize&)", typeof(void), typeof(QSize), size);
 }