예제 #1
0
    public MyWidget(QWidget parent) : base(parent)
    {
        QPushButton quit = new QPushButton("Quit");

        Connect(quit,SIGNAL("clicked()"),qApp,SLOT("quit()"));

        QGridLayout grid          = new QGridLayout();
        LCDRange    previousRange = null;

        for (int row = 0; row < 3; ++row)
        {
            for (int column = 0; column < 3; ++column)
            {
                LCDRange lcdRange = new LCDRange();
                grid.AddWidget(lcdRange,row,column);
                if (previousRange != null)
                {
                    Connect(lcdRange,SIGNAL("valueChanged(int)"),
                            previousRange,SLOT("setValue(int)"));
                }
                previousRange = lcdRange;
            }
        }

        QVBoxLayout layout = new QVBoxLayout();

        layout.AddWidget(quit);
        layout.AddLayout(grid);
        SetLayout(layout);
    }
예제 #2
0
        public override void InitUI()
        {
            var layoutMain = new QVBoxLayout(this);

            layoutMain.AddWidget(InitSpliter());
            layoutMain.AddStretch();
        }
예제 #3
0
    private void Init()
    {
        QLCDNumber lcd = new QLCDNumber(2);

        lcd.segmentStyle = QLCDNumber.SegmentStyle.Filled;

        slider = new QSlider(Qt.Orientation.Horizontal);
        slider.SetRange(0, 99);
        slider.Value    = 0;
        label           = new QLabel();
        label.Alignment = (int)(Qt.AlignmentFlag.AlignHCenter | Qt.AlignmentFlag.AlignTop);
        label.SetSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Fixed);

        Connect(slider, SIGNAL("valueChanged(int)"),
                lcd, SLOT("display(int)"));
        Connect(slider,SIGNAL("valueChanged(int)"),
                this,SIGNAL("ValueChanged(int)"));

        QVBoxLayout layout = new QVBoxLayout();

        layout.AddWidget(lcd);
        layout.AddWidget(slider);
        layout.AddWidget(label);
        SetLayout(layout);

        SetFocusProxy(slider);
    }
예제 #4
0
        private QGroupBox InitQComboBox()
        {
            var groupBox = new QGroupBox ("QComboBox", this);
            QVBoxLayout vBox = new QVBoxLayout ();
            QComboBox comboBox = new QComboBox (this);
            QLabel label = new QLabel ("Silence is a source of great strength.", this);

            comboBox.AddItem ("Silence is a source of great strength.");
            comboBox.AddItem ("From caring comes courage.");
            comboBox.AddItem ("Mastering yourself is true power.");
            comboBox.AddItem ("To the mind that is still, the whole universe surrenders.");
            comboBox.AddItem ("Be the chief but never the lord.");
            comboBox.AddItem ("He who is contented is rich.");
            comboBox.AddItem ("He who knows himself is enlightened.");

            comboBox.ActivatedText += (string obj) => {
                label.Text = obj;
            };

            vBox.AddWidget (comboBox);
            vBox.AddWidget (label);

            groupBox.Layout = vBox;
            return groupBox;
        }
예제 #5
0
        private QGroupBox InitToggleButtons()
        {
            var groupBox = new QGroupBox("Toggle Buttons", this);

            color                     = new QColor();
            redButton                 = new QPushButton("Red", this);
            greenButton               = new QPushButton("Green", this);
            blueButton                = new QPushButton("Blue", this);
            colorBoxWidget            = new QWidget(this);
            colorBoxWidget.StyleSheet = "QWidget { background-color: black }";

            redButton.Toggled   += OnToggled;
            greenButton.Toggled += OnToggled;
            blueButton.Toggled  += OnToggled;

            redButton.Checkable   = true;
            greenButton.Checkable = true;
            blueButton.Checkable  = true;

            QHBoxLayout hBox = new QHBoxLayout();
            QVBoxLayout vBox = new QVBoxLayout();

            vBox.AddWidget(redButton);
            vBox.AddWidget(greenButton);
            vBox.AddWidget(blueButton);

            hBox.AddLayout(vBox);
            hBox.AddWidget(colorBoxWidget);

            groupBox.Layout = hBox;

            return(groupBox);
        }
예제 #6
0
        private QGroupBox InitQComboBox()
        {
            var         groupBox = new QGroupBox("QComboBox", this);
            QVBoxLayout vBox     = new QVBoxLayout();
            QComboBox   comboBox = new QComboBox(this);
            QLabel      label    = new QLabel("Silence is a source of great strength.", this);

            comboBox.AddItem("Silence is a source of great strength.");
            comboBox.AddItem("From caring comes courage.");
            comboBox.AddItem("Mastering yourself is true power.");
            comboBox.AddItem("To the mind that is still, the whole universe surrenders.");
            comboBox.AddItem("Be the chief but never the lord.");
            comboBox.AddItem("He who is contented is rich.");
            comboBox.AddItem("He who knows himself is enlightened.");

            comboBox.ActivatedText += (string obj) => {
                label.Text = obj;
            };

            vBox.AddWidget(comboBox);
            vBox.AddWidget(label);

            groupBox.Layout = vBox;
            return(groupBox);
        }
예제 #7
0
        /// <summary>
        /// Gets VBoxLayout with label
        /// </summary>
        /// <returns>The layout.</returns>
        QLayout GetLayout()
        {
            var vbox = new QVBoxLayout();

            vbox.AddWidget(InitLabel("Hello world"));
            return(vbox);
        }
예제 #8
0
파일: t5.cs 프로젝트: micro-chen/qyoto
    public MyWidget(QWidget parent) : base(parent)
    {
        QPushButton quit = new QPushButton(Tr("Quit"));

        quit.Font = new QFont("Times", 18, (int)QFont.Weight.Bold);

        QLCDNumber lcd = new QLCDNumber(2);

        lcd.segmentStyle = QLCDNumber.SegmentStyle.Filled;

        QSlider slider = new QSlider(Qt.Orientation.Horizontal);

        slider.SetRange(0, 99);
        slider.Value = 0;

        Connect(quit, SIGNAL("clicked()"), qApp, SLOT("quit()"));
        Connect(slider,SIGNAL("valueChanged(int)"),
                lcd,SLOT("display(int)"));

        QVBoxLayout layout = new QVBoxLayout();

        layout.AddWidget(quit);
        layout.AddWidget(lcd);
        layout.AddWidget(slider);
        SetLayout(layout);
    }
        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);
        }
예제 #10
0
        /// <summary>
        /// Generate
        /// </summary>
        /// <returns></returns>
        public static QLayout GenerateLayout()
        {
            //var vbox = new QVBoxLayout(parentWidget);
            var vbox = new QVBoxLayout();

            vbox.AddWidget(new QLabel("Windows"));

            var vbox1 = new QVBoxLayout();

            vbox1.AddWidget(new QPushButton("Activate"));
            vbox1.AddWidget(new QPushButton("Close"), 0, AlignmentFlag.AlignTop);

            var hbox1 = new QHBoxLayout();

            hbox1.AddWidget(new QTextEdit()
            {
                Enabled = true
            });
            hbox1.AddLayout(vbox1);

            vbox.AddLayout(hbox1);

            var hbox2 = new QHBoxLayout();

            hbox2.AddWidget(new QPushButton("Help"));
            hbox2.AddStretch(1);
            hbox2.AddWidget(new QPushButton("OK"));

            vbox.AddLayout(hbox2, 1);

            return(vbox);
            //parentWidget.Layout = vbox;
        }
예제 #11
0
    //===============================================
    // method
    //===============================================
    public unsafe void run(string[] args)
    {
        sGApp lApp = GManager.Instance().getData().app;

        int argc = 0;

        lApp.app = new QApplication(ref argc, null);

        QLabel lLabel = new QLabel();

        lLabel.Text      = "Bonjour tout le monde";
        lLabel.Alignment = AlignmentFlag.AlignCenter;

        QVBoxLayout lMainLayout = new QVBoxLayout();

        lMainLayout.AddWidget(lLabel);

        QWidget lWindow = new QWidget();

        lWindow.Layout = lMainLayout;
        lWindow.Resize(lApp.win_width, lApp.win_height);
        lWindow.WindowTitle = lApp.app_name;
        lWindow.Show();

        QApplication.Exec();
    }
예제 #12
0
파일: t6.cs 프로젝트: micro-chen/qyoto
    public MyWidget(QWidget parent) : base(parent)
    {
        QPushButton quit = new QPushButton("Quit",this);

        quit.Font = new QFont("Times",18,(int)QFont.Weight.Bold);

        Connect(quit,SIGNAL("clicked()"),qApp,SLOT("quit()"));

        QGridLayout grid = new QGridLayout();

        for (int row = 0; row < 3; row++)
        {
            for (int column = 0; column < 3; column++)
            {
                LCDRange lcdRange = new LCDRange();
                grid.AddWidget(lcdRange,row,column);
            }
        }

        QVBoxLayout layout = new QVBoxLayout();

        layout.AddWidget(quit);
        layout.AddLayout(grid);
        SetLayout(layout);
    }
예제 #13
0
        protected void SetupUi()
        {
            base.ObjectName  = "ChatWindow";
            this.Geometry    = new QRect(0, 0, 562, 331);
            this.WindowTitle = "Chat window";
            this.StyleSheet  = "";
            QHBoxLayout horizontalLayout;

            horizontalLayout            = new QHBoxLayout(this);
            horizontalLayout.Spacing    = 0;
            horizontalLayout.Margin     = 0;
            this.splitter_2             = new QSplitter(this);
            this.splitter_2.ObjectName  = "splitter_2";
            this.splitter_2.Orientation = Qt.Orientation.Horizontal;
            horizontalLayout.AddWidget(this.splitter_2);
            this.splitter            = new QSplitter(this.splitter_2);
            this.splitter.ObjectName = "splitter";
            QSizePolicy splitter_sizePolicy;

            splitter_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Expanding);
            splitter_sizePolicy.SetVerticalStretch(0);
            splitter_sizePolicy.SetHorizontalStretch(1);
            splitter_sizePolicy.SetHeightForWidth(this.splitter.SizePolicy.HasHeightForWidth());
            this.splitter.SizePolicy          = splitter_sizePolicy;
            this.splitter.Orientation         = Qt.Orientation.Vertical;
            this.splitter.OpaqueResize        = true;
            this.splitter.ChildrenCollapsible = false;
            this.splitter_2.AddWidget(this.splitter);
            this.m_ConversationWidget            = new Synapse.QtClient.Widgets.ConversationWidget(this.splitter);
            this.m_ConversationWidget.ObjectName = "m_ConversationWidget";
            this.m_ConversationWidget.Url        = new QUrl("about:blank");
            this.splitter.AddWidget(this.m_ConversationWidget);
            this.bottomContainer            = new QWidget(this.splitter);
            this.bottomContainer.ObjectName = "bottomContainer";
            QVBoxLayout verticalLayout;

            verticalLayout            = new QVBoxLayout(this.bottomContainer);
            verticalLayout.Spacing    = 0;
            verticalLayout.Margin     = 0;
            this.textEdit             = new Synapse.QtClient.Widgets.ConversationTextEdit(this.bottomContainer);
            this.textEdit.ObjectName  = "textEdit";
            this.textEdit.MinimumSize = new QSize(0, 40);
            this.textEdit.FrameShape  = QFrame.Shape.NoFrame;
            verticalLayout.AddWidget(this.textEdit);
            this.splitter.AddWidget(this.bottomContainer);
            this.rightContainer            = new QWidget(this.splitter_2);
            this.rightContainer.ObjectName = "rightContainer";
            QVBoxLayout verticalLayout_2;

            verticalLayout_2                 = new QVBoxLayout(this.rightContainer);
            verticalLayout_2.Margin          = 0;
            this.participantsGrid            = new Synapse.QtClient.Widgets.AvatarGrid <jabber.connection.RoomParticipant>(this.rightContainer);
            this.participantsGrid.ObjectName = "participantsGrid";
            this.participantsGrid.FrameShape = QFrame.Shape.NoFrame;
            this.participantsGrid.Alignment  = ((global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignLeading") | global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignLeft")) | global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignTop"));
            verticalLayout_2.AddWidget(this.participantsGrid);
            this.splitter_2.AddWidget(this.rightContainer);
            QMetaObject.ConnectSlotsByName(this);
        }
예제 #14
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);
    } // SetupUi
예제 #15
0
파일: main.cs 프로젝트: micro-chen/qyoto
    public MyWidget(QWidget parent) : base(parent)
    {
        QPushButton quit = new QPushButton("&Quit");

        quit.Font = new QFont("Times", 18, (int)QFont.Weight.Bold);

        Connect(quit, SIGNAL("clicked()"), qApp, SLOT("quit()"));

        LCDRange angle = new LCDRange(null);

        angle.setRange(5,70);

        LCDRange force = new LCDRange(null);

        force.setRange(10,50);

        CannonField cannonField = new CannonField(null);

        Connect(angle,SIGNAL("valueChanged(int)"),
                cannonField,SLOT("setAngle(int)"));
        Connect(cannonField,SIGNAL("angleChanged(int)"),
                angle,SLOT("setValue(int)"));

        Connect(force,SIGNAL("valueChanged(int)"),
                cannonField,SLOT("setForce(int)"));
        Connect(cannonField,SIGNAL("forceChanged(int)"),
                force,SLOT("setValue(int)"));

        QPushButton shoot = new QPushButton("&Shoot");

        shoot.Font = new QFont("Times",18,(int)QFont.Weight.Bold);

        Connect(shoot,SIGNAL("clicked()"),cannonField,SLOT("shoot()"));

        QHBoxLayout topLayout = new QHBoxLayout();

        topLayout.AddWidget(shoot);
        topLayout.AddStretch(1);

        QVBoxLayout leftLayout = new QVBoxLayout();

        leftLayout.AddWidget(angle);
        leftLayout.AddWidget(force);

        QGridLayout gridLayout = new QGridLayout();

        gridLayout.AddWidget(quit,0,0);
        gridLayout.AddLayout(topLayout,0,1);
        gridLayout.AddLayout(leftLayout,1,0);
        gridLayout.AddWidget(cannonField,1,1,2,1);
        gridLayout.SetColumnStretch(1,10);
        SetLayout(gridLayout);

        angle.setValue(60);
        force.setValue(25);
        angle.SetFocus();
    }
예제 #16
0
        public override void InitUI()
        {
            label = new QLabel("Click me to open dialog", this);

            var vbox = new QVBoxLayout(this);

            label.Alignment = QtCore.Qt.AlignmentFlag.AlignCenter;
            vbox.AddWidget(label);
        }
예제 #17
0
        protected void SetupUi()
        {
            base.ObjectName  = "DebugWindow";
            this.Geometry    = new QRect(0, 0, 518, 405);
            this.WindowTitle = "DebugWindow";
            QVBoxLayout verticalLayout;

            verticalLayout              = new QVBoxLayout(this);
            this.tabWidget              = new QTabWidget(this);
            this.tabWidget.ObjectName   = "tabWidget";
            this.tabWidget.CurrentIndex = 0;
            verticalLayout.AddWidget(this.tabWidget);
            this.tab            = new QWidget(this.tabWidget);
            this.tab.ObjectName = "tab";
            QVBoxLayout verticalLayout_3;

            verticalLayout_3             = new QVBoxLayout(this.tab);
            verticalLayout_3.Spacing     = 0;
            verticalLayout_3.Margin      = 0;
            this.m_XmlToolBox            = new QToolBox(this.tab);
            this.m_XmlToolBox.ObjectName = "m_XmlToolBox";
            QSizePolicy m_XmlToolBox_sizePolicy;

            m_XmlToolBox_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Expanding);
            m_XmlToolBox_sizePolicy.SetVerticalStretch(0);
            m_XmlToolBox_sizePolicy.SetHorizontalStretch(0);
            m_XmlToolBox_sizePolicy.SetHeightForWidth(this.m_XmlToolBox.SizePolicy.HasHeightForWidth());
            this.m_XmlToolBox.SizePolicy = m_XmlToolBox_sizePolicy;
            verticalLayout_3.AddWidget(this.m_XmlToolBox);
            this.line             = new QFrame(this.tab);
            this.line.ObjectName  = "line";
            this.line.FrameShape  = QFrame.Shape.HLine;
            this.line.FrameShadow = QFrame.Shadow.Sunken;
            verticalLayout_3.AddWidget(this.line);
            QHBoxLayout horizontalLayout;

            horizontalLayout = new QHBoxLayout();
            verticalLayout_3.AddLayout(horizontalLayout);
            horizontalLayout.sizeConstraint       = QLayout.SizeConstraint.SetDefaultConstraint;
            horizontalLayout.Margin               = 6;
            this.enableConsoleCheckBox            = new QCheckBox(this.tab);
            this.enableConsoleCheckBox.ObjectName = "enableConsoleCheckBox";
            this.enableConsoleCheckBox.Text       = "Enable";
            horizontalLayout.AddWidget(this.enableConsoleCheckBox);
            QSpacerItem horizontalSpacer;

            horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum);
            horizontalLayout.AddItem(horizontalSpacer);
            this.clearConsoleButton            = new QPushButton(this.tab);
            this.clearConsoleButton.ObjectName = "clearConsoleButton";
            this.clearConsoleButton.Text       = "Clear";
            horizontalLayout.AddWidget(this.clearConsoleButton);
            this.tabWidget.AddTab(this.tab, "XML Console");
            QMetaObject.ConnectSlotsByName(this);
        }
예제 #18
0
 public Window()
 {
     layout  = new QVBoxLayout(this);
     browser = new QTextBrowser(this);
     button  = new QPushButton("Toggle Text", this);
     Connect(button, SIGNAL("clicked()"), this, SLOT("toggleText()"));
     toggled = false;
     layout.AddWidget(browser);
     layout.AddWidget(button);
     SetLayout(layout);
 }
예제 #19
0
        private void InitUI()
        {
            QVBoxLayout vBox = new QVBoxLayout(this);

            vBox.AddWidget(InitCheckBox());
            vBox.AddWidget(InitQLabel());
            vBox.AddWidget(InitQLineEdit());
            vBox.AddWidget(InitToggleButtons());
            vBox.AddWidget(InitQComboBox());
            vBox.AddStretch(1);
        }
예제 #20
0
        protected void SetupUi()
        {
            base.ObjectName  = "AboutDialog";
            this.Geometry    = new QRect(0, 0, 384, 492);
            this.MinimumSize = new QSize(384, 0);
            this.WindowTitle = "About Synapse";
            this.StyleSheet  = "#AboutDialog {\n\tmax-width: 384px;\n\tbackground: #010409 url(resource:/oceanbg.png) no-repeat top center;\n}\n\nQWidget {\n\tcolor: white;\n}\n\nQGraphicsView, QTextBrowser {\n\tbackground: transparent;\n}\n\nQPushButton[flat=\"false\"] {\n\tborder: 1px solid #2B2D31;\n\tborder-radius: 3px;\n\tbackground-color: #2B2D31;\n\tpadding: 3px;\n}\n\n#textLabel {\n\tmargin-bottom: 12px;\n}\n\nQScrollBar:vertical {\n\tborder: 0px;\n\tbackground: transparent;\n\twidth: 15px;\n\tmargin: 0px;\n}\n\nQScrollBar::handle:vertical {\n\tbackground: #4F4F4F;\n\tmin-height: 20px;\n\tborder: 1px solid #4F4F4F;\n\tborder-radius: 5px;\n}\n\nQScrollBar::add-line:vertical {\n\theight: 0px;\n\tborder: 0px;\n}\n\nQScrollBar::sub-line:vertical {\n\theight: 0px;\n}\n\nQScrollBar::add-page:vertical, \nQScrollBar::sub-page:vertical {\n\tbackground: none;\n}";
            QVBoxLayout verticalLayout;

            verticalLayout         = new QVBoxLayout(this);
            verticalLayout.Spacing = 6;
            verticalLayout.Margin  = 6;
            this.widget            = new QWidget(this);
            this.widget.ObjectName = "widget";
            QHBoxLayout horizontalLayout;

            horizontalLayout              = new QHBoxLayout(this.widget);
            horizontalLayout.Margin       = 0;
            this.graphicsView             = new QGraphicsView(this.widget);
            this.graphicsView.ObjectName  = "graphicsView";
            this.graphicsView.MinimumSize = new QSize(0, 250);
            this.graphicsView.FrameShape  = QFrame.Shape.NoFrame;
            horizontalLayout.AddWidget(this.graphicsView);
            verticalLayout.AddWidget(this.widget);
            this.textLabel            = new QLabel(this);
            this.textLabel.ObjectName = "textLabel";
            this.textLabel.Text       = "";
            this.textLabel.Alignment  = global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignCenter");
            verticalLayout.AddWidget(this.textLabel);
            this.textBrowser             = new QTextBrowser(this);
            this.textBrowser.ObjectName  = "textBrowser";
            this.textBrowser.MaximumSize = new QSize(16777215, 120);
            this.textBrowser.FrameShape  = QFrame.Shape.NoFrame;
            this.textBrowser.FrameShadow = QFrame.Shadow.Plain;
            this.textBrowser.Html        = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\np, li { white-space: pre-wrap; }\n</style></head><body style=\" font-family:'Bitstream Vera Sans'; font-size:9pt; font-weight:400; font-style:normal;\">\n<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600;\">Created By</span></p>\n<p align=\"center\" style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600;\"></p>\n<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600;\"><a href=\"#message-eric\"><span style=\" font-weight:400; text-decoration: underline; color:#ffffff;\">Eric Butler</span></a></p>\n<p align=\"center\" style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"></p>\n<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600;\">Special Thanks To</span></p>\n<p align=\"center\" style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600;\"></p>\n<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600;\"><span style=\" font-weight:400;\">Chris Hergert</span></p>\n<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Allison Hughes</p>\n<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Arno Rehn</p>\n<p align=\"center\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Darryl Ring</p></body></html>";
            verticalLayout.AddWidget(this.textBrowser);
            QHBoxLayout horizontalLayout_2;

            horizontalLayout_2 = new QHBoxLayout();
            verticalLayout.AddLayout(horizontalLayout_2);
            this.sendFeedbackButton            = new QPushButton(this);
            this.sendFeedbackButton.ObjectName = "sendFeedbackButton";
            this.sendFeedbackButton.Text       = "Send Feedback";
            horizontalLayout_2.AddWidget(this.sendFeedbackButton);
            this.buttonBox                 = new QDialogButtonBox(this);
            this.buttonBox.ObjectName      = "buttonBox";
            this.buttonBox.Orientation     = Qt.Orientation.Horizontal;
            this.buttonBox.StandardButtons = global::Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Close");
            horizontalLayout_2.AddWidget(this.buttonBox);
            QObject.Connect(buttonBox, Qt.SIGNAL("rejected()"), this, Qt.SLOT("reject()"));
            QObject.Connect(buttonBox,Qt.SIGNAL("accepted()"),this,Qt.SLOT("accept()"));
            QObject.Connect(buttonBox,Qt.SIGNAL("accepted()"),this,Qt.SLOT("accept()"));
            QMetaObject.ConnectSlotsByName(this);
        }
예제 #21
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);
    }
예제 #22
0
        public override void InitUI()
        {
            var layout = new QVBoxLayout(this);

            var edit = new QLineEdit(this);

            edit.TextChanged += OnChanged;
            edit.Text         = "LineEdit demo";

            layout.AddWidget(label);
            layout.AddWidget(edit);
        }
예제 #23
0
        void SetupWebIdentitiesTab()
        {
            foreach (WebIdentityConfiguratorCodon node in AddinManager.GetExtensionNodes("/Synapse/QtClient/WebIdentityConfigurators"))
            {
                var widget = new WebIdentityConfiguratorWidget(m_Account, node);

                QVBoxLayout layout = (QVBoxLayout)webIdentitiesContainer.Layout();
                layout.InsertWidget(0, widget, 0);

                widget.SetParent(webIdentitiesContainer);
            }
        }
예제 #24
0
        public NotificationsWidget(QWidget parent) : base(parent)
        {
            base.Hide();

            var service = ServiceManager.Get <ActivityFeedService>();

            service.NewItem += HandleNewItem;

            QVBoxLayout layout = new QVBoxLayout(this);

            layout.Margin  = 6;
            layout.Spacing = 3;
        }
예제 #25
0
        protected void SetupUi()
        {
            base.ObjectName  = "WebIdentityConfiguratorWidget";
            this.Geometry    = new QRect(0, 0, 540, 61);
            this.WindowTitle = "WebIdentityConfiguratorWidget";
            QVBoxLayout verticalLayout_2;

            verticalLayout_2         = new QVBoxLayout(this);
            verticalLayout_2.Spacing = 6;
            verticalLayout_2.Margin  = 0;
            QHBoxLayout horizontalLayout;

            horizontalLayout = new QHBoxLayout();
            verticalLayout_2.AddLayout(horizontalLayout);
            horizontalLayout.Spacing   = 6;
            this.iconLabel             = new QLabel(this);
            this.iconLabel.ObjectName  = "iconLabel";
            this.iconLabel.MinimumSize = new QSize(48, 0);
            this.iconLabel.Text        = "";
            horizontalLayout.AddWidget(this.iconLabel);
            this.nameLabel            = new QLabel(this);
            this.nameLabel.ObjectName = "nameLabel";
            QSizePolicy nameLabel_sizePolicy;

            nameLabel_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Preferred);
            nameLabel_sizePolicy.SetVerticalStretch(0);
            nameLabel_sizePolicy.SetHorizontalStretch(0);
            nameLabel_sizePolicy.SetHeightForWidth(this.nameLabel.SizePolicy.HasHeightForWidth());
            this.nameLabel.SizePolicy = nameLabel_sizePolicy;
            this.nameLabel.Text       = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\np, li { white-space: pre-wrap; }\n</style></head><body style=\" font-family:'Bitstream Vera Sans'; font-size:9pt; font-weight:400; font-style:normal;\">\n<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600;\">Addin Name</span></p>\n<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600;\"><span style=\" font-weight:400;\">Addin description.</span></p></body></html>";
            this.nameLabel.Alignment  = ((global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignLeading") | global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignLeft")) | global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignVCenter"));
            this.nameLabel.WordWrap   = true;
            horizontalLayout.AddWidget(this.nameLabel);
            this.widget            = new QWidget(this);
            this.widget.ObjectName = "widget";
            QVBoxLayout verticalLayout;

            verticalLayout                  = new QVBoxLayout(this.widget);
            verticalLayout.Margin           = 0;
            this.configureButton            = new QPushButton(this.widget);
            this.configureButton.ObjectName = "configureButton";
            this.configureButton.Text       = "Configure...";
            verticalLayout.AddWidget(this.configureButton);
            horizontalLayout.AddWidget(this.widget);
            this.line             = new QFrame(this);
            this.line.ObjectName  = "line";
            this.line.FrameShape  = QFrame.Shape.HLine;
            this.line.FrameShadow = QFrame.Shadow.Sunken;
            verticalLayout_2.AddWidget(this.line);
            QMetaObject.ConnectSlotsByName(this);
        }
예제 #26
0
        public Program()
        {
            WindowTitle = Tr("SSH Key Manager");
              SizeGripEnabled = true;

              var keyManager = new KeyManagerFrame ();
              keyManager.SetAgent (new UnixAgent ());
              var layout = new QVBoxLayout ();
              layout.AddWidget (keyManager);
              layout.ContentsMargins = new QMargins (0, 0, 0, 0);
              Layout = layout;

              Show ();
        }
예제 #27
0
        public MainTabWidget(QWidget parent) : base(parent)
        {
            var layout = new QVBoxLayout(this);

            layout.Spacing = 0;
            layout.Margin  = 0;

            m_Pages = new QStackedWidget(this);
            m_Pages.Layout().Margin = 0;
            layout.AddWidget(m_Pages, 1);

            m_TabBar = new TabBar(this);
            layout.AddWidget(m_TabBar, 0);
        }
        private void InitUI()
        {
            QVBoxLayout vBox = new QVBoxLayout (this);
            QHBoxLayout hBox = new QHBoxLayout ();

            QPushButton okBtn = new QPushButton ("Ok", this);
            QPushButton applyBtn = new QPushButton ("Apply", this);

            hBox.AddWidget (okBtn, 1, AlignmentFlag.AlignRight);
            hBox.AddWidget (applyBtn);

            vBox.AddStretch (1);
            vBox.AddLayout (hBox);
        }
        private void InitUI()
        {
            QVBoxLayout vBox = new QVBoxLayout(this);
            QHBoxLayout hBox = new QHBoxLayout();

            QPushButton okBtn    = new QPushButton("Ok", this);
            QPushButton applyBtn = new QPushButton("Apply", this);

            hBox.AddWidget(okBtn, 1, AlignmentFlag.AlignRight);
            hBox.AddWidget(applyBtn);

            vBox.AddStretch(1);
            vBox.AddLayout(hBox);
        }
예제 #30
0
        private QGroupBox InitCheckBox()
        {
            QGroupBox groupBox = new QGroupBox ("QCheckBox", this);

            QVBoxLayout vBox1 = new QVBoxLayout ();
            QCheckBox checkBox = new QCheckBox ("Show Title", this);
            checkBox.Checked = true;
            checkBox.StateChanged += ShowTitle;

            vBox1.AddWidget (checkBox);

            groupBox.Layout = vBox1;

            return groupBox;
        }
예제 #31
0
        private void InitiUI()
        {
            QPushButton okBtn = new QPushButton("Ok", this);
            QPushButton cancelBtn = new QPushButton("Cancel", this);

            QVBoxLayout vBoxLayout = new QVBoxLayout(this);
            QHBoxLayout hBoxLayout = new QHBoxLayout();

            hBoxLayout.AddStretch(1);
            hBoxLayout.AddWidget(okBtn);
            hBoxLayout.AddWidget(cancelBtn);

            vBoxLayout.AddStretch(1);
            vBoxLayout.AddLayout(hBoxLayout);
        }
예제 #32
0
        protected void SetupUi()
        {
            base.ObjectName = "AccountStatusWidget";
            this.Geometry   = new QRect(0, 0, 416, 47);
            QSizePolicy AccountStatusWidget_sizePolicy;

            AccountStatusWidget_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Minimum);
            AccountStatusWidget_sizePolicy.SetVerticalStretch(0);
            AccountStatusWidget_sizePolicy.SetHorizontalStretch(0);
            AccountStatusWidget_sizePolicy.SetHeightForWidth(this.SizePolicy.HasHeightForWidth());
            this.SizePolicy  = AccountStatusWidget_sizePolicy;
            this.WindowTitle = "Form";
            QHBoxLayout horizontalLayout;

            horizontalLayout         = new QHBoxLayout(this);
            horizontalLayout.Spacing = 6;
            horizontalLayout.SetContentsMargins(6, 0, 6, 6);
            this.m_AvatarLabel            = new Synapse.QtClient.Widgets.AvatarLabel(this);
            this.m_AvatarLabel.ObjectName = "m_AvatarLabel";
            QSizePolicy m_AvatarLabel_sizePolicy;

            m_AvatarLabel_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Fixed, QSizePolicy.Policy.Fixed);
            m_AvatarLabel_sizePolicy.SetVerticalStretch(0);
            m_AvatarLabel_sizePolicy.SetHorizontalStretch(0);
            m_AvatarLabel_sizePolicy.SetHeightForWidth(this.m_AvatarLabel.SizePolicy.HasHeightForWidth());
            this.m_AvatarLabel.SizePolicy  = m_AvatarLabel_sizePolicy;
            this.m_AvatarLabel.MinimumSize = new QSize(36, 36);
            this.m_AvatarLabel.MaximumSize = new QSize(32, 32);
            horizontalLayout.AddWidget(this.m_AvatarLabel);
            QVBoxLayout verticalLayout;

            verticalLayout = new QVBoxLayout();
            horizontalLayout.AddLayout(verticalLayout);
            verticalLayout.Spacing      = 0;
            this.m_NameLabel            = new Synapse.QtClient.Widgets.FadingQLabel(this);
            this.m_NameLabel.ObjectName = "m_NameLabel";
            this.m_NameLabel.Text       = "test@localhost";
            this.m_NameLabel.TextFormat = Qt.TextFormat.RichText;
            verticalLayout.AddWidget(this.m_NameLabel);
            this.m_StatusLabel                      = new QLabel(this);
            this.m_StatusLabel.ObjectName           = "m_StatusLabel";
            this.m_StatusLabel.Text                 = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\np, li { white-space: pre-wrap; }\n</style></head><body style=\" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;\">\n<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><a href=\"#show-presence-menu\"><span style=\" text-decoration: underline; color:#0057ae;\">Offline</span></a></p></body></html>";
            this.m_StatusLabel.ScaledContents       = false;
            this.m_StatusLabel.OpenExternalLinks    = false;
            this.m_StatusLabel.TextInteractionFlags = global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "LinksAccessibleByMouse");
            verticalLayout.AddWidget(this.m_StatusLabel);
            QMetaObject.ConnectSlotsByName(this);
        }
예제 #33
0
        public Program()
        {
            WindowTitle     = Tr("SSH Key Manager");
            SizeGripEnabled = true;

            var keyManager = new KeyManagerFrame();

            keyManager.SetAgent(new UnixAgent());
            var layout = new QVBoxLayout();

            layout.AddWidget(keyManager);
            layout.ContentsMargins = new QMargins(0, 0, 0, 0);
            Layout = layout;

            Show();
        }
예제 #34
0
        private QGroupBox InitCheckBox()
        {
            QGroupBox groupBox = new QGroupBox("QCheckBox", this);

            QVBoxLayout vBox1    = new QVBoxLayout();
            QCheckBox   checkBox = new QCheckBox("Show Title", this);

            checkBox.Checked       = true;
            checkBox.StateChanged += ShowTitle;

            vBox1.AddWidget(checkBox);

            groupBox.Layout = vBox1;

            return(groupBox);
        }
예제 #35
0
        protected void SetupUi()
        {
            base.ObjectName  = "ServiceBrowserWindow";
            this.Geometry    = new QRect(0, 0, 484, 401);
            this.WindowTitle = "XMPP Browser";
            QVBoxLayout verticalLayout;

            verticalLayout          = new QVBoxLayout(this);
            verticalLayout.Spacing  = 0;
            verticalLayout.Margin   = 0;
            this.webView            = new QWebView(this);
            this.webView.ObjectName = "webView";
            this.webView.Url        = new QUrl("about:blank");
            verticalLayout.AddWidget(this.webView);
            QMetaObject.ConnectSlotsByName(this);
        }
예제 #36
0
        private QGroupBox InitQLineEdit()
        {
            QGroupBox   groupBox = new QGroupBox("QLineEdit", this);
            QVBoxLayout vBox     = new QVBoxLayout();
            QLabel      label    = new QLabel("Change the text in Line Edit", this);
            QLineEdit   lineEdit = new QLineEdit(this);

            lineEdit.TextChanged += (string txt) => {
                label.Text = txt;
                label.AdjustSize();
            };
            vBox.AddWidget(lineEdit);
            vBox.AddWidget(label);

            groupBox.Layout = vBox;
            return(groupBox);
        }
예제 #37
0
파일: t6.cs 프로젝트: micro-chen/qyoto
    public LCDRange(QWidget parent) : base(parent)
    {
        QLCDNumber lcd = new QLCDNumber(2, this);

        lcd.segmentStyle = QLCDNumber.SegmentStyle.Filled;

        QSlider slider = new QSlider(Orientation.Horizontal, this);

        slider.SetRange(0, 99);
        slider.Value = 0;
        Connect(slider, SIGNAL("valueChanged(int)"), lcd, SLOT("display(int)"));

        QVBoxLayout layout = new QVBoxLayout();

        layout.AddWidget(lcd);
        layout.AddWidget(slider);
        SetLayout(layout);
    }
예제 #38
0
        public void InitUI()
        {
            QVBoxLayout vBox = new QVBoxLayout(this);
            tableWidget = new QTableWidget();

            tableWidget.ColumnCount = 3;
            tableWidget.SetHorizontalHeaderItem(0, new QTableWidgetItem("Code"));
            tableWidget.SetHorizontalHeaderItem(1, new QTableWidgetItem("Product"));
            tableWidget.SetHorizontalHeaderItem(2, new QTableWidgetItem("Id"));
            tableWidget.SetColumnHidden(2, true);

            tableWidget.HorizontalHeader.StretchLastSection = true;
            tableWidget.VerticalHeader.Hide();
            tableWidget.selectionBehavior = QAbstractItemView.SelectionBehavior.SelectRows;
            tableWidget.EditTriggers = QAbstractItemView.EditTrigger.NoEditTriggers;

            tableWidget.ItemSelectionChanged += OnItemSelectionChanged;

            this.KeyReleaseEvent += OnWidgetKeyReleaseEvent;

            QHBoxLayout hBox1 = new QHBoxLayout();
            QHBoxLayout hBox2 = new QHBoxLayout();

            QLabel lbl1 = new QLabel("Selected Code : ", this);
            lblSelectedCode = new QLabel("",this);

            QLabel lbl2 = new QLabel("Selected Product : ", this);
            lblSelectedName = new QLabel("",this);

            hBox1.AddWidget(lbl1);
            hBox1.AddWidget(lblSelectedCode);

            hBox2.AddWidget(lbl2);
            hBox2.AddWidget(lblSelectedName);

            PopulateTable();

            vBox.AddWidget(tableWidget);
            vBox.AddItem(hBox1);
            vBox.AddItem(hBox2);
        }
예제 #39
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);
    }
예제 #40
0
        public MyWidget()
        {
            QVBoxLayout vBoxLayout = new QVBoxLayout(this);

            tabWidget = new QTabWidget();
            tabWidget.TabsClosable = true;
            vBoxLayout.AddWidget(tabWidget);

            QWidget wdgt = new QWidget();
            QVBoxLayout vBox2 = new QVBoxLayout(wdgt);
            QRadioButton btnRadio1 = new QRadioButton("Radio Button 1", wdgt);
            QRadioButton btnRadio2 = new QRadioButton("Radio Button 2", wdgt);
            QRadioButton btnRadio3 = new QRadioButton("Radio Button 3", wdgt);

            vBox2.AddWidget(btnRadio1);
            vBox2.AddWidget(btnRadio2);
            vBox2.AddWidget(btnRadio3);
            vBox2.AddStretch(1);

            tabWidget.AddTab(wdgt, "Home");

            QWidget wdgt1 = new QWidget();
            QVBoxLayout vBox3 = new QVBoxLayout(wdgt1);
            QCheckBox chkBox1 = new QCheckBox("Check Box 1", wdgt1);
            QCheckBox chkBox2 = new QCheckBox("Check Box 2", wdgt1);
            QCheckBox chkBox3 = new QCheckBox("Check Box 3", wdgt1);

            vBox3.AddWidget(chkBox1);
            vBox3.AddWidget(chkBox2);
            vBox3.AddWidget(chkBox3);
            vBox3.AddStretch(1);

            tabWidget.AddTab(wdgt1, "Tab 1");

            tabWidget.TabCloseRequested += OnTabCloseRequested;

            Resize(300, 200);
            Show();
        }
예제 #41
0
        private void InitUI()
        {
            //Main Vertical box
            QVBoxLayout vBox = new QVBoxLayout(this);

            //Row 1
            QLabel labelWind = new QLabel("Windows",this);
            vBox.AddWidget(labelWind);

            //Row2
            QHBoxLayout hBoxR2 = new QHBoxLayout();
            vBox.AddItem(hBoxR2);

            //Row2 Column 1
            QTextEdit textEdit = new QTextEdit(this);
            textEdit.Enabled = false;
            hBoxR2.AddWidget(textEdit);

            //Row2 Column 2
            QVBoxLayout vBox1 = new QVBoxLayout();
            QPushButton btnActivate = new QPushButton("Activate", this);
            QPushButton btnClose = new QPushButton("Close", this);
            vBox1.ContentsMargins = new QMargins(5,0,5,5);
            vBox1.AddWidget(btnActivate);
            vBox1.AddWidget(btnClose);
            vBox1.AddStretch(1);
            hBoxR2.AddItem(vBox1);

            //Row3
            QHBoxLayout hBoxR3 = new QHBoxLayout();
            vBox.AddItem(hBoxR3);
            QPushButton btnHelp = new QPushButton("Help", this);
            QPushButton btnOk = new QPushButton("Ok", this);
            hBoxR3.AddWidget(btnHelp);
            hBoxR3.AddStretch(1);
            hBoxR3.AddWidget(btnOk);
        }
예제 #42
0
        public MyWidget()
        {
            Resize(300, 300);
            QVBoxLayout vBox1 = new QVBoxLayout(this);
            QHBoxLayout hBox = new QHBoxLayout();
            vBox1.AddLayout(hBox);

            QLineEdit txtCode = new QLineEdit(this);
            QLineEdit txtName = new QLineEdit(this);

            hBox.AddWidget(txtCode);
            hBox.AddWidget(txtName);

            tableView = new QTableView();
            tableView.MinimumHeight = 200;
            tableView.MinimumWidth = 300;
            tableModel = new TableModel();
            completer = new QCompleter(tableModel);
            completer.Popup = tableView;
            completer.CompletionColumn = 0;
            //completer.MaxVisibleItems = 5;

            tableView.HorizontalHeader.StretchLastSection = false;
            tableView.HorizontalHeader.Hide();
            tableView.VerticalHeader.Hide();
            tableView.VerticalHeader.SetResizeMode(QHeaderView.ResizeMode.Fixed);
            tableView.VerticalHeader.DefaultSectionSize = 24;
            tableView.EditTriggers = QAbstractItemView.EditTrigger.NoEditTriggers;
            tableView.HorizontalHeader.SetResizeMode(0, QHeaderView.ResizeMode.ResizeToContents);
            tableView.HorizontalHeader.SetResizeMode(1, QHeaderView.ResizeMode.Stretch);
            tableView.selectionBehavior = QAbstractItemView.SelectionBehavior.SelectRows;

            txtCode.Completer = completer;

            Show();
        }
예제 #43
0
        private void InitUI()
        {
            QVBoxLayout vBox = new QVBoxLayout (this);

            QVBoxLayout vBox1 = new QVBoxLayout ();

            QHBoxLayout hBox1 = new QHBoxLayout ();
            QHBoxLayout hBox2 = new QHBoxLayout ();

            QLabel winLabel = new QLabel ("Windows", this);
            QTextEdit textEdit = new QTextEdit (this);
            textEdit.Enabled = false;

            QPushButton activateButton = new QPushButton ("Activate", this);
            QPushButton closeButton = new QPushButton ("Close", this);
            QPushButton helpButton = new QPushButton ("Help", this);
            QPushButton okButton = new QPushButton ("Ok", this);

            vBox.AddWidget (winLabel);

            vBox1.AddWidget (activateButton);
            vBox1.AddWidget (closeButton, 0, AlignmentFlag.AlignTop);

            hBox1.AddWidget (textEdit);
            hBox1.AddLayout (vBox1);

            vBox.AddLayout (hBox1);

            hBox2.AddWidget (helpButton);
            hBox2.AddStretch (1);
            hBox2.AddWidget (okButton);

            vBox.AddLayout (hBox2, 1);

            Layout = vBox;
        }
예제 #44
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);
    }
예제 #45
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);
        }
예제 #46
0
        private QGroupBox InitQLabel()
        {
            String str = @"Little boxes on the hillside,
            Little boxes made of ticky tacky,
            Little boxes on the hillside,
            Little boxes all the same.

            There's a green one and a pink one
            And a blue one and a yellow one,
            And they're all made out of ticky tacky
            And they all look just the same.";

            QGroupBox groupBox = new QGroupBox ("QLabel", this);
            QVBoxLayout vBox = new QVBoxLayout ();
            QLabel label = new QLabel (str, this);
            label.Font = new QFont("Myriad Pro", 9);
            vBox.AddWidget (label);
            groupBox.Layout = vBox;

            return groupBox;
        }
예제 #47
0
        private QGroupBox InitQLineEdit()
        {
            QGroupBox groupBox = new QGroupBox ("QLineEdit", this);
            QVBoxLayout vBox = new QVBoxLayout ();
            QLabel label = new QLabel ("Change the text in Line Edit", this);
            QLineEdit lineEdit = new QLineEdit (this);
            lineEdit.TextChanged += (string txt) => {
                label.Text = txt;
                label.AdjustSize();
            };
            vBox.AddWidget (lineEdit);
            vBox.AddWidget (label);

            groupBox.Layout = vBox;
            return groupBox;
        }
예제 #48
0
 private void InitUI()
 {
     QVBoxLayout vBox = new QVBoxLayout (this);
     vBox.AddWidget (InitCheckBox());
     vBox.AddWidget (InitQLabel());
     vBox.AddWidget (InitQLineEdit());
     vBox.AddWidget (InitToggleButtons());
     vBox.AddWidget (InitQComboBox());
     vBox.AddStretch (1);
 }
예제 #49
0
        private QGroupBox InitToggleButtons()
        {
            var groupBox = new QGroupBox ("Toggle Buttons", this);
            color = new QColor ();
            redButton = new QPushButton ("Red", this);
            greenButton = new QPushButton ("Green", this);
            blueButton = new QPushButton ("Blue", this);
            colorBoxWidget = new QWidget (this);
            colorBoxWidget.StyleSheet = "QWidget { background-color: black }";

            redButton.Toggled += OnToggled;
            greenButton.Toggled += OnToggled;
            blueButton.Toggled += OnToggled;

            redButton.Checkable = true;
            greenButton.Checkable = true;
            blueButton.Checkable = true;

            QHBoxLayout hBox = new QHBoxLayout ();
            QVBoxLayout vBox = new QVBoxLayout ();

            vBox.AddWidget (redButton);
            vBox.AddWidget (greenButton);
            vBox.AddWidget (blueButton);

            hBox.AddLayout (vBox);
            hBox.AddWidget (colorBoxWidget);

            groupBox.Layout = hBox;

            return groupBox;
        }
예제 #50
0
파일: gui.cs 프로젝트: jyale/group-chat
    public Gui(Net net)
    {
        net.newMsg += this.addMessage;

        // copy the net object so all methods can access it
        netCpy = net;

        setWindowTitle("Group-chat");

        // Read-only text box where we display messages from everyone.
        // This widget expands both horizontally and vertically.

        // MULTI line text edit
        textview = new QTextEdit(this);
        textview.setReadOnly(true);

        // Small text-entry box the user can enter messages.
        // This widget normally expands only horizontally,
        // leaving extra vertical space for the textview widget.
        //
        // Challenge!  Change this into a read/write QTextEdit,
        // so that the user can easily enter multi-line messages.

        // single line text edit
        textline = new QLineEdit(this);

        // Create the list of nodes
        //table = new QListView(this);

          		model = new QStringListModel();
        //model.setStringList(net.peerNames);

        // Lay out the widgets to appear in the main window.
        // For Qt widget and layout concepts see:
        // http://doc.trolltech.com/4.6/widgets-and-layouts.html

        // Q Vertical Box layout
        QVBoxLayout layout = new QVBoxLayout();
        layout.addWidget(textview);
        layout.addWidget(textline);

        // add objectst to layout tehn

        QVBoxLayout peerLayout = new QVBoxLayout();

        QLabel title = new QLabel("List of peers:");
        peerLayout.addWidget(title);

        for(int i=0; i< net.peerList.size(); i++){
            String peerName = (String)net.peerList.get(i);
            Console.WriteLine(peerName);
            QLabel label = new QLabel(peerName);
            peerLayout.addWidget(label);
        }

        QPushButton button = new QPushButton("Add Peer");

        QPushButton sendButton = new QPushButton("Send Message");
        sendButton.clicked.connect(this,"gotReturnPressed()");

        button.clicked.connect(this,"addPeer()");

        QVBoxLayout buttonLay = new QVBoxLayout();
        buttonLay.addWidget(sendButton);
        buttonLay.addWidget(button);
        QWidget buttonW = new QWidget(this);
        buttonW.setLayout(buttonLay);

        QWidget peers = new QWidget(this);
        peers.setLayout(peerLayout);

        QWidget msgAndInput = new QWidget(this);
        msgAndInput.setLayout(layout);

        QHBoxLayout window = new QHBoxLayout();
        window.addWidget(peers);
        window.addWidget(msgAndInput);
        window.addWidget(buttonW);

        base.setLayout(window);

        //layout.addWidget(table);

        // base is like "this" in Java, base object of GUI
        //base.setLayout(layout);

        // Register a callback on the textline's returnPressed signal
        // so that we can send the message entered by the user.
        // Note that here we're using a Qt signal, not a C# event.
        // The Qt Jambi bindings for C# don't support custom signals,
        // only the the signals built-in to "native" Qt objects.
        // Thus, any new signals we need to define should be C# events;
        // see the example below.

        // removed this functionality and replaced with a button

        //textline.returnPressed.connect(this, "gotReturnPressed()");

        // Lab 1: Insert code here to add some kind of GUI facility
        // allowing the user to view the list of peers available,
        // as maintained by the Net instance provided above.
        // You might do this simply by adding a widget to this dialog,
        // or by adding a button or menu that opens a new dialog
        // to display the list of peers, or whatever method you prefer.
    }
예제 #51
0
        private void InitUI()
        {
            QLabel labelCode = new QLabel("Code",this);
            QLabel labelName = new QLabel("Name", this);
            QLabel labelUnit = new QLabel("Price", this);
            QLabel labelPrice = new QLabel("Unit Price", this);

            labelErrorCode = new QLabel("", this);
            labelErrorCode.ObjectName = "errorCode";

            labelErrorName = new QLabel("", this);
            labelErrorName.ObjectName = "errorName";

            labelErrorUnit = new QLabel("", this);
            labelErrorUnit.ObjectName = "errorUnit";

            labelErrorPrice = new QLabel("", this);
            labelErrorPrice.ObjectName = "errorPrice";

            StyleSheet = @"QLabel#errorCode{color:#ff0000}
                QLabel#errorName{color:#ff0000}
                QLabel#errorUnit{color:#ff0000}
                QLabel#errorPrice{color:#ff0000}
            ";

            txtCode = new QLineEdit(this);
            txtName = new QLineEdit(this);
            cmbUnit = new QComboBox(this);
            txtPrice = new QLineEdit(this);

            txtCode.TextEdited += OnTextCodeEdited;
            txtName.TextEdited += OnTextNameEdited;
            txtPrice.TextEdited += OnTextPriceEdited;

            txtCode.FocusOutEvent += OnTextCodeFocusOut;
            txtName.FocusOutEvent += OnTextNameFocusOut;
            txtPrice.FocusOutEvent += OnTextPriceFocusOut;

            QPushButton btnSave = new QPushButton("Save", this);
            QPushButton btnReset = new QPushButton("Reset", this);

            btnSave.Clicked += OnBtnSaveClicked;
            btnReset.Clicked += OnBtnResetClicked;

            //Layouts
            QVBoxLayout topVLayout = new QVBoxLayout(this);
            QHBoxLayout topHLayout = new QHBoxLayout();

            QFormLayout formLayout = new QFormLayout();

            QVBoxLayout vBoxCode = new QVBoxLayout();
            QVBoxLayout vBoxName = new QVBoxLayout();
            QVBoxLayout vBoxUnit = new QVBoxLayout();
            QVBoxLayout vBoxPrice = new QVBoxLayout();

            QHBoxLayout btnHLayout = new QHBoxLayout();

            QGroupBox groupBox = new QGroupBox("Product",this);
            groupBox.MinimumWidth = 250;

            QVBoxLayout grpBoxVLayout = new QVBoxLayout();

            vBoxCode.AddWidget(txtCode);
            vBoxCode.AddWidget(labelErrorCode);

            vBoxName.AddWidget(txtName);
            vBoxName.AddWidget(labelErrorName);

            vBoxUnit.AddWidget(cmbUnit);
            vBoxUnit.AddWidget(labelErrorUnit);

            vBoxPrice.AddWidget(txtPrice);
            vBoxPrice.AddWidget(labelErrorPrice);

            formLayout.HorizontalSpacing = 5;
            formLayout.VerticalSpacing = 10;
            formLayout.AddRow(labelCode, vBoxCode);
            formLayout.AddRow(labelName, vBoxName);
            formLayout.AddRow(labelUnit, vBoxUnit);
            formLayout.AddRow(labelPrice, vBoxPrice);

            btnHLayout.AddStretch(1);
            btnHLayout.AddWidget(btnSave);
            btnHLayout.AddWidget(btnReset);

            grpBoxVLayout.AddItem(formLayout);
            grpBoxVLayout.AddItem(btnHLayout);

            cmbUnit.AddItem("Litre", "L");
            cmbUnit.AddItem("Kilogram","K");
            cmbUnit.AddItem("Gram", "G");
            cmbUnit.AddItem("Packet", "P");

            groupBox.Layout = grpBoxVLayout;

            topHLayout.AddStretch(1);
            topHLayout.AddWidget(groupBox);
            topHLayout.AddStretch(1);

            topVLayout.AddStretch(1);
            topVLayout.AddItem(topHLayout);
            topVLayout.AddStretch(1);
        }