Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
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
Ejemplo n.º 4
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);
    }
Ejemplo n.º 5
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);
        }
Ejemplo n.º 6
0
        public void SetupUi(QWidget LifetimeConstraintWidget)
        {
            if (LifetimeConstraintWidget.ObjectName == "")
            {
                LifetimeConstraintWidget.ObjectName = "LifetimeConstraintWidget";
            }
            QSize Size = new QSize(283, 48);

            Size = Size.ExpandedTo(LifetimeConstraintWidget.MinimumSizeHint);
            LifetimeConstraintWidget.Size = Size;
            horizontalLayout = new QHBoxLayout(LifetimeConstraintWidget);
            horizontalLayout.SetContentsMargins(0, 0, 0, 0);
            horizontalLayout.ObjectName     = "horizontalLayout";
            horizontalLayout.sizeConstraint = QLayout.SizeConstraint.SetNoConstraint;
            mCheckBox            = new QCheckBox(LifetimeConstraintWidget);
            mCheckBox.ObjectName = "mCheckBox";
            QSizePolicy sizePolicy = new QSizePolicy(QSizePolicy.Policy.Fixed, QSizePolicy.Policy.Fixed);

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

            horizontalLayout.AddWidget(mCheckBox);

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

            horizontalLayout.AddWidget(mLineEdit);

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

            horizontalLayout.AddWidget(mSecondsLable);

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

            horizontalLayout.AddItem(spacerItem);


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

            QMetaObject.ConnectSlotsByName(LifetimeConstraintWidget);
        } // SetupUi
Ejemplo n.º 7
0
 /// <summary>
 /// Remove the current association. You should call this before the
 /// text box is destroyed.
 /// </summary>
 public void Detach()
 {
     if (mPasswordLineEdit != null)
     {
         mPasswordLineEdit.TextChanged  -= mPasswordLineEdit_TextChanged;
         mPasswordLineEdit.FocusInEvent -= mPasswordLineEdit_FocusInEvent;
         if (!mSecureDesktop)
         {
             mPasswordLineEdit.DragEnterEvent -= mPasswordLineEdit_DragEnterEvent;
             mPasswordLineEdit.DragMoveEvent  -= mPasswordLineEdit_DragMoveEvent;
             mPasswordLineEdit.DropEvent      -= mPasswordLineEdit_DropEvent;
         }
         mPasswordLineEdit = null;
     }
 }
Ejemplo n.º 8
0
        public override void InitUI()
        {
            this.Layout = new QHBoxLayout();
            QPushButton button = new QPushButton("Dialog", this);

            button.Clicked += Show_Clicked;

            button.FocusPolicy = QtCore.Qt.FocusPolicy.NoFocus;
            this.Layout.AddWidget(button);
            //show.Move( 20, 20 );

            edit = new QLineEdit(this);
            //edit.Move( 130, 22 );
            this.Layout.AddWidget(edit);
        }
        public void SetupUi(QWidget LifetimeConstraintWidget)
        {
            if (LifetimeConstraintWidget.ObjectName == "")
            LifetimeConstraintWidget.ObjectName = "LifetimeConstraintWidget";
            QSize Size = new QSize(283, 48);
            Size = Size.ExpandedTo(LifetimeConstraintWidget.MinimumSizeHint);
            LifetimeConstraintWidget.Size = Size;
            horizontalLayout = new QHBoxLayout(LifetimeConstraintWidget);
            horizontalLayout.SetContentsMargins(0, 0, 0, 0);
            horizontalLayout.ObjectName = "horizontalLayout";
            horizontalLayout.sizeConstraint = QLayout.SizeConstraint.SetNoConstraint;
            mCheckBox = new QCheckBox(LifetimeConstraintWidget);
            mCheckBox.ObjectName = "mCheckBox";
            QSizePolicy sizePolicy = new QSizePolicy(QSizePolicy.Policy.Fixed, QSizePolicy.Policy.Fixed);
            sizePolicy.SetHorizontalStretch(0);
            sizePolicy.SetVerticalStretch(0);
            sizePolicy.SetHeightForWidth(mCheckBox.SizePolicy.HasHeightForWidth);
            mCheckBox.SizePolicy = sizePolicy;

            horizontalLayout.AddWidget(mCheckBox);

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

            horizontalLayout.AddWidget(mLineEdit);

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

            horizontalLayout.AddWidget(mSecondsLable);

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

            horizontalLayout.AddItem(spacerItem);

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

            QMetaObject.ConnectSlotsByName(LifetimeConstraintWidget);
        }
Ejemplo n.º 10
0
        /// <summary>
        /// Associate the current secure edit object with a text box.
        /// </summary>
        /// <param name="aLineEdit">Text box to link to.</param>
        /// <param name="aHidePassword">Initial protection flag.</param>
        public void Attach(QLineEdit aLineEdit, bool aHidePassword)
        {
            Debug.Assert(aLineEdit != null);
            if (aLineEdit == null)
            {
                throw new ArgumentNullException("aLineEdit");
            }

            this.Detach();

            mPasswordLineEdit = aLineEdit;

            // Initialize to zero-length string
            mPasswordLineEdit.Text = string.Empty;

            if (mSecureString != null)
            {
                mSecureString.Clear();
            }
            else
            {
                mAltSecureString.Clear();
                mAltSecureString.Data = new char[0];
            }

            EnableProtection(aHidePassword);

            if (mTextChangedEventHandler != null)
            {
                mTextChangedEventHandler(mPasswordLineEdit, EventArgs.Empty);
            }

            if (!mSecureDesktop)
            {
                mPasswordLineEdit.AcceptDrops = true;
            }

            // Register event handler
            mPasswordLineEdit.TextChanged  += mPasswordLineEdit_TextChanged;
            mPasswordLineEdit.FocusInEvent += mPasswordLineEdit_FocusInEvent;
            if (!mSecureDesktop)
            {
                mPasswordLineEdit.DragEnterEvent += mPasswordLineEdit_DragEnterEvent;
                mPasswordLineEdit.DragMoveEvent  += mPasswordLineEdit_DragMoveEvent;
                mPasswordLineEdit.DropEvent      += mPasswordLineEdit_DropEvent;
            }
        }
Ejemplo n.º 11
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);
        }
Ejemplo n.º 12
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);
        }
Ejemplo n.º 13
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);
        }
Ejemplo n.º 14
0
        protected void SetupUi()
        {
            base.ObjectName  = "EditGroupsWidget";
            this.Geometry    = new QRect(0, 0, 212, 239);
            this.WindowTitle = "EditGroupsWidget";
            QVBoxLayout verticalLayout;

            verticalLayout             = new QVBoxLayout(this);
            verticalLayout.Spacing     = 3;
            verticalLayout.Margin      = 0;
            this.listWidget            = new QListWidget(this);
            this.listWidget.ObjectName = "listWidget";
            QSizePolicy listWidget_sizePolicy;

            listWidget_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding);
            listWidget_sizePolicy.SetVerticalStretch(0);
            listWidget_sizePolicy.SetHorizontalStretch(0);
            listWidget_sizePolicy.SetHeightForWidth(this.listWidget.SizePolicy.HasHeightForWidth());
            this.listWidget.SizePolicy  = listWidget_sizePolicy;
            this.listWidget.MinimumSize = new QSize(0, 50);
            this.listWidget.FrameShape  = QFrame.Shape.NoFrame;
            verticalLayout.AddWidget(this.listWidget);
            QGridLayout gridLayout;

            gridLayout = new QGridLayout();
            verticalLayout.AddLayout(gridLayout);
            this.label_2            = new QLabel(this);
            this.label_2.ObjectName = "label_2";
            this.label_2.Text       = "Add Group:";
            gridLayout.AddWidget(this.label_2, 0, 0, 1, 1);
            this.lineEdit            = new QLineEdit(this);
            this.lineEdit.ObjectName = "lineEdit";
            gridLayout.AddWidget(this.lineEdit, 0, 1, 1, 1);
            this.addButton            = new QPushButton(this);
            this.addButton.ObjectName = "addButton";
            this.addButton.Text       = "";
            gridLayout.AddWidget(this.addButton, 0, 2, 1, 1);
            QMetaObject.ConnectSlotsByName(this);
        }
        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);
        } // SetupUi
Ejemplo n.º 16
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();
        }
Ejemplo n.º 17
0
        protected void SetupUi()
        {
            base.ObjectName  = "InsertLinkDialog";
            this.Geometry    = new QRect(0, 0, 287, 110);
            this.WindowTitle = "Insert Link";
            QVBoxLayout verticalLayout;

            verticalLayout        = new QVBoxLayout(this);
            verticalLayout.Margin = 6;
            QFormLayout formLayout;

            formLayout = new QFormLayout();
            verticalLayout.AddLayout(formLayout);
            this.label_2            = new QLabel(this);
            this.label_2.ObjectName = "label_2";
            this.label_2.Text       = "URL:";
            formLayout.SetWidget(0, QFormLayout.ItemRole.LabelRole, this.label_2);
            this.urlLineEdit            = new QLineEdit(this);
            this.urlLineEdit.ObjectName = "urlLineEdit";
            formLayout.SetWidget(0, QFormLayout.ItemRole.FieldRole, this.urlLineEdit);
            this.label            = new QLabel(this);
            this.label.ObjectName = "label";
            this.label.Text       = "Text:";
            formLayout.SetWidget(1, QFormLayout.ItemRole.LabelRole, this.label);
            this.textLineEdit            = new QLineEdit(this);
            this.textLineEdit.ObjectName = "textLineEdit";
            formLayout.SetWidget(1, QFormLayout.ItemRole.FieldRole, this.textLineEdit);
            this.buttonBox                 = new QDialogButtonBox(this);
            this.buttonBox.ObjectName      = "buttonBox";
            this.buttonBox.Orientation     = Qt.Orientation.Horizontal;
            this.buttonBox.StandardButtons = (global::Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Cancel") | global::Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Ok"));
            verticalLayout.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);
        }
Ejemplo n.º 18
0
 /// <summary>
 /// Remove the current association. You should call this before the
 /// text box is destroyed.
 /// </summary>
 public void Detach()
 {
     if (mPasswordLineEdit != null) {
     mPasswordLineEdit.TextChanged -= mPasswordLineEdit_TextChanged;
     mPasswordLineEdit.FocusInEvent -= mPasswordLineEdit_FocusInEvent;
     if (!mSecureDesktop) {
       mPasswordLineEdit.DragEnterEvent -= mPasswordLineEdit_DragEnterEvent;
       mPasswordLineEdit.DragMoveEvent -= mPasswordLineEdit_DragMoveEvent;
       mPasswordLineEdit.DropEvent -= mPasswordLineEdit_DropEvent;
     }
     mPasswordLineEdit = null;
       }
 }
Ejemplo n.º 19
0
        /// <summary>
        /// Associate the current secure edit object with a text box.
        /// </summary>
        /// <param name="aLineEdit">Text box to link to.</param>
        /// <param name="aHidePassword">Initial protection flag.</param>
        public void Attach(QLineEdit aLineEdit, bool aHidePassword)
        {
            Debug.Assert(aLineEdit != null);
              if (aLineEdit == null) {
            throw new ArgumentNullException("aLineEdit");
              }

              this.Detach();

              mPasswordLineEdit = aLineEdit;

              // Initialize to zero-length string
              mPasswordLineEdit.Text = string.Empty;

              if (mSecureString != null) {
            mSecureString.Clear();
              } else {
            mAltSecureString.Clear();
            mAltSecureString.Data = new char[0];
              }

              EnableProtection(aHidePassword);

              if (mTextChangedEventHandler != null) {
            mTextChangedEventHandler(mPasswordLineEdit, EventArgs.Empty);
              }

              if (!mSecureDesktop) {
            mPasswordLineEdit.AcceptDrops = true;
              }

              // Register event handler
              mPasswordLineEdit.TextChanged += mPasswordLineEdit_TextChanged;
              mPasswordLineEdit.FocusInEvent += mPasswordLineEdit_FocusInEvent;
              if (!mSecureDesktop) {
            mPasswordLineEdit.DragEnterEvent += mPasswordLineEdit_DragEnterEvent;
            mPasswordLineEdit.DragMoveEvent += mPasswordLineEdit_DragMoveEvent;
            mPasswordLineEdit.DropEvent += mPasswordLineEdit_DropEvent;
              }
        }
Ejemplo n.º 20
0
    public void SetupUi(QMainWindow MainWindow)
    {
        if (MainWindow.ObjectName == "")
        {
            MainWindow.ObjectName = "MainWindow";
        }
        QSize Size = new QSize(631, 570);

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

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

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


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

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

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


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

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

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

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

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

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

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

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

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

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

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


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

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

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

        RetranslateUi(MainWindow);

        QMetaObject.ConnectSlotsByName(MainWindow);
    } // SetupUi
Ejemplo n.º 21
0
        protected void SetupUi()
        {
            base.ObjectName  = "InviteToMucDialog";
            this.Geometry    = new QRect(0, 0, 402, 289);
            this.WindowTitle = "Invite to Conference";
            QVBoxLayout verticalLayout;

            verticalLayout                  = new QVBoxLayout(this);
            verticalLayout.Margin           = 6;
            this.stackedWidget              = new QStackedWidget(this);
            this.stackedWidget.ObjectName   = "stackedWidget";
            this.stackedWidget.CurrentIndex = 0;
            verticalLayout.AddWidget(this.stackedWidget);
            this.page            = new QWidget(this.stackedWidget);
            this.page.ObjectName = "page";
            QVBoxLayout verticalLayout_2;

            verticalLayout_2        = new QVBoxLayout(this.page);
            verticalLayout_2.Margin = 0;
            this.label            = new QLabel(this.page);
            this.label.ObjectName = "label";
            this.label.Text       = "Select Conference:";
            verticalLayout_2.AddWidget(this.label);
            this.mucsListWidget                   = new QListWidget(this.page);
            this.mucsListWidget.ObjectName        = "mucsListWidget";
            this.mucsListWidget.selectionBehavior = QAbstractItemView.SelectionBehavior.SelectRows;
            verticalLayout_2.AddWidget(this.mucsListWidget);
            this.stackedWidget.AddWidget(this.page);
            this.page_2            = new QWidget(this.stackedWidget);
            this.page_2.ObjectName = "page_2";
            QVBoxLayout verticalLayout_3;

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

            verticalLayout_5        = new QVBoxLayout(this.tab);
            verticalLayout_5.Margin = 6;
            this.label_3            = new QLabel(this.tab);
            this.label_3.ObjectName = "label_3";
            this.label_3.Text       = "Select friends to invite:";
            verticalLayout_5.AddWidget(this.label_3);
            this.friendsListWidget            = new QListWidget(this.tab);
            this.friendsListWidget.ObjectName = "friendsListWidget";
            verticalLayout_5.AddWidget(this.friendsListWidget);
            this.tabWidget.AddTab(this.tab, "Invite Friends");
            this.tab_2            = new QWidget(this.tabWidget);
            this.tab_2.ObjectName = "tab_2";
            QVBoxLayout verticalLayout_4;

            verticalLayout_4 = new QVBoxLayout(this.tab_2);
            verticalLayout_4.SetContentsMargins(6, 6, 6, 0);
            this.label_2            = new QLabel(this.tab_2);
            this.label_2.ObjectName = "label_2";
            this.label_2.Text       = "Send this URL to anybody:";
            verticalLayout_4.AddWidget(this.label_2);
            this.urlLineEdit            = new QLineEdit(this.tab_2);
            this.urlLineEdit.ObjectName = "urlLineEdit";
            this.urlLineEdit.ReadOnly   = true;
            verticalLayout_4.AddWidget(this.urlLineEdit);
            QHBoxLayout horizontalLayout;

            horizontalLayout = new QHBoxLayout();
            verticalLayout_4.AddLayout(horizontalLayout);
            this.emailButton            = new QPushButton(this.tab_2);
            this.emailButton.ObjectName = "emailButton";
            this.emailButton.Text       = "&Email";
            horizontalLayout.AddWidget(this.emailButton);
            this.copyButton            = new QPushButton(this.tab_2);
            this.copyButton.ObjectName = "copyButton";
            this.copyButton.Text       = "&Copy";
            horizontalLayout.AddWidget(this.copyButton);
            QSpacerItem horizontalSpacer;

            horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum);
            horizontalLayout.AddItem(horizontalSpacer);
            QSpacerItem verticalSpacer;

            verticalSpacer = new QSpacerItem(20, 99, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding);
            verticalLayout_4.AddItem(verticalSpacer);
            this.tabWidget.AddTab(this.tab_2, "Invite Anyone");
            this.stackedWidget.AddWidget(this.page_2);
            this.buttonBox                 = new QDialogButtonBox(this);
            this.buttonBox.ObjectName      = "buttonBox";
            this.buttonBox.Orientation     = Qt.Orientation.Horizontal;
            this.buttonBox.StandardButtons = ((global::Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Cancel") | global::Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Close")) | global::Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Ok"));
            verticalLayout.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);
        }
Ejemplo n.º 22
0
    public void SetupUi(QMainWindow MainWindow)
    {
        if (MainWindow.ObjectName == "")
        MainWindow.ObjectName = "MainWindow";
        QSize Size = new QSize(631, 570);
        Size = Size.ExpandedTo(MainWindow.MinimumSizeHint());
        MainWindow.Size = Size;
        MainWindow.MinimumSize = new QSize(600, 550);
        MainWindow.WindowIcon = new QIcon(":/main/resources/Images/comex_256.png");
        action_Open = new QAction(MainWindow);
        action_Open.ObjectName = "action_Open";
        action_Open.icon = new QIcon(":/main/resources/Images/document-open.png");
        action_Close = new QAction(MainWindow);
        action_Close.ObjectName = "action_Close";
        action_Close.Enabled = false;
        action_Close.icon = new QIcon(":/main/resources/Images/document-close.png");
        action_Exit = new QAction(MainWindow);
        action_Exit.ObjectName = "action_Exit";
        action_Exit.icon = new QIcon(":/main/resources/Images/application-exit.png");
        action_Info = new QAction(MainWindow);
        action_Info.ObjectName = "action_Info";
        action_Info.icon = new QIcon(":/main/resources/Images/dialog-information.png");
        action_ATR = new QAction(MainWindow);
        action_ATR.ObjectName = "action_ATR";
        action_ATR.icon = new QIcon(":/main/resources/Images/quickopen.png");
        action_Exec_Command = new QAction(MainWindow);
        action_Exec_Command.ObjectName = "action_Exec_Command";
        action_SerialSettings = new QAction(MainWindow);
        action_SerialSettings.ObjectName = "action_SerialSettings";
        action_SerialSettings.icon = new QIcon(":/main/resources/Images/configure.png");
        centralwidget = new QWidget(MainWindow);
        centralwidget.ObjectName = "centralwidget";
        gridLayout = new QGridLayout(centralwidget);
        gridLayout.ObjectName = "gridLayout";
        FrameATR = new QGroupBox(centralwidget);
        FrameATR.ObjectName = "FrameATR";
        QSizePolicy sizePolicy = new QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Fixed);
        sizePolicy.SetHorizontalStretch(0);
        sizePolicy.SetVerticalStretch(0);
        sizePolicy.SetHeightForWidth(FrameATR.SizePolicy.HasHeightForWidth());
        FrameATR.SizePolicy = sizePolicy;
        gridLayout1 = new QGridLayout(FrameATR);
        gridLayout1.ObjectName = "gridLayout1";
        TxtATR = new QLineEdit(FrameATR);
        TxtATR.ObjectName = "TxtATR";
        TxtATR.StyleSheet = "color: rgb(30, 109, 30);";
        TxtATR.ReadOnly = true;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        RetranslateUi(MainWindow);

        QMetaObject.ConnectSlotsByName(MainWindow);
    }
Ejemplo n.º 23
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);
        }
Ejemplo n.º 24
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.
    }
Ejemplo n.º 25
0
 public LifetimeValidator(QLineEdit aLineEdit)
 {
     mLineEdit = aLineEdit;
 }
Ejemplo n.º 26
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.
    }
Ejemplo n.º 27
0
        protected void SetupUi()
        {
            base.ObjectName  = "AddAccountDialog";
            this.Geometry    = new QRect(0, 0, 436, 239);
            this.WindowTitle = "Add Account";
            this.Modal       = true;
            QVBoxLayout verticalLayout;

            verticalLayout                  = new QVBoxLayout(this);
            verticalLayout.Spacing          = 0;
            verticalLayout.sizeConstraint   = QLayout.SizeConstraint.SetFixedSize;
            verticalLayout.Margin           = 0;
            this.stackedWidget              = new QStackedWidget(this);
            this.stackedWidget.ObjectName   = "stackedWidget";
            this.stackedWidget.CurrentIndex = 0;
            verticalLayout.AddWidget(this.stackedWidget);
            this.page            = new QWidget(this.stackedWidget);
            this.page.ObjectName = "page";
            QVBoxLayout verticalLayout_2;

            verticalLayout_2            = new QVBoxLayout(this.page);
            verticalLayout_2.Margin     = 6;
            this.radioButton            = new QRadioButton(this.page);
            this.radioButton.ObjectName = "radioButton";
            this.radioButton.Text       = "I already have an &account I'd like to use";
            this.radioButton.Checked    = true;
            verticalLayout_2.AddWidget(this.radioButton);
            this.radioButton_2            = new QRadioButton(this.page);
            this.radioButton_2.ObjectName = "radioButton_2";
            this.radioButton_2.Enabled    = false;
            this.radioButton_2.Text       = "I'd like to &create a new account";
            verticalLayout_2.AddWidget(this.radioButton_2);
            QSpacerItem verticalSpacer;

            verticalSpacer = new QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding);
            verticalLayout_2.AddItem(verticalSpacer);
            this.buttonBox                 = new QDialogButtonBox(this.page);
            this.buttonBox.ObjectName      = "buttonBox";
            this.buttonBox.Orientation     = Qt.Orientation.Horizontal;
            this.buttonBox.StandardButtons = global::Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Cancel");
            verticalLayout_2.AddWidget(this.buttonBox);
            this.stackedWidget.AddWidget(this.page);
            this.page_2            = new QWidget(this.stackedWidget);
            this.page_2.ObjectName = "page_2";
            QVBoxLayout verticalLayout_3;

            verticalLayout_3        = new QVBoxLayout(this.page_2);
            verticalLayout_3.Margin = 6;
            this.label_6            = new QLabel(this.page_2);
            this.label_6.ObjectName = "label_6";
            this.label_6.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;\"><span style=\" font-weight:600;\">Please enter the information about your existing account:</span></p></body></html>";
            verticalLayout_3.AddWidget(this.label_6);
            QFormLayout formLayout;

            formLayout = new QFormLayout();
            verticalLayout_3.AddLayout(formLayout);
            this.label            = new QLabel(this.page_2);
            this.label.ObjectName = "label";
            this.label.Text       = "&Jabber ID:";
            formLayout.SetWidget(0, QFormLayout.ItemRole.LabelRole, this.label);
            this.jidLineEdit            = new QLineEdit(this.page_2);
            this.jidLineEdit.ObjectName = "jidLineEdit";
            formLayout.SetWidget(0, QFormLayout.ItemRole.FieldRole, this.jidLineEdit);
            this.label_2            = new QLabel(this.page_2);
            this.label_2.ObjectName = "label_2";
            this.label_2.Text       = "Eg: username@hostname";
            this.label_2.Alignment  = ((global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignLeading") | global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignLeft")) | global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignTop"));
            formLayout.SetWidget(1, QFormLayout.ItemRole.FieldRole, this.label_2);
            this.label_3            = new QLabel(this.page_2);
            this.label_3.ObjectName = "label_3";
            this.label_3.Text       = "&Password:"******"passwordLineEdit";
            this.passwordLineEdit.echoMode   = QLineEdit.EchoMode.Password;
            formLayout.SetWidget(2, QFormLayout.ItemRole.FieldRole, this.passwordLineEdit);
            this.label_4            = new QLabel(this.page_2);
            this.label_4.ObjectName = "label_4";
            this.label_4.Text       = "&Resource:";
            formLayout.SetWidget(3, QFormLayout.ItemRole.LabelRole, this.label_4);
            this.resourceComboBox            = new QComboBox(this.page_2);
            this.resourceComboBox.ObjectName = "resourceComboBox";
            this.resourceComboBox.Editable   = true;
            formLayout.SetWidget(3, QFormLayout.ItemRole.FieldRole, this.resourceComboBox);
            this.resourceComboBox.InsertItems(0, new System.Collections.Generic.List <string>(new string[] {
                "Home",
                "Work",
                "Laptop",
                "Netbook"
            }));
            this.label_5            = new QLabel(this.page_2);
            this.label_5.ObjectName = "label_5";
            this.label_5.Text       = "One word describing this computer, i.e. \"HomeLaptop\"";
            this.label_5.Alignment  = ((global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignLeading") | global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignLeft")) | global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignTop"));
            this.label_5.WordWrap   = false;
            formLayout.SetWidget(4, QFormLayout.ItemRole.FieldRole, this.label_5);
            this.autoConnectCheckBox            = new QCheckBox(this.page_2);
            this.autoConnectCheckBox.ObjectName = "autoConnectCheckBox";
            this.autoConnectCheckBox.Text       = "Connect &Automatically";
            this.autoConnectCheckBox.Checked    = true;
            formLayout.SetWidget(5, QFormLayout.ItemRole.FieldRole, this.autoConnectCheckBox);
            QSpacerItem verticalSpacer_2;

            verticalSpacer_2 = new QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding);
            verticalLayout_3.AddItem(verticalSpacer_2);
            this.buttonBox_2                 = new QDialogButtonBox(this.page_2);
            this.buttonBox_2.ObjectName      = "buttonBox_2";
            this.buttonBox_2.StandardButtons = (global::Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Cancel") | global::Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Ok"));
            verticalLayout_3.AddWidget(this.buttonBox_2);
            this.stackedWidget.AddWidget(this.page_2);
            QObject.Connect(buttonBox, Qt.SIGNAL("rejected()"), this, Qt.SLOT("reject()"));
            QObject.Connect(buttonBox_2,Qt.SIGNAL("rejected()"),this,Qt.SLOT("reject()"));
            QMetaObject.ConnectSlotsByName(this);
            this.label.SetBuddy(jidLineEdit);
            this.label_3.SetBuddy(passwordLineEdit);
            this.label_4.SetBuddy(resourceComboBox);
        }
Ejemplo n.º 28
0
        protected void SetupUi()
        {
            base.ObjectName  = "RosterWidget";
            this.Geometry    = new QRect(0, 0, 352, 538);
            this.WindowTitle = "RosterWidget";
            this.StyleSheet  = "";
            QVBoxLayout verticalLayout_6;

            verticalLayout_6                    = new QVBoxLayout(this);
            verticalLayout_6.Spacing            = 0;
            verticalLayout_6.sizeConstraint     = QLayout.SizeConstraint.SetDefaultConstraint;
            verticalLayout_6.Margin             = 0;
            this.m_AccountsContainer            = new QWidget(this);
            this.m_AccountsContainer.ObjectName = "m_AccountsContainer";
            QSizePolicy m_AccountsContainer_sizePolicy;

            m_AccountsContainer_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Preferred);
            m_AccountsContainer_sizePolicy.SetVerticalStretch(0);
            m_AccountsContainer_sizePolicy.SetHorizontalStretch(0);
            m_AccountsContainer_sizePolicy.SetHeightForWidth(this.m_AccountsContainer.SizePolicy.HasHeightForWidth());
            this.m_AccountsContainer.SizePolicy = m_AccountsContainer_sizePolicy;
            verticalLayout_6.AddWidget(this.m_AccountsContainer);
            this.notificationsWidget             = new Synapse.QtClient.Widgets.NotificationsWidget(this);
            this.notificationsWidget.ObjectName  = "notificationsWidget";
            this.notificationsWidget.FrameShape  = QFrame.Shape.NoFrame;
            this.notificationsWidget.FrameShadow = QFrame.Shadow.Raised;
            verticalLayout_6.AddWidget(this.notificationsWidget);
            this.splitter             = new QSplitter(this);
            this.splitter.ObjectName  = "splitter";
            this.splitter.Orientation = Qt.Orientation.Vertical;
            verticalLayout_6.AddWidget(this.splitter);
            this.widget            = new QWidget(this.splitter);
            this.widget.ObjectName = "widget";
            QVBoxLayout verticalLayout_2;

            verticalLayout_2            = new QVBoxLayout(this.widget);
            verticalLayout_2.Margin     = 0;
            this.tabWidget              = new Synapse.QtClient.Widgets.MainTabWidget(this.widget);
            this.tabWidget.ObjectName   = "tabWidget";
            this.tabWidget.tabPosition  = QTabWidget.TabPosition.South;
            this.tabWidget.CurrentIndex = 2;
            verticalLayout_2.AddWidget(this.tabWidget);
            this.friendsTab            = new QWidget(this.tabWidget);
            this.friendsTab.ObjectName = "friendsTab";
            QVBoxLayout verticalLayout_4;

            verticalLayout_4                   = new QVBoxLayout(this.friendsTab);
            verticalLayout_4.Spacing           = 0;
            verticalLayout_4.Margin            = 0;
            this.gridHeader                    = new QFrame(this.friendsTab);
            this.gridHeader.ObjectName         = "gridHeader";
            this.gridHeader.AutoFillBackground = true;
            this.gridHeader.FrameShape         = QFrame.Shape.NoFrame;
            this.gridHeader.FrameShadow        = QFrame.Shadow.Raised;
            QHBoxLayout horizontalLayout_6;

            horizontalLayout_6         = new QHBoxLayout(this.gridHeader);
            horizontalLayout_6.Spacing = 3;
            horizontalLayout_6.Margin  = 3;
            this.statsLabel            = new QLabel(this.gridHeader);
            this.statsLabel.ObjectName = "statsLabel";
            QSizePolicy statsLabel_sizePolicy;

            statsLabel_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Preferred);
            statsLabel_sizePolicy.SetVerticalStretch(0);
            statsLabel_sizePolicy.SetHorizontalStretch(0);
            statsLabel_sizePolicy.SetHeightForWidth(this.statsLabel.SizePolicy.HasHeightForWidth());
            this.statsLabel.SizePolicy = statsLabel_sizePolicy;
            this.statsLabel.Text       = "";
            horizontalLayout_6.AddWidget(this.statsLabel);
            this.rosterSearchButton             = new QPushButton(this.gridHeader);
            this.rosterSearchButton.ObjectName  = "rosterSearchButton";
            this.rosterSearchButton.FocusPolicy = Qt.FocusPolicy.TabFocus;
            this.rosterSearchButton.ToolTip     = "Search friends";
            this.rosterSearchButton.Text        = "";
            this.rosterSearchButton.Checkable   = true;
            this.rosterSearchButton.Checked     = false;
            this.rosterSearchButton.Flat        = true;
            horizontalLayout_6.AddWidget(this.rosterSearchButton);
            this.rosterViewButton             = new QPushButton(this.gridHeader);
            this.rosterViewButton.ObjectName  = "rosterViewButton";
            this.rosterViewButton.FocusPolicy = Qt.FocusPolicy.TabFocus;
            this.rosterViewButton.ToolTip     = "Change view options";
            this.rosterViewButton.Text        = "";
            this.rosterViewButton.Flat        = true;
            horizontalLayout_6.AddWidget(this.rosterViewButton);
            this.addFriendButton             = new QPushButton(this.gridHeader);
            this.addFriendButton.ObjectName  = "addFriendButton";
            this.addFriendButton.FocusPolicy = Qt.FocusPolicy.TabFocus;
            this.addFriendButton.ToolTip     = "Add & Invite new friends";
            this.addFriendButton.Text        = "";
            this.addFriendButton.Flat        = true;
            horizontalLayout_6.AddWidget(this.addFriendButton);
            verticalLayout_4.AddWidget(this.gridHeader);
            this.friendSearchContainer            = new QWidget(this.friendsTab);
            this.friendSearchContainer.ObjectName = "friendSearchContainer";
            QHBoxLayout horizontalLayout;

            horizontalLayout                     = new QHBoxLayout(this.friendSearchContainer);
            horizontalLayout.Spacing             = 0;
            horizontalLayout.Margin              = 3;
            this.friendSearchLineEdit            = new QLineEdit(this.friendSearchContainer);
            this.friendSearchLineEdit.ObjectName = "friendSearchLineEdit";
            horizontalLayout.AddWidget(this.friendSearchLineEdit);
            verticalLayout_4.AddWidget(this.friendSearchContainer);
            this.rosterGrid             = new Synapse.QtClient.Widgets.AvatarGrid <Synapse.UI.RosterItem>(this.friendsTab);
            this.rosterGrid.ObjectName  = "rosterGrid";
            this.rosterGrid.FocusPolicy = Qt.FocusPolicy.StrongFocus;
            this.rosterGrid.FrameShape  = QFrame.Shape.NoFrame;
            this.rosterGrid.Alignment   = ((global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignLeading") | global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignLeft")) | global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignTop"));
            verticalLayout_4.AddWidget(this.rosterGrid);
            this.tabWidget.AddTab(this.friendsTab, "Friends");
            this.chatroomsTab            = new QWidget(this.tabWidget);
            this.chatroomsTab.ObjectName = "chatroomsTab";
            QVBoxLayout verticalLayout_3;

            verticalLayout_3               = new QVBoxLayout(this.chatroomsTab);
            verticalLayout_3.Spacing       = 0;
            verticalLayout_3.Margin        = 0;
            this.joinMucHeader             = new QFrame(this.chatroomsTab);
            this.joinMucHeader.ObjectName  = "joinMucHeader";
            this.joinMucHeader.FrameShape  = QFrame.Shape.NoFrame;
            this.joinMucHeader.FrameShadow = QFrame.Shadow.Raised;
            QHBoxLayout horizontalLayout_5;

            horizontalLayout_5         = new QHBoxLayout(this.joinMucHeader);
            horizontalLayout_5.Spacing = 3;
            horizontalLayout_5.Margin  = 3;
            this.label_7            = new QLabel(this.joinMucHeader);
            this.label_7.ObjectName = "label_7";
            QSizePolicy label_7_sizePolicy;

            label_7_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Preferred);
            label_7_sizePolicy.SetVerticalStretch(0);
            label_7_sizePolicy.SetHorizontalStretch(0);
            label_7_sizePolicy.SetHeightForWidth(this.label_7.SizePolicy.HasHeightForWidth());
            this.label_7.SizePolicy = label_7_sizePolicy;
            this.label_7.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; font-family:'DejaVu Sans';\">Join or Create Conference</p></body></html>";
            horizontalLayout_5.AddWidget(this.label_7);
            this.toggleJoinMucButton             = new QPushButton(this.joinMucHeader);
            this.toggleJoinMucButton.ObjectName  = "toggleJoinMucButton";
            this.toggleJoinMucButton.FocusPolicy = Qt.FocusPolicy.TabFocus;
            this.toggleJoinMucButton.Text        = "";
            this.toggleJoinMucButton.Flat        = true;
            horizontalLayout_5.AddWidget(this.toggleJoinMucButton);
            verticalLayout_3.AddWidget(this.joinMucHeader);
            this.joinMucContainer            = new QWidget(this.chatroomsTab);
            this.joinMucContainer.ObjectName = "joinMucContainer";
            QVBoxLayout verticalLayout_5;

            verticalLayout_5 = new QVBoxLayout(this.joinMucContainer);
            verticalLayout_5.SetContentsMargins(0, 0, 0, 6);
            QGridLayout gridLayout;

            gridLayout = new QGridLayout();
            verticalLayout_5.AddLayout(gridLayout);
            gridLayout.SetContentsMargins(6, 6, 6, 0);
            this.label_2            = new QLabel(this.joinMucContainer);
            this.label_2.ObjectName = "label_2";
            this.label_2.Text       = "Room:";
            gridLayout.AddWidget(this.label_2, 0, 0, 1, 1);
            this.label_5            = new QLabel(this.joinMucContainer);
            this.label_5.ObjectName = "label_5";
            this.label_5.Text       = "Server:";
            gridLayout.AddWidget(this.label_5, 1, 0, 1, 1);
            this.mucServerLineEdit            = new QLineEdit(this.joinMucContainer);
            this.mucServerLineEdit.ObjectName = "mucServerLineEdit";
            this.mucServerLineEdit.Text       = "conference.extremeboredom.net";
            gridLayout.AddWidget(this.mucServerLineEdit, 1, 1, 1, 1);
            this.mucRoomLineEdit            = new QLineEdit(this.joinMucContainer);
            this.mucRoomLineEdit.ObjectName = "mucRoomLineEdit";
            this.mucRoomLineEdit.Text       = "synapse";
            gridLayout.AddWidget(this.mucRoomLineEdit, 0, 1, 1, 1);
            this.label_6            = new QLabel(this.joinMucContainer);
            this.label_6.ObjectName = "label_6";
            this.label_6.Text       = "Nickname:";
            gridLayout.AddWidget(this.label_6, 2, 0, 1, 1);
            this.mucNicknameLineEdit            = new QLineEdit(this.joinMucContainer);
            this.mucNicknameLineEdit.ObjectName = "mucNicknameLineEdit";
            gridLayout.AddWidget(this.mucNicknameLineEdit, 2, 1, 1, 1);
            this.label            = new QLabel(this.joinMucContainer);
            this.label.ObjectName = "label";
            this.label.Text       = "Password:"******"mucPasswordLineEdit";
            gridLayout.AddWidget(this.mucPasswordLineEdit, 3, 1, 1, 1);
            QHBoxLayout horizontalLayout_4;

            horizontalLayout_4 = new QHBoxLayout();
            verticalLayout_5.AddLayout(horizontalLayout_4);
            horizontalLayout_4.SetContentsMargins(6, 0, 6, 0);
            this.pushButton            = new QPushButton(this.joinMucContainer);
            this.pushButton.ObjectName = "pushButton";
            this.pushButton.Text       = "Browse...";
            horizontalLayout_4.AddWidget(this.pushButton);
            QSpacerItem horizontalSpacer_3;

            horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum);
            horizontalLayout_4.AddItem(horizontalSpacer_3);
            this.m_JoinChatButton            = new QPushButton(this.joinMucContainer);
            this.m_JoinChatButton.ObjectName = "m_JoinChatButton";
            this.m_JoinChatButton.Text       = "Join";
            horizontalLayout_4.AddWidget(this.m_JoinChatButton);
            verticalLayout_3.AddWidget(this.joinMucContainer);
            this.yourMucsHeader             = new QFrame(this.chatroomsTab);
            this.yourMucsHeader.ObjectName  = "yourMucsHeader";
            this.yourMucsHeader.FrameShape  = QFrame.Shape.NoFrame;
            this.yourMucsHeader.FrameShadow = QFrame.Shadow.Raised;
            QHBoxLayout horizontalLayout_7;

            horizontalLayout_7         = new QHBoxLayout(this.yourMucsHeader);
            horizontalLayout_7.Spacing = 3;
            horizontalLayout_7.Margin  = 3;
            this.label_4            = new QLabel(this.yourMucsHeader);
            this.label_4.ObjectName = "label_4";
            QSizePolicy label_4_sizePolicy;

            label_4_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Preferred);
            label_4_sizePolicy.SetVerticalStretch(0);
            label_4_sizePolicy.SetHorizontalStretch(0);
            label_4_sizePolicy.SetHeightForWidth(this.label_4.SizePolicy.HasHeightForWidth());
            this.label_4.SizePolicy = label_4_sizePolicy;
            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; font-family:'DejaVu Sans';\">Your Conferences</p></body></html>";
            horizontalLayout_7.AddWidget(this.label_4);
            this.addMucBookmarkButton             = new QPushButton(this.yourMucsHeader);
            this.addMucBookmarkButton.ObjectName  = "addMucBookmarkButton";
            this.addMucBookmarkButton.FocusPolicy = Qt.FocusPolicy.TabFocus;
            this.addMucBookmarkButton.Text        = "";
            this.addMucBookmarkButton.Flat        = true;
            horizontalLayout_7.AddWidget(this.addMucBookmarkButton);
            verticalLayout_3.AddWidget(this.yourMucsHeader);
            this.mucTree              = new QTreeView(this.chatroomsTab);
            this.mucTree.ObjectName   = "mucTree";
            this.mucTree.FrameShape   = QFrame.Shape.NoFrame;
            this.mucTree.Animated     = true;
            this.mucTree.HeaderHidden = true;
            verticalLayout_3.AddWidget(this.mucTree);
            this.friendsMucsHeader             = new QFrame(this.chatroomsTab);
            this.friendsMucsHeader.ObjectName  = "friendsMucsHeader";
            this.friendsMucsHeader.FrameShape  = QFrame.Shape.NoFrame;
            this.friendsMucsHeader.FrameShadow = QFrame.Shadow.Raised;
            QHBoxLayout horizontalLayout_8;

            horizontalLayout_8         = new QHBoxLayout(this.friendsMucsHeader);
            horizontalLayout_8.Spacing = 3;
            horizontalLayout_8.Margin  = 3;
            this.label_3            = new QLabel(this.friendsMucsHeader);
            this.label_3.ObjectName = "label_3";
            this.label_3.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; font-family:'DejaVu Sans';\">Friends' Conferences</p></body></html>";
            horizontalLayout_8.AddWidget(this.label_3);
            verticalLayout_3.AddWidget(this.friendsMucsHeader);
            this.friendsMucTree              = new QTreeView(this.chatroomsTab);
            this.friendsMucTree.ObjectName   = "friendsMucTree";
            this.friendsMucTree.FrameShape   = QFrame.Shape.NoFrame;
            this.friendsMucTree.Animated     = true;
            this.friendsMucTree.HeaderHidden = true;
            verticalLayout_3.AddWidget(this.friendsMucTree);
            this.tabWidget.AddTab(this.chatroomsTab, "Conferences");
            this.activityTab            = new QWidget(this.tabWidget);
            this.activityTab.ObjectName = "activityTab";
            QVBoxLayout verticalLayout;

            verticalLayout                 = new QVBoxLayout(this.activityTab);
            verticalLayout.Spacing         = 0;
            verticalLayout.sizeConstraint  = QLayout.SizeConstraint.SetDefaultConstraint;
            verticalLayout.Margin          = 0;
            this.activityHeader            = new QFrame(this.activityTab);
            this.activityHeader.ObjectName = "activityHeader";
            QSizePolicy activityHeader_sizePolicy;

            activityHeader_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Minimum);
            activityHeader_sizePolicy.SetVerticalStretch(0);
            activityHeader_sizePolicy.SetHorizontalStretch(0);
            activityHeader_sizePolicy.SetHeightForWidth(this.activityHeader.SizePolicy.HasHeightForWidth());
            this.activityHeader.SizePolicy  = activityHeader_sizePolicy;
            this.activityHeader.FrameShape  = QFrame.Shape.NoFrame;
            this.activityHeader.FrameShadow = QFrame.Shadow.Raised;
            QHBoxLayout horizontalLayout_9;

            horizontalLayout_9               = new QHBoxLayout(this.activityHeader);
            horizontalLayout_9.Spacing       = 3;
            horizontalLayout_9.Margin        = 3;
            this.m_ShoutButton               = new QPushButton(this.activityHeader);
            this.m_ShoutButton.ObjectName    = "m_ShoutButton";
            this.m_ShoutButton.FocusPolicy   = Qt.FocusPolicy.TabFocus;
            this.m_ShoutButton.StyleSheet    = "";
            this.m_ShoutButton.Text          = "Shout!";
            this.m_ShoutButton.Checkable     = true;
            this.m_ShoutButton.AutoExclusive = false;
            this.m_ShoutButton.Flat          = true;
            horizontalLayout_9.AddWidget(this.m_ShoutButton);
            this.m_PostLinkButton               = new QPushButton(this.activityHeader);
            this.m_PostLinkButton.ObjectName    = "m_PostLinkButton";
            this.m_PostLinkButton.FocusPolicy   = Qt.FocusPolicy.TabFocus;
            this.m_PostLinkButton.Text          = "Post Link";
            this.m_PostLinkButton.Checkable     = true;
            this.m_PostLinkButton.AutoExclusive = false;
            this.m_PostLinkButton.Flat          = true;
            horizontalLayout_9.AddWidget(this.m_PostLinkButton);
            this.m_PostFileButton               = new QPushButton(this.activityHeader);
            this.m_PostFileButton.ObjectName    = "m_PostFileButton";
            this.m_PostFileButton.FocusPolicy   = Qt.FocusPolicy.TabFocus;
            this.m_PostFileButton.Text          = "Post File";
            this.m_PostFileButton.Checkable     = true;
            this.m_PostFileButton.AutoExclusive = false;
            this.m_PostFileButton.Flat          = true;
            horizontalLayout_9.AddWidget(this.m_PostFileButton);
            QSpacerItem horizontalSpacer_2;

            horizontalSpacer_2 = new QSpacerItem(0, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum);
            horizontalLayout_9.AddItem(horizontalSpacer_2);
            this.feedFilterButton             = new QPushButton(this.activityHeader);
            this.feedFilterButton.ObjectName  = "feedFilterButton";
            this.feedFilterButton.FocusPolicy = Qt.FocusPolicy.TabFocus;
            this.feedFilterButton.Text        = "";
            this.feedFilterButton.Flat        = true;
            horizontalLayout_9.AddWidget(this.feedFilterButton);
            verticalLayout.AddWidget(this.activityHeader);
            this.shoutContainer            = new QWidget(this.activityTab);
            this.shoutContainer.ObjectName = "shoutContainer";
            QVBoxLayout verticalLayout_8;

            verticalLayout_8        = new QVBoxLayout(this.shoutContainer);
            verticalLayout_8.Margin = 6;
            QHBoxLayout horizontalLayout_2;

            horizontalLayout_2 = new QHBoxLayout();
            verticalLayout_8.AddLayout(horizontalLayout_2);
            this.shoutLineEdit            = new QLineEdit(this.shoutContainer);
            this.shoutLineEdit.ObjectName = "shoutLineEdit";
            this.shoutLineEdit.MaxLength  = 140;
            horizontalLayout_2.AddWidget(this.shoutLineEdit);
            this.shoutCharsLabel            = new QLabel(this.shoutContainer);
            this.shoutCharsLabel.ObjectName = "shoutCharsLabel";
            this.shoutCharsLabel.Text       = "140";
            horizontalLayout_2.AddWidget(this.shoutCharsLabel);
            this.shoutHandlersBox            = new QWidget(this.shoutContainer);
            this.shoutHandlersBox.ObjectName = "shoutHandlersBox";
            QHBoxLayout horizontalLayout_10;

            horizontalLayout_10        = new QHBoxLayout(this.shoutHandlersBox);
            horizontalLayout_10.Margin = 0;
            this.label_8            = new QLabel(this.shoutHandlersBox);
            this.label_8.ObjectName = "label_8";
            this.label_8.Text       = "Also Send To:";
            horizontalLayout_10.AddWidget(this.label_8);
            this.shoutHandlersContainer            = new QWidget(this.shoutHandlersBox);
            this.shoutHandlersContainer.ObjectName = "shoutHandlersContainer";
            QHBoxLayout horizontalLayout_11;

            horizontalLayout_11         = new QHBoxLayout(this.shoutHandlersContainer);
            horizontalLayout_11.Spacing = 3;
            horizontalLayout_11.Margin  = 0;
            horizontalLayout_10.AddWidget(this.shoutHandlersContainer);
            QSpacerItem horizontalSpacer_4;

            horizontalSpacer_4 = new QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum);
            horizontalLayout_10.AddItem(horizontalSpacer_4);
            verticalLayout_8.AddWidget(this.shoutHandlersBox);
            QHBoxLayout horizontalLayout_3;

            horizontalLayout_3 = new QHBoxLayout();
            verticalLayout_8.AddLayout(horizontalLayout_3);
            QSpacerItem horizontalSpacer;

            horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum);
            horizontalLayout_3.AddItem(horizontalSpacer);
            this.sendShoutButton            = new QPushButton(this.shoutContainer);
            this.sendShoutButton.ObjectName = "sendShoutButton";
            this.sendShoutButton.Text       = "Shout!";
            horizontalLayout_3.AddWidget(this.sendShoutButton);
            verticalLayout.AddWidget(this.shoutContainer);
            this.m_ActivityWebView            = new Synapse.QtClient.Widgets.StubbornWebView(this.activityTab);
            this.m_ActivityWebView.ObjectName = "m_ActivityWebView";
            QSizePolicy m_ActivityWebView_sizePolicy;

            m_ActivityWebView_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Expanding);
            m_ActivityWebView_sizePolicy.SetVerticalStretch(0);
            m_ActivityWebView_sizePolicy.SetHorizontalStretch(0);
            m_ActivityWebView_sizePolicy.SetHeightForWidth(this.m_ActivityWebView.SizePolicy.HasHeightForWidth());
            this.m_ActivityWebView.SizePolicy = m_ActivityWebView_sizePolicy;
            this.m_ActivityWebView.Url        = new QUrl("about:blank");
            verticalLayout.AddWidget(this.m_ActivityWebView);
            this.tabWidget.AddTab(this.activityTab, "Activity");
            this.splitter.AddWidget(this.widget);
            QObject.Connect(m_ShoutButton, Qt.SIGNAL("toggled(bool)"), shoutContainer, Qt.SLOT("setShown(bool)"));
            QObject.Connect(mucRoomLineEdit,Qt.SIGNAL("returnPressed()"),m_JoinChatButton,Qt.SLOT("click()"));
            QObject.Connect(mucPasswordLineEdit,Qt.SIGNAL("returnPressed()"),m_JoinChatButton,Qt.SLOT("click()"));
            QObject.Connect(mucServerLineEdit,Qt.SIGNAL("returnPressed()"),m_JoinChatButton,Qt.SLOT("click()"));
            QObject.Connect(mucNicknameLineEdit,Qt.SIGNAL("returnPressed()"),m_JoinChatButton,Qt.SLOT("click()"));
            QMetaObject.ConnectSlotsByName(this);
            this.label_2.SetBuddy(mucRoomLineEdit);
            this.label_5.SetBuddy(mucServerLineEdit);
            this.label_6.SetBuddy(mucNicknameLineEdit);
            this.label.SetBuddy(mucPasswordLineEdit);
        }
Ejemplo n.º 29
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);
        }
Ejemplo n.º 30
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;
        }
Ejemplo n.º 31
0
 protected void SetupUi() {
     base.ObjectName = "EditAccountDialog";
     this.Geometry = new QRect(0, 0, 343, 261);
     this.WindowTitle = "Edit Account";
     this.Modal = true;
     QVBoxLayout verticalLayout;
     verticalLayout = new QVBoxLayout(this);
     verticalLayout.Margin = 6;
     this.tabWidget = new QTabWidget(this);
     this.tabWidget.ObjectName = "tabWidget";
     this.tabWidget.Enabled = true;
     this.tabWidget.CurrentIndex = 3;
     verticalLayout.AddWidget(this.tabWidget);
     this.tab = new QWidget(this.tabWidget);
     this.tab.ObjectName = "tab";
     QVBoxLayout verticalLayout_2;
     verticalLayout_2 = new QVBoxLayout(this.tab);
     verticalLayout_2.Margin = 6;
     QFormLayout formLayout;
     formLayout = new QFormLayout();
     verticalLayout_2.AddLayout(formLayout);
     this.label = new QLabel(this.tab);
     this.label.ObjectName = "label";
     this.label.Text = "Jabber ID:";
     formLayout.SetWidget(0, QFormLayout.ItemRole.LabelRole, this.label);
     this.jidLineEdit = new QLineEdit(this.tab);
     this.jidLineEdit.ObjectName = "jidLineEdit";
     formLayout.SetWidget(0, QFormLayout.ItemRole.FieldRole, this.jidLineEdit);
     this.label_2 = new QLabel(this.tab);
     this.label_2.ObjectName = "label_2";
     this.label_2.Text = "Password:"******"passwordLineEdit";
     this.passwordLineEdit.echoMode = QLineEdit.EchoMode.Password;
     formLayout.SetWidget(1, QFormLayout.ItemRole.FieldRole, this.passwordLineEdit);
     this.label_3 = new QLabel(this.tab);
     this.label_3.ObjectName = "label_3";
     this.label_3.Text = "Resource:";
     formLayout.SetWidget(2, QFormLayout.ItemRole.LabelRole, this.label_3);
     this.resourceCombo = new QComboBox(this.tab);
     this.resourceCombo.ObjectName = "resourceCombo";
     this.resourceCombo.Editable = true;
     formLayout.SetWidget(2, QFormLayout.ItemRole.FieldRole, this.resourceCombo);
     this.resourceCombo.InsertItems(0, new System.Collections.Generic.List<string>(new string[] {
                     "Home Computer",
                     "Work Computer",
                     "Laptop"}));
     QSpacerItem verticalSpacer;
     verticalSpacer = new QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding);
     verticalLayout_2.AddItem(verticalSpacer);
     this.widget = new QWidget(this.tab);
     this.widget.ObjectName = "widget";
     QHBoxLayout horizontalLayout;
     horizontalLayout = new QHBoxLayout(this.widget);
     horizontalLayout.Margin = 0;
     this.pushButton = new QPushButton(this.widget);
     this.pushButton.ObjectName = "pushButton";
     this.pushButton.Enabled = false;
     this.pushButton.Text = "Change Password...";
     horizontalLayout.AddWidget(this.pushButton);
     QSpacerItem horizontalSpacer;
     horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum);
     horizontalLayout.AddItem(horizontalSpacer);
     verticalLayout_2.AddWidget(this.widget);
     this.tabWidget.AddTab(this.tab, "Account");
     this.tab_4 = new QWidget(this.tabWidget);
     this.tab_4.ObjectName = "tab_4";
     QVBoxLayout verticalLayout_3;
     verticalLayout_3 = new QVBoxLayout(this.tab_4);
     verticalLayout_3.Margin = 6;
     this.label_5 = new QLabel(this.tab_4);
     this.label_5.ObjectName = "label_5";
     this.label_5.Text = "Synapse will attempt to automatically discover your connect server if you leave this field blank.";
     this.label_5.WordWrap = true;
     verticalLayout_3.AddWidget(this.label_5);
     QFormLayout formLayout_2;
     formLayout_2 = new QFormLayout();
     verticalLayout_3.AddLayout(formLayout_2);
     this.label_4 = new QLabel(this.tab_4);
     this.label_4.ObjectName = "label_4";
     this.label_4.Text = "Connect Server:";
     formLayout_2.SetWidget(0, QFormLayout.ItemRole.LabelRole, this.label_4);
     this.serverLineEdit = new QLineEdit(this.tab_4);
     this.serverLineEdit.ObjectName = "serverLineEdit";
     formLayout_2.SetWidget(0, QFormLayout.ItemRole.FieldRole, this.serverLineEdit);
     this.label_6 = new QLabel(this.tab_4);
     this.label_6.ObjectName = "label_6";
     this.label_6.Text = "Port:";
     formLayout_2.SetWidget(1, QFormLayout.ItemRole.LabelRole, this.label_6);
     this.portSpinBox = new QSpinBox(this.tab_4);
     this.portSpinBox.ObjectName = "portSpinBox";
     this.portSpinBox.Maximum = 9999999;
     this.portSpinBox.SingleStep = 1;
     this.portSpinBox.Value = 5222;
     formLayout_2.SetWidget(1, QFormLayout.ItemRole.FieldRole, this.portSpinBox);
     this.label_7 = new QLabel(this.tab_4);
     this.label_7.ObjectName = "label_7";
     this.label_7.Enabled = false;
     this.label_7.Text = "Note that the server must support TLS encryption.";
     this.label_7.Alignment = ((global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignLeading") | global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignLeft")) | global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignVCenter"));
     verticalLayout_3.AddWidget(this.label_7);
     QSpacerItem verticalSpacer_2;
     verticalSpacer_2 = new QSpacerItem(20, 170, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding);
     verticalLayout_3.AddItem(verticalSpacer_2);
     this.tabWidget.AddTab(this.tab_4, "Server");
     this.tab_2 = new QWidget(this.tabWidget);
     this.tab_2.ObjectName = "tab_2";
     QVBoxLayout verticalLayout_4;
     verticalLayout_4 = new QVBoxLayout(this.tab_2);
     verticalLayout_4.Margin = 6;
     this.autoConnectCheckBox = new QCheckBox(this.tab_2);
     this.autoConnectCheckBox.ObjectName = "autoConnectCheckBox";
     this.autoConnectCheckBox.Text = "Connect Automatically";
     verticalLayout_4.AddWidget(this.autoConnectCheckBox);
     QSpacerItem verticalSpacer_3;
     verticalSpacer_3 = new QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding);
     verticalLayout_4.AddItem(verticalSpacer_3);
     this.tabWidget.AddTab(this.tab_2, "Options");
     this.tab_3 = new QWidget(this.tabWidget);
     this.tab_3.ObjectName = "tab_3";
     QVBoxLayout verticalLayout_5;
     verticalLayout_5 = new QVBoxLayout(this.tab_3);
     verticalLayout_5.Margin = 6;
     QFormLayout formLayout_3;
     formLayout_3 = new QFormLayout();
     verticalLayout_5.AddLayout(formLayout_3);
     formLayout_3.fieldGrowthPolicy = QFormLayout.FieldGrowthPolicy.AllNonFixedFieldsGrow;
     this.label_9 = new QLabel(this.tab_3);
     this.label_9.ObjectName = "label_9";
     this.label_9.Text = "&Type:";
     formLayout_3.SetWidget(0, QFormLayout.ItemRole.LabelRole, this.label_9);
     this.comboBox = new QComboBox(this.tab_3);
     this.comboBox.ObjectName = "comboBox";
     formLayout_3.SetWidget(0, QFormLayout.ItemRole.FieldRole, this.comboBox);
     this.comboBox.InsertItems(0, new System.Collections.Generic.List<string>(new string[] {
                     "Use System Settings (DOES NOT WORK)",
                     "No Proxy",
                     "HTTP",
                     "SOCKS4",
                     "SOCKS5"}));
     this.proxyHostLabel = new QLabel(this.tab_3);
     this.proxyHostLabel.ObjectName = "proxyHostLabel";
     this.proxyHostLabel.Enabled = true;
     this.proxyHostLabel.Text = "&Host:";
     formLayout_3.SetWidget(2, QFormLayout.ItemRole.LabelRole, this.proxyHostLabel);
     this.proxyHostLineEdit = new QLineEdit(this.tab_3);
     this.proxyHostLineEdit.ObjectName = "proxyHostLineEdit";
     this.proxyHostLineEdit.Enabled = true;
     formLayout_3.SetWidget(2, QFormLayout.ItemRole.FieldRole, this.proxyHostLineEdit);
     this.proxyPortLabel = new QLabel(this.tab_3);
     this.proxyPortLabel.ObjectName = "proxyPortLabel";
     this.proxyPortLabel.Enabled = true;
     this.proxyPortLabel.Text = "&Port:";
     formLayout_3.SetWidget(3, QFormLayout.ItemRole.LabelRole, this.proxyPortLabel);
     this.proxyPortSpinBox = new QSpinBox(this.tab_3);
     this.proxyPortSpinBox.ObjectName = "proxyPortSpinBox";
     this.proxyPortSpinBox.Enabled = true;
     this.proxyPortSpinBox.Maximum = 66666;
     formLayout_3.SetWidget(3, QFormLayout.ItemRole.FieldRole, this.proxyPortSpinBox);
     this.proxyUserLabel = new QLabel(this.tab_3);
     this.proxyUserLabel.ObjectName = "proxyUserLabel";
     this.proxyUserLabel.Enabled = true;
     this.proxyUserLabel.Text = "&Username:"******"proxyUserLineEdit";
     this.proxyUserLineEdit.Enabled = true;
     formLayout_3.SetWidget(4, QFormLayout.ItemRole.FieldRole, this.proxyUserLineEdit);
     this.proxyPassLabel = new QLabel(this.tab_3);
     this.proxyPassLabel.ObjectName = "proxyPassLabel";
     this.proxyPassLabel.Enabled = true;
     this.proxyPassLabel.Text = "Pa&ssword:";
     formLayout_3.SetWidget(5, QFormLayout.ItemRole.LabelRole, this.proxyPassLabel);
     this.proxyPassLineEdit = new QLineEdit(this.tab_3);
     this.proxyPassLineEdit.ObjectName = "proxyPassLineEdit";
     this.proxyPassLineEdit.Enabled = true;
     formLayout_3.SetWidget(5, QFormLayout.ItemRole.FieldRole, this.proxyPassLineEdit);
     this.line = new QFrame(this.tab_3);
     this.line.ObjectName = "line";
     this.line.FrameShape = QFrame.Shape.HLine;
     this.line.FrameShadow = QFrame.Shadow.Sunken;
     formLayout_3.SetWidget(1, QFormLayout.ItemRole.LabelRole, this.line);
     QSpacerItem verticalSpacer_4;
     verticalSpacer_4 = new QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding);
     verticalLayout_5.AddItem(verticalSpacer_4);
     this.tabWidget.AddTab(this.tab_3, "Proxy");
     this.buttonBox = new QDialogButtonBox(this);
     this.buttonBox.ObjectName = "buttonBox";
     this.buttonBox.Orientation = Qt.Orientation.Horizontal;
     this.buttonBox.StandardButtons = (global::Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Cancel") | global::Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Ok"));
     verticalLayout.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);
     this.label_9.SetBuddy(comboBox);
     this.proxyHostLabel.SetBuddy(proxyHostLineEdit);
     this.proxyPortLabel.SetBuddy(proxyPortSpinBox);
     this.proxyUserLabel.SetBuddy(proxyUserLineEdit);
     this.proxyPassLabel.SetBuddy(proxyPassLineEdit);
 }
Ejemplo n.º 32
0
    public void SetupUi(QDialog ChangePinStatusDialog)
    {
        if (ChangePinStatusDialog.ObjectName == "")
        {
            ChangePinStatusDialog.ObjectName = "ChangePinStatusDialog";
        }
        QSize Size = new QSize(357, 159);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

        QMetaObject.ConnectSlotsByName(ChangePinStatusDialog);
    } // SetupUi
Ejemplo n.º 33
0
        protected void SetupUi()
        {
            base.ObjectName  = "MucAffiliationDialog";
            this.Geometry    = new QRect(0, 0, 336, 245);
            this.WindowTitle = "Change Participant Affiliation";
            QVBoxLayout verticalLayout_2;

            verticalLayout_2 = new QVBoxLayout(this);
            verticalLayout_2.sizeConstraint = QLayout.SizeConstraint.SetFixedSize;
            verticalLayout_2.Margin         = 6;
            QGridLayout gridLayout;

            gridLayout = new QGridLayout();
            verticalLayout_2.AddLayout(gridLayout);
            this.roomLabel            = new QLabel(this);
            this.roomLabel.ObjectName = "roomLabel";
            this.roomLabel.Text       = "*****@*****.**";
            gridLayout.AddWidget(this.roomLabel, 0, 1, 1, 1);
            this.label_2            = new QLabel(this);
            this.label_2.ObjectName = "label_2";
            this.label_2.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;\">Room:</span></p></body></html>";
            gridLayout.AddWidget(this.label_2, 0, 0, 1, 1);
            this.label_3            = new QLabel(this);
            this.label_3.ObjectName = "label_3";
            this.label_3.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;\">User:</span></p></body></html>";
            gridLayout.AddWidget(this.label_3, 1, 0, 1, 1);
            this.userLabel            = new QLabel(this);
            this.userLabel.ObjectName = "userLabel";
            this.userLabel.Text       = "*****@*****.**";
            gridLayout.AddWidget(this.userLabel, 1, 1, 1, 1);
            QVBoxLayout verticalLayout;

            verticalLayout = new QVBoxLayout();
            verticalLayout_2.AddLayout(verticalLayout);
            verticalLayout.Spacing           = 0;
            verticalLayout.Margin            = 0;
            this.ownerRadioButton            = new QRadioButton(this);
            this.ownerRadioButton.ObjectName = "ownerRadioButton";
            this.ownerRadioButton.Text       = "Owner";
            verticalLayout.AddWidget(this.ownerRadioButton);
            this.adminRadioButton            = new QRadioButton(this);
            this.adminRadioButton.ObjectName = "adminRadioButton";
            this.adminRadioButton.Text       = "Admin";
            verticalLayout.AddWidget(this.adminRadioButton);
            this.memberRadioButton            = new QRadioButton(this);
            this.memberRadioButton.ObjectName = "memberRadioButton";
            this.memberRadioButton.Text       = "Member";
            verticalLayout.AddWidget(this.memberRadioButton);
            this.outcastRadioButton            = new QRadioButton(this);
            this.outcastRadioButton.ObjectName = "outcastRadioButton";
            this.outcastRadioButton.Text       = "Outcast (Banned)";
            verticalLayout.AddWidget(this.outcastRadioButton);
            this.noneRadioButton            = new QRadioButton(this);
            this.noneRadioButton.ObjectName = "noneRadioButton";
            this.noneRadioButton.Text       = "None";
            verticalLayout.AddWidget(this.noneRadioButton);
            QGridLayout gridLayout_2;

            gridLayout_2 = new QGridLayout();
            verticalLayout_2.AddLayout(gridLayout_2);
            this.reasonLineEdit            = new QLineEdit(this);
            this.reasonLineEdit.ObjectName = "reasonLineEdit";
            gridLayout_2.AddWidget(this.reasonLineEdit, 0, 1, 1, 1);
            this.label            = new QLabel(this);
            this.label.ObjectName = "label";
            this.label.Text       = "Reason:";
            gridLayout_2.AddWidget(this.label, 0, 0, 1, 1);
            this.label_4            = new QLabel(this);
            this.label_4.ObjectName = "label_4";
            this.label_4.Text       = "(optional)";
            gridLayout_2.AddWidget(this.label_4, 0, 2, 1, 1);
            this.buttonBox                 = new QDialogButtonBox(this);
            this.buttonBox.ObjectName      = "buttonBox";
            this.buttonBox.Orientation     = Qt.Orientation.Horizontal;
            this.buttonBox.StandardButtons = (global::Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Cancel") | global::Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Ok"));
            verticalLayout_2.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);
        }
Ejemplo n.º 34
0
        protected void SetupUi()
        {
            base.ObjectName = "NoAccountsWidget";
            this.Geometry   = new QRect(0, 0, 341, 485);
            QSizePolicy NoAccountsWidget_sizePolicy;

            NoAccountsWidget_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Minimum);
            NoAccountsWidget_sizePolicy.SetVerticalStretch(0);
            NoAccountsWidget_sizePolicy.SetHorizontalStretch(0);
            NoAccountsWidget_sizePolicy.SetHeightForWidth(this.SizePolicy.HasHeightForWidth());
            this.SizePolicy  = NoAccountsWidget_sizePolicy;
            this.WindowTitle = "Form";
            QVBoxLayout verticalLayout;

            verticalLayout                 = new QVBoxLayout(this);
            verticalLayout.Spacing         = 6;
            verticalLayout.Margin          = 6;
            this.m_GraphicsView            = new QGraphicsView(this);
            this.m_GraphicsView.ObjectName = "m_GraphicsView";
            QSizePolicy m_GraphicsView_sizePolicy;

            m_GraphicsView_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed);
            m_GraphicsView_sizePolicy.SetVerticalStretch(0);
            m_GraphicsView_sizePolicy.SetHorizontalStretch(0);
            m_GraphicsView_sizePolicy.SetHeightForWidth(this.m_GraphicsView.SizePolicy.HasHeightForWidth());
            this.m_GraphicsView.SizePolicy  = m_GraphicsView_sizePolicy;
            this.m_GraphicsView.MinimumSize = new QSize(0, 300);
            this.m_GraphicsView.FrameShape  = QFrame.Shape.NoFrame;
            verticalLayout.AddWidget(this.m_GraphicsView);
            this.stackedWidget              = new QStackedWidget(this);
            this.stackedWidget.ObjectName   = "stackedWidget";
            this.stackedWidget.CurrentIndex = 1;
            verticalLayout.AddWidget(this.stackedWidget);
            this.page_3            = new QWidget(this.stackedWidget);
            this.page_3.ObjectName = "page_3";
            QVBoxLayout verticalLayout_2;

            verticalLayout_2         = new QVBoxLayout(this.page_3);
            verticalLayout_2.Spacing = 6;
            verticalLayout_2.Margin  = 0;
            this.m_Label             = new QLabel(this.page_3);
            this.m_Label.ObjectName  = "m_Label";
            QSizePolicy m_Label_sizePolicy;

            m_Label_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Minimum);
            m_Label_sizePolicy.SetVerticalStretch(0);
            m_Label_sizePolicy.SetHorizontalStretch(0);
            m_Label_sizePolicy.SetHeightForWidth(this.m_Label.SizePolicy.HasHeightForWidth());
            this.m_Label.SizePolicy = m_Label_sizePolicy;
            this.m_Label.Text       = "<p><strong>Welcome.</strong><br/>Click <em>Add Account</em> below to begin.";
            this.m_Label.Alignment  = ((global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignBottom") | global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignLeading")) | global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignLeft"));
            verticalLayout_2.AddWidget(this.m_Label);
            QHBoxLayout horizontalLayout_2;

            horizontalLayout_2 = new QHBoxLayout();
            verticalLayout_2.AddLayout(horizontalLayout_2);
            QSpacerItem horizontalSpacer_2;

            horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum);
            horizontalLayout_2.AddItem(horizontalSpacer_2);
            this.quitButton1            = new QPushButton(this.page_3);
            this.quitButton1.ObjectName = "quitButton1";
            this.quitButton1.Text       = "Quit";
            horizontalLayout_2.AddWidget(this.quitButton1);
            this.addAccountButton            = new QPushButton(this.page_3);
            this.addAccountButton.ObjectName = "addAccountButton";
            this.addAccountButton.Text       = "Add Account";
            horizontalLayout_2.AddWidget(this.addAccountButton);
            this.stackedWidget.AddWidget(this.page_3);
            this.page_4            = new QWidget(this.stackedWidget);
            this.page_4.ObjectName = "page_4";
            QVBoxLayout verticalLayout_3;

            verticalLayout_3        = new QVBoxLayout(this.page_4);
            verticalLayout_3.Margin = 0;
            this.label_3            = new QLabel(this.page_4);
            this.label_3.ObjectName = "label_3";
            this.label_3.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:8pt; 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;\">Add Account</span></p></body></html>";
            this.label_3.Alignment  = ((global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignBottom") | global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignLeading")) | global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignLeft"));
            verticalLayout_3.AddWidget(this.label_3);
            QGridLayout gridLayout;

            gridLayout = new QGridLayout();
            verticalLayout_3.AddLayout(gridLayout);
            this.label            = new QLabel(this.page_4);
            this.label.ObjectName = "label";
            this.label.Text       = "Jabber ID:";
            gridLayout.AddWidget(this.label, 0, 0, 1, 1);
            this.m_LoginLineEdit            = new QLineEdit(this.page_4);
            this.m_LoginLineEdit.ObjectName = "m_LoginLineEdit";
            gridLayout.AddWidget(this.m_LoginLineEdit, 0, 1, 1, 1);
            this.label_2            = new QLabel(this.page_4);
            this.label_2.ObjectName = "label_2";
            this.label_2.Text       = "Password:"******"m_PasswordLineEdit";
            this.m_PasswordLineEdit.echoMode   = QLineEdit.EchoMode.Password;
            gridLayout.AddWidget(this.m_PasswordLineEdit, 1, 1, 1, 1);
            QHBoxLayout horizontalLayout;

            horizontalLayout = new QHBoxLayout();
            verticalLayout_3.AddLayout(horizontalLayout);
            horizontalLayout.sizeConstraint = QLayout.SizeConstraint.SetDefaultConstraint;
            QSpacerItem horizontalSpacer;

            horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum);
            horizontalLayout.AddItem(horizontalSpacer);
            this.quitButton2            = new QPushButton(this.page_4);
            this.quitButton2.ObjectName = "quitButton2";
            this.quitButton2.Text       = "Quit";
            horizontalLayout.AddWidget(this.quitButton2);
            this.saveAccountButton             = new QPushButton(this.page_4);
            this.saveAccountButton.ObjectName  = "saveAccountButton";
            this.saveAccountButton.Text        = "OK";
            this.saveAccountButton.AutoDefault = true;
            this.saveAccountButton.Default     = true;
            horizontalLayout.AddWidget(this.saveAccountButton);
            this.stackedWidget.AddWidget(this.page_4);
            QObject.Connect(m_PasswordLineEdit, Qt.SIGNAL("returnPressed()"), saveAccountButton, Qt.SLOT("click()"));
            QObject.Connect(m_LoginLineEdit,Qt.SIGNAL("returnPressed()"),saveAccountButton,Qt.SLOT("click()"));
            QMetaObject.ConnectSlotsByName(this);
            this.label.SetBuddy(m_LoginLineEdit);
            this.label_2.SetBuddy(m_PasswordLineEdit);
        }
Ejemplo n.º 35
0
        protected void SetupUi()
        {
            base.ObjectName  = "AvatarSelectDialog";
            this.Geometry    = new QRect(0, 0, 542, 361);
            this.WindowTitle = "Select Avatar";
            QVBoxLayout verticalLayout_2;

            verticalLayout_2 = new QVBoxLayout(this);
            QHBoxLayout horizontalLayout;

            horizontalLayout = new QHBoxLayout();
            verticalLayout_2.AddLayout(horizontalLayout);
            QVBoxLayout verticalLayout_3;

            verticalLayout_3 = new QVBoxLayout();
            horizontalLayout.AddLayout(verticalLayout_3);
            verticalLayout_3.sizeConstraint = QLayout.SizeConstraint.SetMinimumSize;
            this.label_2            = new QLabel(this);
            this.label_2.ObjectName = "label_2";
            this.label_2.Text       = "Your Avatar:";
            verticalLayout_3.AddWidget(this.label_2);
            this.avatarLabel             = new QLabel(this);
            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_3.AddWidget(this.avatarLabel);
            this.browseButton            = new QPushButton(this);
            this.browseButton.ObjectName = "browseButton";
            this.browseButton.Text       = "Select File...";
            verticalLayout_3.AddWidget(this.browseButton);
            this.clearButton            = new QPushButton(this);
            this.clearButton.ObjectName = "clearButton";
            this.clearButton.Text       = "Clear";
            verticalLayout_3.AddWidget(this.clearButton);
            QSpacerItem verticalSpacer;

            verticalSpacer = new QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding);
            verticalLayout_3.AddItem(verticalSpacer);
            this.line             = new QFrame(this);
            this.line.ObjectName  = "line";
            this.line.FrameShape  = QFrame.Shape.VLine;
            this.line.FrameShadow = QFrame.Shadow.Sunken;
            horizontalLayout.AddWidget(this.line);
            QVBoxLayout verticalLayout;

            verticalLayout = new QVBoxLayout();
            horizontalLayout.AddLayout(verticalLayout);
            QGridLayout gridLayout;

            gridLayout = new QGridLayout();
            verticalLayout.AddLayout(gridLayout);
            this.label_3            = new QLabel(this);
            this.label_3.ObjectName = "label_3";
            this.label_3.Text       = "Search:";
            this.label_3.SetBuddy(lineEdit);
            gridLayout.AddWidget(this.label_3, 0, 0, 1, 1);
            this.lineEdit            = new QLineEdit(this);
            this.lineEdit.ObjectName = "lineEdit";
            gridLayout.AddWidget(this.lineEdit, 0, 1, 1, 1);
            this.searchButton            = new QPushButton(this);
            this.searchButton.ObjectName = "searchButton";
            this.searchButton.Text       = "Search";
            this.searchButton.Default    = true;
            gridLayout.AddWidget(this.searchButton, 0, 2, 1, 1);
            this.tabWidget              = new QTabWidget(this);
            this.tabWidget.ObjectName   = "tabWidget";
            this.tabWidget.CurrentIndex = -1;
            verticalLayout.AddWidget(this.tabWidget);
            this.buttonBox                 = new QDialogButtonBox(this);
            this.buttonBox.ObjectName      = "buttonBox";
            this.buttonBox.StandardButtons = global::Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Close");
            verticalLayout_2.AddWidget(this.buttonBox);
            QObject.Connect(buttonBox, Qt.SIGNAL("rejected()"), this, Qt.SLOT("reject()"));
            QMetaObject.ConnectSlotsByName(this);
        }
Ejemplo n.º 36
0
    public void SetupUi(QDialog NewContactDialog)
    {
        if (NewContactDialog.ObjectName == "")
        {
            NewContactDialog.ObjectName = "NewContactDialog";
        }
        QSize Size = new QSize(360, 150);

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

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

        LblDesc            = new QLabel(NewContactDialog);
        LblDesc.ObjectName = "LblDesc";

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

        TxtDesc            = new QLineEdit(NewContactDialog);
        TxtDesc.ObjectName = "TxtDesc";

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

        LblNumber            = new QLabel(NewContactDialog);
        LblNumber.ObjectName = "LblNumber";

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

        TxtNumber            = new QLineEdit(NewContactDialog);
        TxtNumber.ObjectName = "TxtNumber";

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

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

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

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

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

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

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


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

        QMetaObject.ConnectSlotsByName(NewContactDialog);
    } // SetupUi
Ejemplo n.º 37
0
        protected void SetupUi()
        {
            base.ObjectName  = "AddFriendWindow";
            this.Geometry    = new QRect(0, 0, 285, 349);
            this.WindowTitle = "AddFriend";
            QVBoxLayout verticalLayout;

            verticalLayout        = new QVBoxLayout(this);
            verticalLayout.Margin = 0;
            QHBoxLayout horizontalLayout;

            horizontalLayout = new QHBoxLayout();
            verticalLayout.AddLayout(horizontalLayout);
            QSpacerItem horizontalSpacer;

            horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum);
            horizontalLayout.AddItem(horizontalSpacer);
            this.closeButton            = new QPushButton(this);
            this.closeButton.ObjectName = "closeButton";
            this.closeButton.BaseSize   = new QSize(0, 0);
            this.closeButton.Text       = "";
            horizontalLayout.AddWidget(this.closeButton);
            this.stackedWidget              = new QStackedWidget(this);
            this.stackedWidget.ObjectName   = "stackedWidget";
            this.stackedWidget.CurrentIndex = 0;
            verticalLayout.AddWidget(this.stackedWidget);
            this.page            = new QWidget(this.stackedWidget);
            this.page.ObjectName = "page";
            QVBoxLayout verticalLayout_2;

            verticalLayout_2        = new QVBoxLayout(this.page);
            verticalLayout_2.Margin = 6;
            QSpacerItem verticalSpacer_2;

            verticalSpacer_2 = new QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding);
            verticalLayout_2.AddItem(verticalSpacer_2);
            this.pushButton            = new QPushButton(this.page);
            this.pushButton.ObjectName = "pushButton";
            this.pushButton.Text       = "Search && Add friends automatically...";
            verticalLayout_2.AddWidget(this.pushButton);
            this.pushButton_3            = new QPushButton(this.page);
            this.pushButton_3.ObjectName = "pushButton_3";
            this.pushButton_3.Text       = "Search for friends...";
            verticalLayout_2.AddWidget(this.pushButton_3);
            this.enterJidButton            = new QPushButton(this.page);
            this.enterJidButton.ObjectName = "enterJidButton";
            this.enterJidButton.Text       = "Enter friend's JID...";
            verticalLayout_2.AddWidget(this.enterJidButton);
            QSpacerItem verticalSpacer;

            verticalSpacer = new QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding);
            verticalLayout_2.AddItem(verticalSpacer);
            this.stackedWidget.AddWidget(this.page);
            this.page_2            = new QWidget(this.stackedWidget);
            this.page_2.ObjectName = "page_2";
            QVBoxLayout verticalLayout_3;

            verticalLayout_3        = new QVBoxLayout(this.page_2);
            verticalLayout_3.Margin = 6;
            QSpacerItem verticalSpacer_3;

            verticalSpacer_3 = new QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding);
            verticalLayout_3.AddItem(verticalSpacer_3);
            this.label_2            = new QLabel(this.page_2);
            this.label_2.ObjectName = "label_2";
            this.label_2.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;\"><span style=\" font-weight:600;\">Add Friend</span></p></body></html>";
            verticalLayout_3.AddWidget(this.label_2);
            QGridLayout gridLayout;

            gridLayout = new QGridLayout();
            verticalLayout_3.AddLayout(gridLayout);
            this.label            = new QLabel(this.page_2);
            this.label.ObjectName = "label";
            this.label.Text       = "JID:";
            gridLayout.AddWidget(this.label, 0, 0, 1, 1);
            this.jidLineEdit            = new QLineEdit(this.page_2);
            this.jidLineEdit.ObjectName = "jidLineEdit";
            gridLayout.AddWidget(this.jidLineEdit, 0, 1, 1, 1);
            this.label_4            = new QLabel(this.page_2);
            this.label_4.ObjectName = "label_4";
            this.label_4.Text       = "Name:";
            gridLayout.AddWidget(this.label_4, 1, 0, 1, 1);
            this.nameLineEdit            = new QLineEdit(this.page_2);
            this.nameLineEdit.ObjectName = "nameLineEdit";
            gridLayout.AddWidget(this.nameLineEdit, 1, 1, 1, 1);
            this.label_3            = new QLabel(this.page_2);
            this.label_3.ObjectName = "label_3";
            this.label_3.Text       = "Add to Group(s):";
            verticalLayout_3.AddWidget(this.label_3);
            this.groupsWidget            = new Synapse.QtClient.Widgets.EditGroupsWidget(this.page_2);
            this.groupsWidget.ObjectName = "groupsWidget";
            verticalLayout_3.AddWidget(this.groupsWidget);
            this.buttonBox                 = new QDialogButtonBox(this.page_2);
            this.buttonBox.ObjectName      = "buttonBox";
            this.buttonBox.StandardButtons = global::Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "NoButton");
            verticalLayout_3.AddWidget(this.buttonBox);
            QSpacerItem verticalSpacer_4;

            verticalSpacer_4 = new QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding);
            verticalLayout_3.AddItem(verticalSpacer_4);
            this.stackedWidget.AddWidget(this.page_2);
            QMetaObject.ConnectSlotsByName(this);
        }
Ejemplo n.º 38
0
        protected void SetupUi()
        {
            base.ObjectName     = "TwitterConfigurationDialog";
            this.WindowModality = Qt.WindowModality.NonModal;
            this.Geometry       = new QRect(0, 0, 313, 137);
            this.WindowTitle    = "Twitter Configuration";
            this.Modal          = true;
            QVBoxLayout verticalLayout;

            verticalLayout        = new QVBoxLayout(this);
            verticalLayout.Margin = 6;
            QHBoxLayout horizontalLayout;

            horizontalLayout = new QHBoxLayout();
            verticalLayout.AddLayout(horizontalLayout);
            this.logoLabel             = new QLabel(this);
            this.logoLabel.ObjectName  = "logoLabel";
            this.logoLabel.MinimumSize = new QSize(48, 0);
            this.logoLabel.Text        = "";
            horizontalLayout.AddWidget(this.logoLabel);
            QVBoxLayout verticalLayout_2;

            verticalLayout_2 = new QVBoxLayout();
            horizontalLayout.AddLayout(verticalLayout_2);
            this.label            = new QLabel(this);
            this.label.ObjectName = "label";
            QSizePolicy label_sizePolicy;

            label_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Minimum);
            label_sizePolicy.SetVerticalStretch(0);
            label_sizePolicy.SetHorizontalStretch(0);
            label_sizePolicy.SetHeightForWidth(this.label.SizePolicy.HasHeightForWidth());
            this.label.SizePolicy = label_sizePolicy;
            this.label.Text       = "Enter your Twitter account information:";
            verticalLayout_2.AddWidget(this.label);
            QGridLayout gridLayout_2;

            gridLayout_2 = new QGridLayout();
            verticalLayout_2.AddLayout(gridLayout_2);
            gridLayout_2.sizeConstraint = QLayout.SizeConstraint.SetMaximumSize;
            this.label_2            = new QLabel(this);
            this.label_2.ObjectName = "label_2";
            this.label_2.Text       = "Username:"******"usernameLineEdit";
            gridLayout_2.AddWidget(this.usernameLineEdit, 0, 1, 1, 1);
            this.label_3            = new QLabel(this);
            this.label_3.ObjectName = "label_3";
            this.label_3.Text       = "Password:"******"passwordLineEdit";
            this.passwordLineEdit.echoMode   = QLineEdit.EchoMode.Password;
            gridLayout_2.AddWidget(this.passwordLineEdit, 1, 1, 1, 1);
            this.buttonBox                 = new QDialogButtonBox(this);
            this.buttonBox.ObjectName      = "buttonBox";
            this.buttonBox.Orientation     = Qt.Orientation.Horizontal;
            this.buttonBox.StandardButtons = (global::Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Cancel") | global::Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Ok"));
            verticalLayout.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);
        }
Ejemplo n.º 39
0
 public LifetimeValidator(QLineEdit aLineEdit)
 {
     mLineEdit = aLineEdit;
 }