Exemple #1
0
        private void InitUI()
        {
            QGridLayout grid = new QGridLayout(this);

            QLabel labelName = new QLabel("Name", this);
            QLineEdit lineEdit = new QLineEdit(this);
            QTextEdit textEdit = new QTextEdit(this);
            QPushButton btnOk = new QPushButton("Ok", this);
            QPushButton btnCancel = new QPushButton("Cancel", this);

            /*
             * In our scenario, the grid will have totally four columns and three rows. We would add
             * and make the widgets to span in the grid as needed.
             */

            //Add Name label at row 1 - Column 1
            grid.AddWidget(labelName, 0, 0);

            //Add line Edit at row 1 - Column 2 with row span 1 and column span 4
            grid.AddWidget(lineEdit, 0, 1 , 1, 3);

            //Add textEdit at row2 - column 1 with row span 1 and column span 4
            grid.AddWidget(textEdit, 1, 0, 1, 4);

            //Add a stretch at row 3 - column 2 to make the btn move right
            grid.SetColumnStretch(1, 1);

            //Add Ok Btn at row 3 - Column 3
            grid.AddWidget(btnOk, 2, 2);

            //Add Cancel Btn at row 3 - Column 4
            grid.AddWidget(btnCancel, 2, 3);
        }
Exemple #2
0
        public SourceWindow(QWidget parent, ClassItem klass) :
            base(parent, "", WidgetFlags.WType_TopLevel)
        {
            SetCaption(klass.Model.sourceFile.sourceFile);
            Resize(640, 480);

            QBoxLayout layout =
                new QBoxLayout(this, 0);

            editor = new QTextEdit(this);
            editor.SetTextFormat(TextFormat.PlainText);
            editor.SetReadOnly(true);
            editor.SetFamily("misc-fixed");
            editor.SetPointSize(13);
            editor.SetWordWrap(QTextEdit.WordWrap.NoWrap);
            layout.AddWidget(editor);

            int[] coverage = klass.Model.sourceFile.Coverage;

            StreamReader infile      = new StreamReader(klass.Model.sourceFile.sourceFile);
            int          pos         = 1;
            QColor       deadColor   = editor.Color();
            QColor       hitColor    = new QColor("blue");
            QColor       missedColor = new QColor("red");

            while (infile.Peek() > -1)
            {
                if (pos < coverage.Length)
                {
                    int count = coverage [pos];
                    if (count > 0)
                    {
                        editor.SetColor(hitColor);
                    }
                    else if (count == 0)
                    {
                        editor.SetColor(missedColor);
                    }
                    else
                    {
                        editor.SetColor(deadColor);
                    }
                }
                else
                {
                    editor.SetColor(deadColor);
                }
                editor.Append(String.Format("{0, 6}", pos) + "  " + infile.ReadLine());
                pos++;
            }
            editor.SetCursorPosition(0, 0);
        }
        private void InitUI()
        {
            QGridLayout grid = new QGridLayout (this);

            QLabel nameLabel = new QLabel ("Name", this);
            QLineEdit nameEdit = new QLineEdit (this);
            QTextEdit textEdit = new QTextEdit (this);

            QPushButton okButton = new QPushButton ("Ok", this);
            QPushButton closeButton = new QPushButton ("Close", this);

            grid.AddWidget (nameLabel, 0, 0);
            grid.AddWidget (nameEdit, 0, 1, 1, 3);
            grid.AddWidget (textEdit, 1, 0, 2, 4);
            grid.SetColumnStretch (1, 1);
            grid.AddWidget (okButton, 4, 2);
            grid.AddWidget (closeButton, 4, 3);
        }
Exemple #4
0
        private void InitUI()
        {
            QGridLayout grid = new QGridLayout(this);

            QLabel    nameLabel = new QLabel("Name", this);
            QLineEdit nameEdit  = new QLineEdit(this);
            QTextEdit textEdit  = new QTextEdit(this);

            QPushButton okButton    = new QPushButton("Ok", this);
            QPushButton closeButton = new QPushButton("Close", this);

            grid.AddWidget(nameLabel, 0, 0);
            grid.AddWidget(nameEdit, 0, 1, 1, 3);
            grid.AddWidget(textEdit, 1, 0, 2, 4);
            grid.SetColumnStretch(1, 1);
            grid.AddWidget(okButton, 4, 2);
            grid.AddWidget(closeButton, 4, 3);
        }
Exemple #5
0
        public SourceWindow(QWidget parent, ClassItem klass)
            : base(parent, "", WidgetFlags.WType_TopLevel)
        {
            SetCaption (klass.Model.sourceFile.sourceFile);
            Resize (640, 480);

            QBoxLayout layout =
            new QBoxLayout (this, 0);

            editor = new QTextEdit (this);
            editor.SetTextFormat (TextFormat.PlainText);
            editor.SetReadOnly (true);
            editor.SetFamily ("misc-fixed");
            editor.SetPointSize (13);
            editor.SetWordWrap (QTextEdit.WordWrap.NoWrap);
            layout.AddWidget (editor);

            int[] coverage = klass.Model.sourceFile.Coverage;

            StreamReader infile = new StreamReader (klass.Model.sourceFile.sourceFile);
            int pos = 1;
            QColor deadColor = editor.Color ();
            QColor hitColor = new QColor ("blue");
            QColor missedColor = new QColor ("red");
            while (infile.Peek () > -1) {
            if (pos < coverage.Length) {
                int count = coverage [pos];
                if (count > 0)
                    editor.SetColor (hitColor);
                else if (count == 0)
                    editor.SetColor (missedColor);
                else
                    editor.SetColor (deadColor);
            }
            else
                editor.SetColor (deadColor);
            editor.Append (String.Format ("{0, 6}", pos) + "  " + infile.ReadLine ());
            pos ++;
            }
            editor.SetCursorPosition (0, 0);
        }
Exemple #6
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);
        }
        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;
        }
Exemple #8
0
        public void HandleAccountAdded(Account account)
        {
            QApplication.Invoke(delegate {
                QTextEdit textEdit  = new QTextEdit(this);
                textEdit.FrameShape = QFrame.Shape.NoFrame;
                textEdit.ReadOnly   = true;

                QWidget widget = new QWidget();

                QVBoxLayout layout = new QVBoxLayout(widget);
                layout.Margin      = 0;
                layout.AddWidget(textEdit);

                m_XmlToolBox.AddItem(widget, account.Jid);

                m_AccountXmlWidgets.Add(account, widget);

                account.Client.OnWriteText += delegate(object sender, string txt) {
                    QApplication.Invoke(delegate {
                        if (enableConsoleCheckBox.Checked)
                        {
                            textEdit.Append("<b>" + Qt.Escape(txt) + "</b><br/>");
                        }
                    });
                };

                account.Client.OnReadText += delegate(object sender, string txt) {
                    QApplication.Invoke(delegate {
                        if (enableConsoleCheckBox.Checked)
                        {
                            textEdit.Append(Qt.Escape(txt) + "<br/>");
                        }
                    });
                };
            });
        }
        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;
        }
Exemple #10
0
    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.
    }
Exemple #11
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
Exemple #12
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);
    }
Exemple #13
0
        protected void SetupUi()
        {
            base.ObjectName  = "InsertSnippetDialog";
            this.Geometry    = new QRect(0, 0, 400, 300);
            this.WindowTitle = "Insert Code Snippet";
            QVBoxLayout verticalLayout;

            verticalLayout        = new QVBoxLayout(this);
            verticalLayout.Margin = 6;
            QGridLayout gridLayout;

            gridLayout = new QGridLayout();
            verticalLayout.AddLayout(gridLayout);
            this.label            = new QLabel(this);
            this.label.ObjectName = "label";
            this.label.Text       = "Type:";
            gridLayout.AddWidget(this.label, 1, 0, 1, 1);
            this.typeComboBox            = new QComboBox(this);
            this.typeComboBox.ObjectName = "typeComboBox";
            gridLayout.AddWidget(this.typeComboBox, 1, 1, 1, 1);
            QSpacerItem horizontalSpacer;

            horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum);
            gridLayout.AddItem(horizontalSpacer, 1, 2, 1, 1);
            this.label_2            = new QLabel(this);
            this.label_2.ObjectName = "label_2";
            this.label_2.Text       = "To:";
            gridLayout.AddWidget(this.label_2, 0, 0, 1, 1);
            this.toLabel            = new QLabel(this);
            this.toLabel.ObjectName = "toLabel";
            this.toLabel.Text       = "";
            gridLayout.AddWidget(this.toLabel, 0, 1, 1, 1);
            QSpacerItem horizontalSpacer_3;

            horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum);
            gridLayout.AddItem(horizontalSpacer_3, 0, 2, 1, 1);
            this.tabWidget              = new QTabWidget(this);
            this.tabWidget.ObjectName   = "tabWidget";
            this.tabWidget.CurrentIndex = 0;
            verticalLayout.AddWidget(this.tabWidget);
            this.tab_3            = new QWidget(this.tabWidget);
            this.tab_3.ObjectName = "tab_3";
            QHBoxLayout horizontalLayout;

            horizontalLayout         = new QHBoxLayout(this.tab_3);
            horizontalLayout.Spacing = 0;
            horizontalLayout.Margin  = 0;
            this.textEdit            = new QTextEdit(this.tab_3);
            this.textEdit.ObjectName = "textEdit";
            this.textEdit.FrameShape = QFrame.Shape.NoFrame;
            horizontalLayout.AddWidget(this.textEdit);
            this.tabWidget.AddTab(this.tab_3, "Paste");
            this.tab_4            = new QWidget(this.tabWidget);
            this.tab_4.ObjectName = "tab_4";
            QHBoxLayout horizontalLayout_2;

            horizontalLayout_2         = new QHBoxLayout(this.tab_4);
            horizontalLayout_2.Spacing = 0;
            horizontalLayout_2.Margin  = 0;
            this.webView            = new QWebView(this.tab_4);
            this.webView.ObjectName = "webView";
            this.webView.Url        = new QUrl("about:blank");
            horizontalLayout_2.AddWidget(this.webView);
            this.tabWidget.AddTab(this.tab_4, "Preview");
            QHBoxLayout horizontalLayout_3;

            horizontalLayout_3 = new QHBoxLayout();
            verticalLayout.AddLayout(horizontalLayout_3);
            this.pushButton            = new QPushButton(this);
            this.pushButton.ObjectName = "pushButton";
            this.pushButton.Text       = "Import File...";
            horizontalLayout_3.AddWidget(this.pushButton);
            QSpacerItem horizontalSpacer_2;

            horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum);
            horizontalLayout_3.AddItem(horizontalSpacer_2);
            this.buttonBox                 = new QDialogButtonBox(this);
            this.buttonBox.ObjectName      = "buttonBox";
            this.buttonBox.StandardButtons = global::Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "NoButton");
            horizontalLayout_3.AddWidget(this.buttonBox);
            QObject.Connect(buttonBox, Qt.SIGNAL("accepted()"), this, Qt.SLOT("accept()"));
            QObject.Connect(buttonBox,Qt.SIGNAL("rejected()"),this,Qt.SLOT("reject()"));
            QMetaObject.ConnectSlotsByName(this);
        }
Exemple #14
0
        protected void SetupUi()
        {
            base.ObjectName  = "EditProfileDialog";
            this.Geometry    = new QRect(0, 0, 605, 459);
            this.WindowTitle = "Edit Profile";
            QVBoxLayout verticalLayout;

            verticalLayout                  = new QVBoxLayout(this);
            verticalLayout.Margin           = 6;
            this.mainTabWidget              = new QTabWidget(this);
            this.mainTabWidget.ObjectName   = "mainTabWidget";
            this.mainTabWidget.CurrentIndex = 0;
            verticalLayout.AddWidget(this.mainTabWidget);
            this.tab            = new QWidget(this.mainTabWidget);
            this.tab.ObjectName = "tab";
            this.tab.Enabled    = false;
            QHBoxLayout horizontalLayout;

            horizontalLayout        = new QHBoxLayout(this.tab);
            horizontalLayout.Margin = 6;
            this.widget             = new QWidget(this.tab);
            this.widget.ObjectName  = "widget";
            QSizePolicy widget_sizePolicy;

            widget_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Preferred);
            widget_sizePolicy.SetVerticalStretch(0);
            widget_sizePolicy.SetHorizontalStretch(0);
            widget_sizePolicy.SetHeightForWidth(this.widget.SizePolicy.HasHeightForWidth());
            this.widget.SizePolicy = widget_sizePolicy;
            QVBoxLayout verticalLayout_2;

            verticalLayout_2           = new QVBoxLayout(this.widget);
            verticalLayout_2.Margin    = 0;
            this.groupBox_2            = new QGroupBox(this.widget);
            this.groupBox_2.ObjectName = "groupBox_2";
            QSizePolicy groupBox_2_sizePolicy;

            groupBox_2_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Preferred);
            groupBox_2_sizePolicy.SetVerticalStretch(0);
            groupBox_2_sizePolicy.SetHorizontalStretch(0);
            groupBox_2_sizePolicy.SetHeightForWidth(this.groupBox_2.SizePolicy.HasHeightForWidth());
            this.groupBox_2.SizePolicy = groupBox_2_sizePolicy;
            this.groupBox_2.Title      = "Basic Information";
            QFormLayout formLayout_2;

            formLayout_2 = new QFormLayout(this.groupBox_2);
            formLayout_2.fieldGrowthPolicy = QFormLayout.FieldGrowthPolicy.AllNonFixedFieldsGrow;
            formLayout_2.SetContentsMargins(6, 12, 6, 0);
            this.label_9            = new QLabel(this.groupBox_2);
            this.label_9.ObjectName = "label_9";
            this.label_9.Text       = "Full Name:";
            formLayout_2.SetWidget(0, QFormLayout.ItemRole.LabelRole, this.label_9);
            this.fullNameLineEdit            = new QLineEdit(this.groupBox_2);
            this.fullNameLineEdit.ObjectName = "fullNameLineEdit";
            formLayout_2.SetWidget(0, QFormLayout.ItemRole.FieldRole, this.fullNameLineEdit);
            this.label_10            = new QLabel(this.groupBox_2);
            this.label_10.ObjectName = "label_10";
            this.label_10.Text       = "Nickname:";
            formLayout_2.SetWidget(1, QFormLayout.ItemRole.LabelRole, this.label_10);
            this.nicknameLineEdit            = new QLineEdit(this.groupBox_2);
            this.nicknameLineEdit.ObjectName = "nicknameLineEdit";
            formLayout_2.SetWidget(1, QFormLayout.ItemRole.FieldRole, this.nicknameLineEdit);
            this.label_14            = new QLabel(this.groupBox_2);
            this.label_14.ObjectName = "label_14";
            this.label_14.Text       = "Birthday:";
            formLayout_2.SetWidget(2, QFormLayout.ItemRole.LabelRole, this.label_14);
            this.birthdayDateEdit               = new QDateEdit(this.groupBox_2);
            this.birthdayDateEdit.ObjectName    = "birthdayDateEdit";
            this.birthdayDateEdit.DisplayFormat = "M/d/yyyy";
            this.birthdayDateEdit.CalendarPopup = true;
            formLayout_2.SetWidget(2, QFormLayout.ItemRole.FieldRole, this.birthdayDateEdit);
            this.label_11            = new QLabel(this.groupBox_2);
            this.label_11.ObjectName = "label_11";
            this.label_11.Text       = "Website:";
            formLayout_2.SetWidget(3, QFormLayout.ItemRole.LabelRole, this.label_11);
            this.websiteLineEdit            = new QLineEdit(this.groupBox_2);
            this.websiteLineEdit.ObjectName = "websiteLineEdit";
            formLayout_2.SetWidget(3, QFormLayout.ItemRole.FieldRole, this.websiteLineEdit);
            verticalLayout_2.AddWidget(this.groupBox_2);
            this.groupBox_5            = new QGroupBox(this.widget);
            this.groupBox_5.ObjectName = "groupBox_5";
            this.groupBox_5.Title      = "About Me";
            this.groupBox_5.Flat       = false;
            this.groupBox_5.Checkable  = false;
            QHBoxLayout horizontalLayout_3;

            horizontalLayout_3 = new QHBoxLayout(this.groupBox_5);
            horizontalLayout_3.SetContentsMargins(6, 12, 6, 6);
            this.bioTextEdit            = new QTextEdit(this.groupBox_5);
            this.bioTextEdit.ObjectName = "bioTextEdit";
            horizontalLayout_3.AddWidget(this.bioTextEdit);
            verticalLayout_2.AddWidget(this.groupBox_5);
            horizontalLayout.AddWidget(this.widget);
            this.groupBox_4            = new QGroupBox(this.tab);
            this.groupBox_4.ObjectName = "groupBox_4";
            QSizePolicy groupBox_4_sizePolicy;

            groupBox_4_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Preferred);
            groupBox_4_sizePolicy.SetVerticalStretch(0);
            groupBox_4_sizePolicy.SetHorizontalStretch(0);
            groupBox_4_sizePolicy.SetHeightForWidth(this.groupBox_4.SizePolicy.HasHeightForWidth());
            this.groupBox_4.SizePolicy = groupBox_4_sizePolicy;
            this.groupBox_4.Title      = "Contact Information";
            QFormLayout formLayout_3;

            formLayout_3 = new QFormLayout(this.groupBox_4);
            formLayout_3.SetContentsMargins(6, 12, 6, 6);
            this.label_12            = new QLabel(this.groupBox_4);
            this.label_12.ObjectName = "label_12";
            this.label_12.Text       = "Email:";
            formLayout_3.SetWidget(0, QFormLayout.ItemRole.LabelRole, this.label_12);
            this.lineEdit_9            = new QLineEdit(this.groupBox_4);
            this.lineEdit_9.ObjectName = "lineEdit_9";
            formLayout_3.SetWidget(0, QFormLayout.ItemRole.FieldRole, this.lineEdit_9);
            this.label_13            = new QLabel(this.groupBox_4);
            this.label_13.ObjectName = "label_13";
            this.label_13.Text       = "Phone:";
            formLayout_3.SetWidget(1, QFormLayout.ItemRole.LabelRole, this.label_13);
            this.lineEdit_11            = new QLineEdit(this.groupBox_4);
            this.lineEdit_11.ObjectName = "lineEdit_11";
            formLayout_3.SetWidget(1, QFormLayout.ItemRole.FieldRole, this.lineEdit_11);
            this.label_15            = new QLabel(this.groupBox_4);
            this.label_15.ObjectName = "label_15";
            this.label_15.Text       = "Address:";
            formLayout_3.SetWidget(2, QFormLayout.ItemRole.LabelRole, this.label_15);
            this.lineEdit_12            = new QLineEdit(this.groupBox_4);
            this.lineEdit_12.ObjectName = "lineEdit_12";
            formLayout_3.SetWidget(2, QFormLayout.ItemRole.FieldRole, this.lineEdit_12);
            this.label_16            = new QLabel(this.groupBox_4);
            this.label_16.ObjectName = "label_16";
            this.label_16.Text       = "City/Town:";
            formLayout_3.SetWidget(3, QFormLayout.ItemRole.LabelRole, this.label_16);
            this.lineEdit_13            = new QLineEdit(this.groupBox_4);
            this.lineEdit_13.ObjectName = "lineEdit_13";
            formLayout_3.SetWidget(3, QFormLayout.ItemRole.FieldRole, this.lineEdit_13);
            this.label_23            = new QLabel(this.groupBox_4);
            this.label_23.ObjectName = "label_23";
            this.label_23.Text       = "State:";
            formLayout_3.SetWidget(4, QFormLayout.ItemRole.LabelRole, this.label_23);
            this.lineEdit_21            = new QLineEdit(this.groupBox_4);
            this.lineEdit_21.ObjectName = "lineEdit_21";
            formLayout_3.SetWidget(4, QFormLayout.ItemRole.FieldRole, this.lineEdit_21);
            this.label_17            = new QLabel(this.groupBox_4);
            this.label_17.ObjectName = "label_17";
            this.label_17.Text       = "Zip:";
            formLayout_3.SetWidget(5, QFormLayout.ItemRole.LabelRole, this.label_17);
            this.lineEdit_14            = new QLineEdit(this.groupBox_4);
            this.lineEdit_14.ObjectName = "lineEdit_14";
            formLayout_3.SetWidget(5, QFormLayout.ItemRole.FieldRole, this.lineEdit_14);
            this.label_18            = new QLabel(this.groupBox_4);
            this.label_18.ObjectName = "label_18";
            this.label_18.Text       = "Country:";
            formLayout_3.SetWidget(6, QFormLayout.ItemRole.LabelRole, this.label_18);
            this.lineEdit_15            = new QLineEdit(this.groupBox_4);
            this.lineEdit_15.ObjectName = "lineEdit_15";
            formLayout_3.SetWidget(6, QFormLayout.ItemRole.FieldRole, this.lineEdit_15);
            horizontalLayout.AddWidget(this.groupBox_4);
            this.mainTabWidget.AddTab(this.tab, "Personal Information");
            this.tab_4            = new QWidget(this.mainTabWidget);
            this.tab_4.ObjectName = "tab_4";
            this.tab_4.Enabled    = false;
            QHBoxLayout horizontalLayout_5;

            horizontalLayout_5         = new QHBoxLayout(this.tab_4);
            horizontalLayout_5.Margin  = 6;
            this.groupBox_6            = new QGroupBox(this.tab_4);
            this.groupBox_6.ObjectName = "groupBox_6";
            QSizePolicy groupBox_6_sizePolicy;

            groupBox_6_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Preferred);
            groupBox_6_sizePolicy.SetVerticalStretch(0);
            groupBox_6_sizePolicy.SetHorizontalStretch(0);
            groupBox_6_sizePolicy.SetHeightForWidth(this.groupBox_6.SizePolicy.HasHeightForWidth());
            this.groupBox_6.SizePolicy = groupBox_6_sizePolicy;
            this.groupBox_6.Title      = "Company Information";
            QFormLayout formLayout_4;

            formLayout_4 = new QFormLayout(this.groupBox_6);
            formLayout_4.SetContentsMargins(6, 12, 6, 0);
            this.label            = new QLabel(this.groupBox_6);
            this.label.ObjectName = "label";
            this.label.Text       = "Company:";
            formLayout_4.SetWidget(0, QFormLayout.ItemRole.LabelRole, this.label);
            this.workCompanyLineEdit            = new QLineEdit(this.groupBox_6);
            this.workCompanyLineEdit.ObjectName = "workCompanyLineEdit";
            formLayout_4.SetWidget(0, QFormLayout.ItemRole.FieldRole, this.workCompanyLineEdit);
            this.label_6            = new QLabel(this.groupBox_6);
            this.label_6.ObjectName = "label_6";
            this.label_6.Text       = "Department:";
            formLayout_4.SetWidget(1, QFormLayout.ItemRole.LabelRole, this.label_6);
            this.workDepartmentLineEdit            = new QLineEdit(this.groupBox_6);
            this.workDepartmentLineEdit.ObjectName = "workDepartmentLineEdit";
            formLayout_4.SetWidget(1, QFormLayout.ItemRole.FieldRole, this.workDepartmentLineEdit);
            this.label_7            = new QLabel(this.groupBox_6);
            this.label_7.ObjectName = "label_7";
            this.label_7.Text       = "Position:";
            formLayout_4.SetWidget(2, QFormLayout.ItemRole.LabelRole, this.label_7);
            this.workPositionLineEdit            = new QLineEdit(this.groupBox_6);
            this.workPositionLineEdit.ObjectName = "workPositionLineEdit";
            formLayout_4.SetWidget(2, QFormLayout.ItemRole.FieldRole, this.workPositionLineEdit);
            horizontalLayout_5.AddWidget(this.groupBox_6);
            this.groupBox            = new QGroupBox(this.tab_4);
            this.groupBox.ObjectName = "groupBox";
            QSizePolicy groupBox_sizePolicy;

            groupBox_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Preferred);
            groupBox_sizePolicy.SetVerticalStretch(0);
            groupBox_sizePolicy.SetHorizontalStretch(0);
            groupBox_sizePolicy.SetHeightForWidth(this.groupBox.SizePolicy.HasHeightForWidth());
            this.groupBox.SizePolicy = groupBox_sizePolicy;
            this.groupBox.Title      = "Contact Information";
            QFormLayout formLayout;

            formLayout = new QFormLayout(this.groupBox);
            formLayout.fieldGrowthPolicy = QFormLayout.FieldGrowthPolicy.AllNonFixedFieldsGrow;
            formLayout.SetContentsMargins(6, 12, 6, 0);
            this.label_8            = new QLabel(this.groupBox);
            this.label_8.ObjectName = "label_8";
            this.label_8.Text       = "Email:";
            formLayout.SetWidget(0, QFormLayout.ItemRole.LabelRole, this.label_8);
            this.workEmailLineEdit            = new QLineEdit(this.groupBox);
            this.workEmailLineEdit.ObjectName = "workEmailLineEdit";
            formLayout.SetWidget(0, QFormLayout.ItemRole.FieldRole, this.workEmailLineEdit);
            this.label_21            = new QLabel(this.groupBox);
            this.label_21.ObjectName = "label_21";
            this.label_21.Text       = "Address:";
            formLayout.SetWidget(2, QFormLayout.ItemRole.LabelRole, this.label_21);
            this.workAddressLineEdit            = new QLineEdit(this.groupBox);
            this.workAddressLineEdit.ObjectName = "workAddressLineEdit";
            formLayout.SetWidget(2, QFormLayout.ItemRole.FieldRole, this.workAddressLineEdit);
            this.label_19            = new QLabel(this.groupBox);
            this.label_19.ObjectName = "label_19";
            this.label_19.Text       = "City/Town:";
            formLayout.SetWidget(3, QFormLayout.ItemRole.LabelRole, this.label_19);
            this.workCityLineEdit            = new QLineEdit(this.groupBox);
            this.workCityLineEdit.ObjectName = "workCityLineEdit";
            formLayout.SetWidget(3, QFormLayout.ItemRole.FieldRole, this.workCityLineEdit);
            this.label_24            = new QLabel(this.groupBox);
            this.label_24.ObjectName = "label_24";
            this.label_24.Text       = "State:";
            formLayout.SetWidget(4, QFormLayout.ItemRole.LabelRole, this.label_24);
            this.workStateLineEdit            = new QLineEdit(this.groupBox);
            this.workStateLineEdit.ObjectName = "workStateLineEdit";
            formLayout.SetWidget(4, QFormLayout.ItemRole.FieldRole, this.workStateLineEdit);
            this.label_20            = new QLabel(this.groupBox);
            this.label_20.ObjectName = "label_20";
            this.label_20.Text       = "Zip:";
            formLayout.SetWidget(5, QFormLayout.ItemRole.LabelRole, this.label_20);
            this.workZipLineEdit            = new QLineEdit(this.groupBox);
            this.workZipLineEdit.ObjectName = "workZipLineEdit";
            formLayout.SetWidget(5, QFormLayout.ItemRole.FieldRole, this.workZipLineEdit);
            this.label_22            = new QLabel(this.groupBox);
            this.label_22.ObjectName = "label_22";
            this.label_22.Text       = "Country:";
            formLayout.SetWidget(6, QFormLayout.ItemRole.LabelRole, this.label_22);
            this.workCountryLineEdit            = new QLineEdit(this.groupBox);
            this.workCountryLineEdit.ObjectName = "workCountryLineEdit";
            formLayout.SetWidget(6, QFormLayout.ItemRole.FieldRole, this.workCountryLineEdit);
            this.label_2            = new QLabel(this.groupBox);
            this.label_2.ObjectName = "label_2";
            this.label_2.Text       = "Phone:";
            formLayout.SetWidget(1, QFormLayout.ItemRole.LabelRole, this.label_2);
            this.workPhoneLineEdit            = new QLineEdit(this.groupBox);
            this.workPhoneLineEdit.ObjectName = "workPhoneLineEdit";
            formLayout.SetWidget(1, QFormLayout.ItemRole.FieldRole, this.workPhoneLineEdit);
            horizontalLayout_5.AddWidget(this.groupBox);
            this.mainTabWidget.AddTab(this.tab_4, "Work Information");
            this.tab_2            = new QWidget(this.mainTabWidget);
            this.tab_2.ObjectName = "tab_2";
            QHBoxLayout horizontalLayout_2;

            horizontalLayout_2        = new QHBoxLayout(this.tab_2);
            horizontalLayout_2.Margin = 6;
            QVBoxLayout verticalLayout_4;

            verticalLayout_4 = new QVBoxLayout();
            horizontalLayout_2.AddLayout(verticalLayout_4);
            verticalLayout_4.sizeConstraint = QLayout.SizeConstraint.SetMinimumSize;
            this.label_4            = new QLabel(this.tab_2);
            this.label_4.ObjectName = "label_4";
            this.label_4.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;\">Your Avatar:</span></p></body></html>";
            verticalLayout_4.AddWidget(this.label_4);
            this.avatarLabel             = new QLabel(this.tab_2);
            this.avatarLabel.ObjectName  = "avatarLabel";
            this.avatarLabel.MinimumSize = new QSize(48, 96);
            this.avatarLabel.FrameShape  = QFrame.Shape.StyledPanel;
            this.avatarLabel.FrameShadow = QFrame.Shadow.Raised;
            this.avatarLabel.Text        = "";
            this.avatarLabel.Alignment   = global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignCenter");
            verticalLayout_4.AddWidget(this.avatarLabel);
            this.avatarBrowseButton            = new QPushButton(this.tab_2);
            this.avatarBrowseButton.ObjectName = "avatarBrowseButton";
            this.avatarBrowseButton.Text       = "Select File...";
            verticalLayout_4.AddWidget(this.avatarBrowseButton);
            this.clearAvatarButton            = new QPushButton(this.tab_2);
            this.clearAvatarButton.ObjectName = "clearAvatarButton";
            this.clearAvatarButton.Text       = "Clear";
            verticalLayout_4.AddWidget(this.clearAvatarButton);
            QSpacerItem verticalSpacer;

            verticalSpacer = new QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding);
            verticalLayout_4.AddItem(verticalSpacer);
            this.line_2             = new QFrame(this.tab_2);
            this.line_2.ObjectName  = "line_2";
            this.line_2.FrameShape  = QFrame.Shape.VLine;
            this.line_2.FrameShadow = QFrame.Shadow.Sunken;
            horizontalLayout_2.AddWidget(this.line_2);
            QVBoxLayout verticalLayout_5;

            verticalLayout_5 = new QVBoxLayout();
            horizontalLayout_2.AddLayout(verticalLayout_5);
            QGridLayout gridLayout_2;

            gridLayout_2 = new QGridLayout();
            verticalLayout_5.AddLayout(gridLayout_2);
            this.label_5            = new QLabel(this.tab_2);
            this.label_5.ObjectName = "label_5";
            this.label_5.Text       = "Search:";
            gridLayout_2.AddWidget(this.label_5, 0, 0, 1, 1);
            this.avatarSearchLineEdit            = new QLineEdit(this.tab_2);
            this.avatarSearchLineEdit.ObjectName = "avatarSearchLineEdit";
            gridLayout_2.AddWidget(this.avatarSearchLineEdit, 0, 1, 1, 1);
            this.avatarSearchButton            = new QPushButton(this.tab_2);
            this.avatarSearchButton.ObjectName = "avatarSearchButton";
            this.avatarSearchButton.Text       = "Search";
            this.avatarSearchButton.Default    = true;
            gridLayout_2.AddWidget(this.avatarSearchButton, 0, 2, 1, 1);
            this.avatarTabWidget              = new QTabWidget(this.tab_2);
            this.avatarTabWidget.ObjectName   = "avatarTabWidget";
            this.avatarTabWidget.CurrentIndex = -1;
            verticalLayout_5.AddWidget(this.avatarTabWidget);
            this.mainTabWidget.AddTab(this.tab_2, "Avatar");
            this.tab_3            = new QWidget(this.mainTabWidget);
            this.tab_3.ObjectName = "tab_3";
            QVBoxLayout verticalLayout_3;

            verticalLayout_3           = new QVBoxLayout(this.tab_3);
            verticalLayout_3.Margin    = 0;
            this.scrollArea            = new QScrollArea(this.tab_3);
            this.scrollArea.ObjectName = "scrollArea";
            this.scrollArea.StyleSheet = "background: palette(base);";
            this.scrollArea.FrameShape = QFrame.Shape.NoFrame;
            this.scrollArea.HorizontalScrollBarPolicy = Qt.ScrollBarPolicy.ScrollBarAlwaysOff;
            this.scrollArea.WidgetResizable           = true;
            this.scrollArea.Alignment = ((global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignLeading") | global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignLeft")) | global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignTop"));
            verticalLayout_3.AddWidget(this.scrollArea);
            this.webIdentitiesContainer            = new QWidget(this.scrollArea);
            this.webIdentitiesContainer.ObjectName = "webIdentitiesContainer";
            this.webIdentitiesContainer.Geometry   = new QRect(0, 0, 589, 376);
            QVBoxLayout verticalLayout_6;

            verticalLayout_6        = new QVBoxLayout(this.webIdentitiesContainer);
            verticalLayout_6.Margin = 6;
            QSpacerItem verticalSpacer_2;

            verticalSpacer_2 = new QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding);
            verticalLayout_6.AddItem(verticalSpacer_2);
            this.scrollArea.SetWidget(this.webIdentitiesContainer);
            this.mainTabWidget.AddTab(this.tab_3, "Web Identities");
            this.buttonBox                 = new QDialogButtonBox(this);
            this.buttonBox.ObjectName      = "buttonBox";
            this.buttonBox.StandardButtons = (global::Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Cancel") | global::Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Ok"));
            verticalLayout.AddWidget(this.buttonBox);
            QObject.Connect(buttonBox, Qt.SIGNAL("rejected()"), this, Qt.SLOT("reject()"));
            QObject.Connect(buttonBox,Qt.SIGNAL("accepted()"),this,Qt.SLOT("accept()"));
            QMetaObject.ConnectSlotsByName(this);
            this.label_5.SetBuddy(avatarSearchLineEdit);
        }
Exemple #15
0
    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.
    }