Example #1
0
        public StatusMapPanel()
        {
            var panel = downPanel();

            model   = new StatusTreeMap(this);
            treeMap = new QTreeMap(model);
            Content = panel;
            var controlGrid = new QGrid();

            ResizingPanel.SetResizeHeight(controlGrid, 23);
            controlGrid.addColumn(1, GridUnitType.Star);
            controlGrid.addColumn(1, GridUnitType.Star);
            controlGrid.addColumn(7, GridUnitType.Star);
            controlGrid.add(new QCheckBox("Equal Size Boxes", true, selected => { model.setIsEqualSizes(selected); treeMap.updateGuiNodes(); })
            {
                VerticalAlignment = VerticalAlignment.Center
            }, 0);
            var refershBox = new QComboBox("5", refreshRate => treeMap.setRefreshRate(int.Parse(refreshRate) * 1000))
            {
                Height = 20
            };

            controlGrid.add(withLabel("Refresh Rate (sec): ", refershBox), 1);
            refershBox.populateWithFirst("1", O.list("3", "5", "10", "30", "60"), false);
            panel.Children.Add(controlGrid);
            panel.Children.Add(treeMap);
            refreshContextMenus();
        }
Example #2
0
        private QGroupBox InitQComboBox()
        {
            var         groupBox = new QGroupBox("QComboBox", this);
            QVBoxLayout vBox     = new QVBoxLayout();
            QComboBox   comboBox = new QComboBox(this);
            QLabel      label    = new QLabel("Silence is a source of great strength.", this);

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

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

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

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

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

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

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

            groupBox.Layout = vBox;
            return groupBox;
        }
Example #4
0
        public CloudSTOPanel()
        {
            var panel = new QDockPanel();

            Content      = panel;
            Loaded      += initialize;
            instanceGrid = new QDataTableGrid(loadInstanceRow, unloadInstanceRow);
            var controls = new QDockPanel();

            systemIdBox = new QComboBox("-1", resetInstanceId, true)
            {
                MinWidth = 80, IsTextSearchEnabled = true, IsSynchronizedWithCurrentItem = false
            };
            controls.add(systemIdBox, Dock.Left);
            var grid = new QGrid();

            grid.addColumns(4);
            instancesLabel = label("");
            grid.add(instancesLabel, 0);
            redGreenLabel = label("");
            grid.add(redGreenLabel, 1);
            summaryLabel = label("");
            grid.add(summaryLabel, 2);
            completionTimeLabel = label("");
            grid.add(completionTimeLabel, 3);
            controls.add(grid, Dock.Left);
            controls.add(new QButton("Refresh System Ids", refreshSystemIds), Dock.Left);
            panel.add(controls, Dock.Top);
            panel.add(instanceGrid, Dock.Top);
            LogC.info("starting cloud STO tracker");
            tracker = new CloudSTOTracker(this);
        }
Example #5
0
            public ReconPanel()
            {
                Producer <string> buttonText = () => "set LOG__VERBOSE " + (Log.verbose() ? "off" : "on");

                QButton[] verboseButton = { null };
                verboseButton[0] = new QButton(buttonText(), () => {
                    bool newVerbose;
                    LogC.flipVerbose(out newVerbose);
                    runOnGuiThread(() => verboseButton[0].setText(buttonText()));
                })
                {
                    HorizontalAlignment = HorizontalAlignment.Left, VerticalAlignment = VerticalAlignment.Top, Width = 250
                };
                var dockPanel = new QDockPanel {
                    LastChildFill = false
                };

                Content = dockPanel;
                dockPanel.add(verboseButton[0], Dock.Top);

                var executionConfigurationGrid = new QGrid {
                    Height = 25
                };

                dockPanel.add(executionConfigurationGrid, Dock.Top);
                O.zeroTo(4, i => executionConfigurationGrid.addColumn(200));
                var platformBox = new TextBox();
                var routeBox    = new TextBox();
                var typeBox     = new QComboBox("Future", selected => {
                    var config       = ExecutionConfigurationTable.currentConfiguration(selected);
                    platformBox.Text = config.platform();
                    routeBox.Text    = config.route();
                }, O.list("Equity"));

                executionConfigurationGrid.add(typeBox, 0);
                executionConfigurationGrid.add(withLabel("Platform", platformBox), 1);
                executionConfigurationGrid.add(withLabel("Route", routeBox), 2);
                executionConfigurationGrid.add(new QButton("Set Current Execution Configuration", () => {
                    var type     = typeBox.selected("NA");
                    var platform = platformBox.Text;
                    var route    = routeBox.Text;
                    ExecutionConfigurationTable.CONFIG.insert(type, platform, route);
                    Db.commit();
                    Email.notification("Execution Configuration Changed for " + type + ": " + platform + ", " + route, "").sendTo("team");
                    alertUser("Configuration changed for " + type + " - don't forget to restart systems to pick up the change.");
                })
                {
                    Width = 200
                }, 3);
            }
Example #6
0
        public ServiceBrowserWindow(Account account)
        {
            SetupUi();

            m_Account = account;
            m_HomeUri = new Uri(String.Format("xmpp:{0}?disco", account.Jid.Server));

            this.WindowTitle = String.Format("XMPP Browser - {0}", account.Jid);

            m_BackAction    = new QAction(Gui.LoadIcon("go-previous", 16), "Back", this);
            m_ForwardAction = new QAction(Gui.LoadIcon("go-next", 16), "Forward", this);
            m_ReloadAction  = new QAction(Gui.LoadIcon("view-refresh", 16), "Reload", this);
            m_StopAction    = new QAction(Gui.LoadIcon("process-stop", 16), "Stop", this);
            m_HomeAction    = new QAction(Gui.LoadIcon("go-home", 16), "Home", this);
            m_GoAction      = new QAction("Go", this);

            m_BackAction.Enabled    = false;
            m_ForwardAction.Enabled = false;

            m_StopAction.Visible = false;

            m_Toolbar = new QToolBar(this);
            m_Toolbar.AddAction(m_BackAction);
            m_Toolbar.AddAction(m_ForwardAction);
            m_Toolbar.AddAction(m_ReloadAction);
            m_Toolbar.AddAction(m_StopAction);
            m_Toolbar.AddAction(m_HomeAction);

            m_AddresCombo = new QComboBox(m_Toolbar);
            m_AddresCombo.SetSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed);
            m_AddresCombo.Editable = true;
            m_Toolbar.AddWidget(m_AddresCombo);

            m_Toolbar.AddAction(m_GoAction);

            QObject.Connect <QAction>(m_Toolbar, Qt.SIGNAL("actionTriggered(QAction*)"), HandleToolbarActionTriggered);

            ((QBoxLayout)this.Layout()).InsertWidget(0, m_Toolbar);

            webView.Page().linkDelegationPolicy = QWebPage.LinkDelegationPolicy.DelegateAllLinks;

            RequestUrl(m_HomeUri);

            Gui.CenterWidgetOnScreen(this);
        }
Example #7
0
        public OrdersPanel()
        {
            var panel = new QDockPanel();

            Content = panel;
            Loaded += initialize;

            systemBox = new QComboBox(onSystemSelected);
            pvBox     = new QComboBox(onPvSelected);
            marketBox = new QComboBox(onMarketSelected);
            filterBox = new QComboBox("ALL", onFilterSelected, O.list("Not Ferret", "Ferret"));
            panel.add(comboBoxPanel(), Dock.Top);
            panel.add(new FerretPanel(), Dock.Bottom);
            orderGrid = new QDataTableGrid(loadOrderRow, unloadOrderRow);
            panel.add(orderGrid);

            LogC.info("starting order tracker");
            orderTracker = new OrderTracker(this);
        }
Example #8
0
        //public ComboBoxDemo()
        //{
        //	WindowTitle = "ComboBox Demo";

        //	InitUI();

        //	Resize(250, 200);
        //	Move(100, 100);
        //	Show();
        //}

        public override void InitUI()
        {
            var layout = new QVBoxLayout(this);

            label = new QLabel("Selected");
            label.AdjustSize();

            layout.AddWidget(label);

            var combo = new QComboBox(this);

            combo.AddItem("Ubuntu");
            combo.AddItem("Arch");
            combo.AddItem("Fedora");
            combo.AddItem("Red Hat");
            combo.AddItem("Gentoo");

            layout.AddWidget(combo);

            combo.ActivatedText += OnActivated;
        }
Example #9
0
 public MainPanel()
 {
     marketBox = new QComboBox("ALL", marketSelected, true);
     idBox     = new QTextBox(systemIdSelected);
     setLayout();
 }
Example #10
0
        internal ChatWindow(IChatHandler handler)
        {
            if (handler == null)
            {
                throw new ArgumentNullException("handler");
            }
            m_Handler = handler;

            var settingsService = ServiceManager.Get <SettingsService>();

            SetupUi();

            if (handler is MucHandler)
            {
                m_ParticipantsMenu = new QMenu(this);
                QObject.Connect(m_ParticipantsMenu, Qt.SIGNAL("aboutToShow()"), HandleMenuAboutToShow);
                QObject.Connect(m_ParticipantsMenu, Qt.SIGNAL("aboutToHide()"), HandleMenuAboutToHide);

                var mucHandler = (MucHandler)handler;
                participantsGrid.Model             = mucHandler.GridModel;
                participantsGrid.ContextMenuPolicy = Qt.ContextMenuPolicy.CustomContextMenu;
                participantsGrid.ItemActivated    += HandleItemActivated;

                participantsGrid.ListMode = settingsService.Get <bool>("MucListMode");
                if (settingsService.Has("MucIconSize"))
                {
                    participantsGrid.IconSize = settingsService.Get <int>("MucIconSize");
                }

                var group = new QActionGroup(this);

                var gridModeAction = new QAction("View as Grid", this);
                QObject.Connect(gridModeAction, Qt.SIGNAL("triggered()"), HandleGridModeActionTriggered);
                gridModeAction.SetActionGroup(group);
                gridModeAction.Checkable = true;
                gridModeAction.Checked   = true;
                m_ParticipantsMenu.AddAction(gridModeAction);

                var listModeAction = new QAction("View as List", this);
                QObject.Connect(listModeAction, Qt.SIGNAL("triggered()"), HandleListModeActionTriggered);
                listModeAction.SetActionGroup(group);
                listModeAction.Checkable = true;
                listModeAction.Checked   = participantsGrid.ListMode;
                m_ParticipantsMenu.AddAction(listModeAction);

                var separatorAction = new QAction(participantsGrid);
                separatorAction.SetSeparator(true);
                m_ParticipantsMenu.AddAction(separatorAction);

                var sliderAction = new AvatarGridZoomAction <jabber.connection.RoomParticipant>(participantsGrid);
                sliderAction.ValueChanged += delegate(int value) {
                    participantsGrid.IconSize = value;
                    settingsService.Set("MucIconSize", value);
                };
                m_ParticipantsMenu.AddAction(sliderAction);

                m_ParticipantItemMenu = new QMenu(this);
                QObject.Connect(m_ParticipantItemMenu, Qt.SIGNAL("aboutToShow()"), HandleMenuAboutToShow);
                QObject.Connect(m_ParticipantItemMenu, Qt.SIGNAL("aboutToHide()"), HandleMenuAboutToHide);

                var mucViewProfileAction = new QAction("View Profile", this);
                QObject.Connect(mucViewProfileAction, Qt.SIGNAL("triggered()"), HandleMucViewProfileActionTriggered);
                m_ParticipantItemMenu.AddAction(mucViewProfileAction);

                var mucPrivateMessageAction = new QAction("IM", this);
                QObject.Connect(mucPrivateMessageAction, Qt.SIGNAL("triggered()"), HandleMucPrivateMessageTriggered);
                m_ParticipantItemMenu.AddAction(mucPrivateMessageAction);

                var mucSendFileAction = new QAction("Send File...", this);
                QObject.Connect(mucSendFileAction, Qt.SIGNAL("triggered()"), HandleMucSendFileActionTriggered);
                m_ParticipantItemMenu.AddAction(mucSendFileAction);

                var mucViewHistoryAction = new QAction("View History", this);
                QObject.Connect(mucViewHistoryAction, Qt.SIGNAL("triggered()"), HandleMucViewHistoryActionTriggered);
                m_ParticipantItemMenu.AddAction(mucViewHistoryAction);

                m_ModeratorActionsMenu = new QMenu("Moderator Actions", this);

                var roomRoleActionGroup = new QActionGroup(this);
                QObject.Connect(roomRoleActionGroup, Qt.SIGNAL("triggered(QAction*)"), this, Qt.SLOT("HandleRoomRoleActionGroupTriggered(QAction*)"));

                m_ModeratorAction = new QAction("Moderator",this);
                roomRoleActionGroup.AddAction(m_ModeratorAction);
                m_ModeratorAction.Checkable = true;
                m_ModeratorActionsMenu.AddAction(m_ModeratorAction);

                m_ParticipantAction = new QAction("Participant",this);
                roomRoleActionGroup.AddAction(m_ParticipantAction);
                m_ParticipantAction.Checkable = true;
                m_ModeratorActionsMenu.AddAction(m_ParticipantAction);

                m_VisitorAction = new QAction("Visitor",this);
                roomRoleActionGroup.AddAction(m_VisitorAction);
                m_VisitorAction.Checkable = true;
                m_ModeratorActionsMenu.AddAction(m_VisitorAction);

                m_ModeratorActionsMenu.AddSeparator();

                var mucKickAction = new QAction("Kick...",this);
                QObject.Connect(mucKickAction,Qt.SIGNAL("triggered()"),HandleMucKickActionTriggered);
                m_ModeratorActionsMenu.AddAction(mucKickAction);

                var mucBanAction = new QAction("Ban...",this);
                QObject.Connect(mucBanAction,Qt.SIGNAL("triggered()"),HandleMucBanActionTriggered);
                m_ModeratorActionsMenu.AddAction(mucBanAction);

                m_ModeratorActionsMenu.AddSeparator();

                m_ChangeAffiliationAction = new QAction("Change Affiliation...",this);
                QObject.Connect(m_ChangeAffiliationAction,Qt.SIGNAL("triggered()"),HandleChangeAffiliationTriggered);
                m_ModeratorActionsMenu.AddAction(m_ChangeAffiliationAction);

                m_ParticipantItemMenu.AddSeparator();
                m_ParticipantItemMenu.AddMenu(m_ModeratorActionsMenu);

                m_ParticipantItemMenu.AddSeparator();

                m_AddAsFriendAction = new QAction("Add as Friend",this);
                m_ParticipantItemMenu.AddAction(m_AddAsFriendAction);

                this.WindowTitle = mucHandler.Room.JID.User;                 // FIXME: Show only "user" in tab, show full room jid in title?
                this.WindowIcon  = Gui.LoadIcon("internet-group-chat");
            }
            else
            {
                var chatHandler = (ChatHandler)handler;
                rightContainer.Hide();

                if (((ChatHandler)handler).IsMucMessage)
                {
                    this.WindowTitle = chatHandler.Jid.Resource;
                }
                else
                {
                    this.WindowTitle = chatHandler.Account.GetDisplayName(chatHandler.Jid);
                }
                this.WindowIcon = new QIcon((QPixmap)Synapse.Xmpp.AvatarManager.GetAvatar(chatHandler.Jid));
            }

            m_ConversationWidget.ChatHandler = handler;

            handler.ReadyChanged += HandleReadyChanged;

            splitter.SetStretchFactor(1,0);
            splitter_2.SetStretchFactor(1,0);

            if (settingsService.Has("MucSplitterState"))
            {
                byte[] state = settingsService.Get <byte[]>("MucSplitterState");
                splitter_2.RestoreState(QByteArrayConverter.FromArray(state));
            }

            KeyPressEater eater = new KeyPressEater(this);

            eater.KeyEvent += HandleKeyEvent;
            textEdit.InstallEventFilter(eater);

            QToolBar toolbar = new QToolBar(this);

            toolbar.IconSize = new QSize(16,16);

            var formatMenuButton = new QToolButton(this);

            var formatMenu = new QMenu(this);

            QObject.Connect <QAction>(formatMenu,Qt.SIGNAL("triggered(QAction*)"),HandleFormatMenuActionTriggered);
            formatMenuButton.ToolButtonStyle = ToolButtonStyle.ToolButtonTextBesideIcon;
            formatMenuButton.Text            = "Format";
            formatMenuButton.icon            = Gui.LoadIcon("preferences-desktop-font",16);
            formatMenuButton.PopupMode       = QToolButton.ToolButtonPopupMode.InstantPopup;
            formatMenuButton.SetMenu(formatMenu);
            toolbar.AddWidget(formatMenuButton);

            m_BoldAction           = new QAction(Gui.LoadIcon("format-text-bold",16),"Bold",this);
            m_BoldAction.Shortcut  = "Ctrl+B";
            m_BoldAction.Checkable = true;
            formatMenu.AddAction(m_BoldAction);

            m_ItalicAction           = new QAction(Gui.LoadIcon("format-text-italic",16),"Italic",this);
            m_ItalicAction.Shortcut  = "Ctrl+I";
            m_ItalicAction.Checkable = true;
            formatMenu.AddAction(m_ItalicAction);

            m_UnderlineAction           = new QAction(Gui.LoadIcon("format-text-underline",16),"Underline",this);
            m_UnderlineAction.Shortcut  = "Ctrl+U";
            m_UnderlineAction.Checkable = true;
            formatMenu.AddAction(m_UnderlineAction);

            m_StrikethroughAction           = new QAction(Gui.LoadIcon("format-text-strikethrough",16),"Strikethrough",this);
            m_StrikethroughAction.Shortcut  = "Ctrl+S";
            m_StrikethroughAction.Checkable = true;
            formatMenu.AddAction(m_StrikethroughAction);

            formatMenu.AddSeparator();

            m_ClearFormattingAction = new QAction(Gui.LoadIcon("edit-clear",16),"Clear Formatting",this);
            formatMenu.AddAction(m_ClearFormattingAction);

            var insertMenu       = new QMenu(this);
            var insertMenuButton = new QToolButton(this);

            insertMenuButton.ToolButtonStyle = ToolButtonStyle.ToolButtonTextBesideIcon;
            insertMenuButton.Text            = "Insert";
            insertMenuButton.icon            = Gui.LoadIcon("image-x-generic",16);
            insertMenuButton.PopupMode       = QToolButton.ToolButtonPopupMode.InstantPopup;
            insertMenuButton.SetMenu(insertMenu);
            toolbar.AddWidget(insertMenuButton);

            m_InsertPhotoAction = new QAction(Gui.LoadIcon("insert-image",16),"Photo...",this);
            QObject.Connect(m_InsertPhotoAction,Qt.SIGNAL("triggered()"),HandleInsertImageActionTriggered);
            insertMenu.AddAction(m_InsertPhotoAction);

            m_InsertLinkAction = new QAction(Gui.LoadIcon("insert-link",16),"Link...",this);
            QObject.Connect(m_InsertLinkAction,Qt.SIGNAL("triggered()"),HandleInsertLinkActionTriggered);
            insertMenu.AddAction(m_InsertLinkAction);

            foreach (IActionCodon node in AddinManager.GetExtensionNodes("/Synapse/QtClient/ChatWindow/InsertActions"))
            {
                insertMenu.AddAction((QAction)node.CreateInstance(this));
            }

            toolbar.AddSeparator();

            var activitiesMenu       = new QMenu(this);
            var activitiesMenuButton = new QToolButton(this);

            activitiesMenuButton.ToolButtonStyle = ToolButtonStyle.ToolButtonTextBesideIcon;
            activitiesMenuButton.Text            = "Activities";
            activitiesMenuButton.icon            = Gui.LoadIcon("applications-games",16);   // FIXME: Not a good icon.
            activitiesMenuButton.PopupMode       = QToolButton.ToolButtonPopupMode.InstantPopup;
            activitiesMenuButton.SetMenu(activitiesMenu);
            toolbar.AddWidget(activitiesMenuButton);

            m_InviteToMucAction = new QAction(Gui.LoadIcon("internet-group-chat",16),"Invite to Conference...",this);
            QObject.Connect(m_InviteToMucAction,Qt.SIGNAL("triggered()"),HandleInviteToMucActionTriggered);
            activitiesMenu.AddAction(m_InviteToMucAction);
            activitiesMenu.AddSeparator();

            activitiesMenu.AddAction(Gui.LoadIcon("applications-graphics",16),"Launch Whiteboard...");
            activitiesMenu.AddAction(Gui.LoadIcon("user-desktop",16),"Share Desktop...");

            var spacerWidget = new QWidget(toolbar);

            spacerWidget.SetSizePolicy(QSizePolicy.Policy.Expanding,QSizePolicy.Policy.Fixed);
            toolbar.AddWidget(spacerWidget);

            var toContainer = new QWidget(toolbar);
            var layout      = new QHBoxLayout(toContainer);

            layout.SetContentsMargins(0,0,4,0);

            m_ToComboBox = new QComboBox(toContainer);

            layout.AddWidget(new QLabel("To:",toContainer));
            layout.AddWidget(m_ToComboBox);

            QAction toWidgetAction = (QWidgetAction)toolbar.AddWidget(toContainer);

            m_ToComboBox.AddItem("Automatic","auto");
            m_ToComboBox.InsertSeparator(1);

            ((QVBoxLayout)bottomContainer.Layout()).InsertWidget(0,toolbar);

            if (handler is ChatHandler)
            {
                var chatHandler = (ChatHandler)handler;
                handler.Account.Client.OnPresence += delegate(object sender,Presence pres) {
                    if (pres.From.Bare != chatHandler.Jid.Bare || pres.Priority == "-1")
                    {
                        return;
                    }
                    QApplication.Invoke(delegate {
                        if (!String.IsNullOrEmpty(pres.From.Resource))
                        {
                            if (pres.Type == PresenceType.available)
                            {
                                string text = String.Format("{0} ({1})",Helper.GetResourceDisplay(pres),Helper.GetPresenceDisplay(pres));
                                int i       = m_ToComboBox.FindData(pres.From.Resource);
                                if (i == -1)
                                {
                                    m_ToComboBox.AddItem(text,pres.From.Resource);
                                }
                                else
                                {
                                    m_ToComboBox.SetItemText(i,text);
                                }
                            }
                            else if (pres.Type == PresenceType.unavailable)
                            {
                                int i = m_ToComboBox.FindData(pres.From.Resource);
                                if (i > -1)
                                {
                                    m_ToComboBox.RemoveItem(i);
                                    m_ToComboBox.CurrentIndex = 0;
                                }
                            }
                        }

                        if (chatHandler.IsMucMessage)
                        {
                            toWidgetAction.Visible = false;
                        }
                        else
                        {
                            string title = null;
                            if (handler.Account.PresenceManager[pres.From.BareJID] == null)
                            {
                                title = String.Format("{0} (Offline)",chatHandler.Account.GetDisplayName(chatHandler.Jid));
                            }
                            else
                            {
                                title = chatHandler.Account.GetDisplayName(chatHandler.Jid);
                            }
                            Gui.TabbedChatsWindow.SetTabTitle(this,title);
                        }
                    });
                };

                foreach (var presence in chatHandler.Account.PresenceManager.GetAll(chatHandler.Jid))
                {
                    if (presence.Priority != "-1" && !String.IsNullOrEmpty(presence.From.Resource))
                    {
                        string text = String.Format("{0} ({1})",Helper.GetResourceDisplay(presence),Helper.GetPresenceDisplay(presence));
                        m_ToComboBox.AddItem(text,presence.From.Resource);
                    }
                }

                // FIXME: Make this a menu with "View Profile" and "View History".
                var viewProfileAction = new QAction(Gui.LoadIcon("info",16),"View Profile",this);
                QObject.Connect(viewProfileAction,Qt.SIGNAL("triggered()"),HandleViewProfileActionTriggered);
                toolbar.AddAction(viewProfileAction);
            }
            else
            {
                toWidgetAction.Visible = false;
            }

            QObject.Connect <bool>(m_ConversationWidget.Page(),Qt.SIGNAL("loadFinished(bool)"),delegate(bool ok) {
                if (!ok)
                {
                    throw new Exception("Failed to load chat html.");
                }
                handler.NewContent += HandleNewContent;
                m_Handler.FireQueued();
            });

            var settings = ServiceManager.Get <SettingsService>();

            m_ConversationWidget.ShowHeader    = settings.Get <bool>("MessageShowHeader");
            m_ConversationWidget.ShowUserIcons = settings.Get <bool>("MessageShowAvatars");
            m_ConversationWidget.LoadTheme(settings.Get <string>("MessageTheme"),settings.Get <string>("MessageThemeVariant"));
        }
Example #11
0
        protected void SetupUi()
        {
            base.ObjectName  = "InsertSnippetDialog";
            this.Geometry    = new QRect(0, 0, 400, 300);
            this.WindowTitle = "Insert Code Snippet";
            QVBoxLayout verticalLayout;

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

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

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

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

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

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

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

            horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum);
            horizontalLayout_3.AddItem(horizontalSpacer_2);
            this.buttonBox                 = new QDialogButtonBox(this);
            this.buttonBox.ObjectName      = "buttonBox";
            this.buttonBox.StandardButtons = global::Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "NoButton");
            horizontalLayout_3.AddWidget(this.buttonBox);
            QObject.Connect(buttonBox, Qt.SIGNAL("accepted()"), this, Qt.SLOT("accept()"));
            QObject.Connect(buttonBox,Qt.SIGNAL("rejected()"),this,Qt.SLOT("reject()"));
            QMetaObject.ConnectSlotsByName(this);
        }
Example #12
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);
        }
Example #13
0
    public void SetupUi(QDialog SettingsDialog)
    {
        if (SettingsDialog.ObjectName == "")
        SettingsDialog.ObjectName = "SettingsDialog";
        QSize Size = new QSize(320, 280);
        Size = Size.ExpandedTo(SettingsDialog.MinimumSizeHint());
        SettingsDialog.Size = Size;
        SettingsDialog.MinimumSize = new QSize(320, 280);
        SettingsDialog.Modal = true;
        gridLayout = new QGridLayout(SettingsDialog);
        gridLayout.ObjectName = "gridLayout";
        FrameSettings = new QGroupBox(SettingsDialog);
        FrameSettings.ObjectName = "FrameSettings";
        gridLayout1 = new QGridLayout(FrameSettings);
        gridLayout1.ObjectName = "gridLayout1";
        LblPortSpeedReset = new QLabel(FrameSettings);
        LblPortSpeedReset.ObjectName = "LblPortSpeedReset";
        QSizePolicy sizePolicy = new QSizePolicy(QSizePolicy.Policy.Fixed, QSizePolicy.Policy.Preferred);
        sizePolicy.SetHorizontalStretch(0);
        sizePolicy.SetVerticalStretch(0);
        sizePolicy.SetHeightForWidth(LblPortSpeedReset.SizePolicy.HasHeightForWidth());
        LblPortSpeedReset.SizePolicy = sizePolicy;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        RetranslateUi(SettingsDialog);

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

        Size = Size.ExpandedTo(SettingsDialog.MinimumSizeHint());
        SettingsDialog.Size        = Size;
        SettingsDialog.MinimumSize = new QSize(320, 280);
        SettingsDialog.WindowIcon  = new QIcon(":/main/resources/monosim_128.png");
        SettingsDialog.Modal       = true;
        gridLayout                   = new QGridLayout(SettingsDialog);
        gridLayout.ObjectName        = "gridLayout";
        FrameSettings                = new QGroupBox(SettingsDialog);
        FrameSettings.ObjectName     = "FrameSettings";
        gridLayout1                  = new QGridLayout(FrameSettings);
        gridLayout1.ObjectName       = "gridLayout1";
        LblPortSpeedReset            = new QLabel(FrameSettings);
        LblPortSpeedReset.ObjectName = "LblPortSpeedReset";
        QSizePolicy sizePolicy = new QSizePolicy(QSizePolicy.Policy.Fixed, QSizePolicy.Policy.Preferred);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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


        RetranslateUi(SettingsDialog);

        QMetaObject.ConnectSlotsByName(SettingsDialog);
    } // SetupUi
Example #15
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);
 }
Example #16
0
        protected void SetupUi()
        {
            base.ObjectName  = "PreferencesWindow";
            this.Geometry    = new QRect(0, 0, 559, 480);
            this.WindowTitle = "Synapse Preferences";
            QVBoxLayout verticalLayout;

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

            verticalLayout_2                       = new QVBoxLayout(this.tab);
            verticalLayout_2.Spacing               = 6;
            verticalLayout_2.Margin                = 12;
            this.accountsList                      = new QTableView(this.tab);
            this.accountsList.ObjectName           = "accountsList";
            this.accountsList.AlternatingRowColors = true;
            this.accountsList.selectionMode        = QAbstractItemView.SelectionMode.SingleSelection;
            this.accountsList.selectionBehavior    = QAbstractItemView.SelectionBehavior.SelectRows;
            this.accountsList.ShowGrid             = false;
            this.accountsList.WordWrap             = false;
            verticalLayout_2.AddWidget(this.accountsList);
            this.widget            = new QWidget(this.tab);
            this.widget.ObjectName = "widget";
            QHBoxLayout horizontalLayout;

            horizontalLayout                 = new QHBoxLayout(this.widget);
            horizontalLayout.Margin          = 0;
            this.addAccountButton            = new QPushButton(this.widget);
            this.addAccountButton.ObjectName = "addAccountButton";
            this.addAccountButton.Enabled    = true;
            this.addAccountButton.Text       = "Add Account";
            horizontalLayout.AddWidget(this.addAccountButton);
            this.editAccountButton            = new QPushButton(this.widget);
            this.editAccountButton.ObjectName = "editAccountButton";
            this.editAccountButton.Enabled    = true;
            this.editAccountButton.Text       = "Edit Account";
            horizontalLayout.AddWidget(this.editAccountButton);
            this.removeAccountButton            = new QPushButton(this.widget);
            this.removeAccountButton.ObjectName = "removeAccountButton";
            this.removeAccountButton.Enabled    = true;
            this.removeAccountButton.Text       = "Remove Account";
            horizontalLayout.AddWidget(this.removeAccountButton);
            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, "Accounts");
            this.appearanceTab            = new QWidget(this.tabWidget);
            this.appearanceTab.ObjectName = "appearanceTab";
            this.appearanceTab.Enabled    = false;
            QVBoxLayout verticalLayout_6;

            verticalLayout_6           = new QVBoxLayout(this.appearanceTab);
            verticalLayout_6.Margin    = 6;
            this.groupBox_5            = new QGroupBox(this.appearanceTab);
            this.groupBox_5.ObjectName = "groupBox_5";
            this.groupBox_5.Title      = "Friends List";
            QFormLayout formLayout_2;

            formLayout_2            = new QFormLayout(this.groupBox_5);
            formLayout_2.Margin     = 6;
            this.label_4            = new QLabel(this.groupBox_5);
            this.label_4.ObjectName = "label_4";
            this.label_4.Text       = "Display As:";
            formLayout_2.SetWidget(0, QFormLayout.ItemRole.LabelRole, this.label_4);
            this.comboBox_3            = new QComboBox(this.groupBox_5);
            this.comboBox_3.ObjectName = "comboBox_3";
            QSizePolicy comboBox_3_sizePolicy;

            comboBox_3_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Fixed);
            comboBox_3_sizePolicy.SetVerticalStretch(0);
            comboBox_3_sizePolicy.SetHorizontalStretch(0);
            comboBox_3_sizePolicy.SetHeightForWidth(this.comboBox_3.SizePolicy.HasHeightForWidth());
            this.comboBox_3.SizePolicy = comboBox_3_sizePolicy;
            formLayout_2.SetWidget(0, QFormLayout.ItemRole.FieldRole, this.comboBox_3);
            this.comboBox_3.InsertItems(0, new System.Collections.Generic.List <string>(new string[] {
                "Grid",
                "List"
            }));
            this.horizontalSlider            = new QSlider(this.groupBox_5);
            this.horizontalSlider.ObjectName = "horizontalSlider";
            QSizePolicy horizontalSlider_sizePolicy;

            horizontalSlider_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Fixed);
            horizontalSlider_sizePolicy.SetVerticalStretch(0);
            horizontalSlider_sizePolicy.SetHorizontalStretch(0);
            horizontalSlider_sizePolicy.SetHeightForWidth(this.horizontalSlider.SizePolicy.HasHeightForWidth());
            this.horizontalSlider.SizePolicy         = horizontalSlider_sizePolicy;
            this.horizontalSlider.Maximum            = 48;
            this.horizontalSlider.Value              = 32;
            this.horizontalSlider.Orientation        = Qt.Orientation.Horizontal;
            this.horizontalSlider.InvertedAppearance = false;
            this.horizontalSlider.InvertedControls   = false;
            formLayout_2.SetWidget(2, QFormLayout.ItemRole.FieldRole, this.horizontalSlider);
            this.comboBox_4            = new QComboBox(this.groupBox_5);
            this.comboBox_4.ObjectName = "comboBox_4";
            QSizePolicy comboBox_4_sizePolicy;

            comboBox_4_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Fixed);
            comboBox_4_sizePolicy.SetVerticalStretch(0);
            comboBox_4_sizePolicy.SetHorizontalStretch(0);
            comboBox_4_sizePolicy.SetHeightForWidth(this.comboBox_4.SizePolicy.HasHeightForWidth());
            this.comboBox_4.SizePolicy = comboBox_4_sizePolicy;
            formLayout_2.SetWidget(1, QFormLayout.ItemRole.FieldRole, this.comboBox_4);
            this.comboBox_4.InsertItems(0, new System.Collections.Generic.List <string>(new string[] {
                "Name",
                "Status"
            }));
            this.label_7            = new QLabel(this.groupBox_5);
            this.label_7.ObjectName = "label_7";
            this.label_7.Text       = "Sort By:";
            formLayout_2.SetWidget(1, QFormLayout.ItemRole.LabelRole, this.label_7);
            this.label_5            = new QLabel(this.groupBox_5);
            this.label_5.ObjectName = "label_5";
            this.label_5.Text       = "Icon Size:";
            formLayout_2.SetWidget(2, QFormLayout.ItemRole.LabelRole, this.label_5);
            verticalLayout_6.AddWidget(this.groupBox_5);
            this.groupBox_4            = new QGroupBox(this.appearanceTab);
            this.groupBox_4.ObjectName = "groupBox_4";
            this.groupBox_4.Title      = "Activity Feed";
            QGridLayout gridLayout_4;

            gridLayout_4            = new QGridLayout(this.groupBox_4);
            this.label_6            = new QLabel(this.groupBox_4);
            this.label_6.ObjectName = "label_6";
            this.label_6.Text       = "Put options here";
            gridLayout_4.AddWidget(this.label_6, 0, 0, 1, 1);
            verticalLayout_6.AddWidget(this.groupBox_4);
            this.groupBox_6            = new QGroupBox(this.appearanceTab);
            this.groupBox_6.ObjectName = "groupBox_6";
            this.groupBox_6.Title      = "Emoticons";
            QGridLayout gridLayout_6;

            gridLayout_6               = new QGridLayout(this.groupBox_6);
            gridLayout_6.Margin        = 6;
            this.comboBox_5            = new QComboBox(this.groupBox_6);
            this.comboBox_5.ObjectName = "comboBox_5";
            QSizePolicy comboBox_5_sizePolicy;

            comboBox_5_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed);
            comboBox_5_sizePolicy.SetVerticalStretch(0);
            comboBox_5_sizePolicy.SetHorizontalStretch(0);
            comboBox_5_sizePolicy.SetHeightForWidth(this.comboBox_5.SizePolicy.HasHeightForWidth());
            this.comboBox_5.SizePolicy = comboBox_5_sizePolicy;
            gridLayout_6.AddWidget(this.comboBox_5, 0, 1, 1, 1);
            this.comboBox_5.InsertItems(0, new System.Collections.Generic.List <string>(new string[] {
                "Disabled"
            }));
            this.label_8            = new QLabel(this.groupBox_6);
            this.label_8.ObjectName = "label_8";
            this.label_8.Text       = "Theme:";
            gridLayout_6.AddWidget(this.label_8, 0, 0, 1, 1);
            verticalLayout_6.AddWidget(this.groupBox_6);
            QSpacerItem verticalSpacer_3;

            verticalSpacer_3 = new QSpacerItem(20, 260, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding);
            verticalLayout_6.AddItem(verticalSpacer_3);
            this.tabWidget.AddTab(this.appearanceTab, "Appearance");
            this.tab_5            = new QWidget(this.tabWidget);
            this.tab_5.ObjectName = "tab_5";
            QVBoxLayout verticalLayout_5;

            verticalLayout_5                      = new QVBoxLayout(this.tab_5);
            verticalLayout_5.Spacing              = 0;
            verticalLayout_5.Margin               = 0;
            this.messagePreviewWebView            = new Synapse.QtClient.Widgets.ConversationWidget(this.tab_5);
            this.messagePreviewWebView.ObjectName = "messagePreviewWebView";
            QSizePolicy messagePreviewWebView_sizePolicy;

            messagePreviewWebView_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Fixed);
            messagePreviewWebView_sizePolicy.SetVerticalStretch(140);
            messagePreviewWebView_sizePolicy.SetHorizontalStretch(0);
            messagePreviewWebView_sizePolicy.SetHeightForWidth(this.messagePreviewWebView.SizePolicy.HasHeightForWidth());
            this.messagePreviewWebView.SizePolicy  = messagePreviewWebView_sizePolicy;
            this.messagePreviewWebView.MaximumSize = new QSize(16777215, 140);
            this.messagePreviewWebView.Url         = new QUrl("about:blank");
            verticalLayout_5.AddWidget(this.messagePreviewWebView);
            this.line             = new QFrame(this.tab_5);
            this.line.ObjectName  = "line";
            this.line.FrameShape  = QFrame.Shape.HLine;
            this.line.FrameShadow = QFrame.Shadow.Sunken;
            verticalLayout_5.AddWidget(this.line);
            QGridLayout gridLayout;

            gridLayout = new QGridLayout();
            verticalLayout_5.AddLayout(gridLayout);
            gridLayout.sizeConstraint = QLayout.SizeConstraint.SetDefaultConstraint;
            gridLayout.Margin         = 6;
            gridLayout.Spacing        = 6;
            this.label            = new QLabel(this.tab_5);
            this.label.ObjectName = "label";
            this.label.Text       = "Message Style:";
            gridLayout.AddWidget(this.label, 0, 0, 1, 1);
            this.messageStyleCombo            = new QComboBox(this.tab_5);
            this.messageStyleCombo.ObjectName = "messageStyleCombo";
            QSizePolicy messageStyleCombo_sizePolicy;

            messageStyleCombo_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed);
            messageStyleCombo_sizePolicy.SetVerticalStretch(0);
            messageStyleCombo_sizePolicy.SetHorizontalStretch(0);
            messageStyleCombo_sizePolicy.SetHeightForWidth(this.messageStyleCombo.SizePolicy.HasHeightForWidth());
            this.messageStyleCombo.SizePolicy = messageStyleCombo_sizePolicy;
            gridLayout.AddWidget(this.messageStyleCombo, 0, 1, 1, 1);
            this.label_10             = new QLabel(this.tab_5);
            this.label_10.ObjectName  = "label_10";
            this.label_10.Enabled     = false;
            this.label_10.MaximumSize = new QSize(120, 16777215);
            this.label_10.Text        = "Style changes take effect for new message windows.";
            this.label_10.Alignment   = ((global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignLeading") | global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignLeft")) | global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignTop"));
            this.label_10.WordWrap    = true;
            gridLayout.AddWidget(this.label_10, 0, 2, 2, 1);
            this.label_2            = new QLabel(this.tab_5);
            this.label_2.ObjectName = "label_2";
            this.label_2.Text       = "Variant:";
            gridLayout.AddWidget(this.label_2, 1, 0, 1, 1);
            this.messageStyleVariantCombo            = new QComboBox(this.tab_5);
            this.messageStyleVariantCombo.ObjectName = "messageStyleVariantCombo";
            QSizePolicy messageStyleVariantCombo_sizePolicy;

            messageStyleVariantCombo_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed);
            messageStyleVariantCombo_sizePolicy.SetVerticalStretch(0);
            messageStyleVariantCombo_sizePolicy.SetHorizontalStretch(0);
            messageStyleVariantCombo_sizePolicy.SetHeightForWidth(this.messageStyleVariantCombo.SizePolicy.HasHeightForWidth());
            this.messageStyleVariantCombo.SizePolicy = messageStyleVariantCombo_sizePolicy;
            gridLayout.AddWidget(this.messageStyleVariantCombo, 1, 1, 1, 1);
            this.showAvatarsCheckBox            = new QCheckBox(this.tab_5);
            this.showAvatarsCheckBox.ObjectName = "showAvatarsCheckBox";
            this.showAvatarsCheckBox.Text       = "Show avatars";
            this.showAvatarsCheckBox.Checked    = true;
            gridLayout.AddWidget(this.showAvatarsCheckBox, 2, 1, 1, 1);
            this.showHeaderCheckBox            = new QCheckBox(this.tab_5);
            this.showHeaderCheckBox.ObjectName = "showHeaderCheckBox";
            this.showHeaderCheckBox.Text       = "Show header";
            this.showHeaderCheckBox.Checked    = true;
            gridLayout.AddWidget(this.showHeaderCheckBox, 3, 1, 1, 1);
            this.label_3            = new QLabel(this.tab_5);
            this.label_3.ObjectName = "label_3";
            this.label_3.Text       = "Font:";
            gridLayout.AddWidget(this.label_3, 4, 0, 1, 1);
            this.checkBox_3            = new QCheckBox(this.tab_5);
            this.checkBox_3.ObjectName = "checkBox_3";
            this.checkBox_3.Enabled    = false;
            this.checkBox_3.Text       = "Show received message fonts";
            this.checkBox_3.Checked    = true;
            gridLayout.AddWidget(this.checkBox_3, 5, 1, 1, 1);
            this.checkBox_4            = new QCheckBox(this.tab_5);
            this.checkBox_4.ObjectName = "checkBox_4";
            this.checkBox_4.Enabled    = false;
            this.checkBox_4.Text       = "Show received message colors";
            this.checkBox_4.Checked    = true;
            gridLayout.AddWidget(this.checkBox_4, 6, 1, 1, 1);
            QHBoxLayout horizontalLayout_3;

            horizontalLayout_3 = new QHBoxLayout();
            gridLayout.AddLayout(horizontalLayout_3, 4, 1, 1, 2);
            this.pushButton            = new QPushButton(this.tab_5);
            this.pushButton.ObjectName = "pushButton";
            this.pushButton.Enabled    = false;
            QSizePolicy pushButton_sizePolicy;

            pushButton_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed);
            pushButton_sizePolicy.SetVerticalStretch(0);
            pushButton_sizePolicy.SetHorizontalStretch(0);
            pushButton_sizePolicy.SetHeightForWidth(this.pushButton.SizePolicy.HasHeightForWidth());
            this.pushButton.SizePolicy = pushButton_sizePolicy;
            this.pushButton.Text       = "";
            horizontalLayout_3.AddWidget(this.pushButton);
            this.checkBox_6            = new QCheckBox(this.tab_5);
            this.checkBox_6.ObjectName = "checkBox_6";
            this.checkBox_6.Enabled    = false;
            this.checkBox_6.Text       = "Use Default";
            this.checkBox_6.Checked    = true;
            horizontalLayout_3.AddWidget(this.checkBox_6);
            this.checkBox_5            = new QCheckBox(this.tab_5);
            this.checkBox_5.ObjectName = "checkBox_5";
            this.checkBox_5.Enabled    = false;
            this.checkBox_5.Text       = "Use custom background";
            gridLayout.AddWidget(this.checkBox_5, 7, 1, 1, 1);
            this.label_11            = new QLabel(this.tab_5);
            this.label_11.ObjectName = "label_11";
            this.label_11.Enabled    = false;
            this.label_11.Text       = "Background:";
            gridLayout.AddWidget(this.label_11, 7, 0, 1, 1);
            QSpacerItem verticalSpacer;

            verticalSpacer = new QSpacerItem(20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding);
            verticalLayout_5.AddItem(verticalSpacer);
            this.tabWidget.AddTab(this.tab_5, "Messages");
            this.tab_7            = new QWidget(this.tabWidget);
            this.tab_7.ObjectName = "tab_7";
            this.tabWidget.AddTab(this.tab_7, "Status");
            this.tab_8            = new QWidget(this.tabWidget);
            this.tab_8.ObjectName = "tab_8";
            this.tabWidget.AddTab(this.tab_8, "Events");
            this.tab_3            = new QWidget(this.tabWidget);
            this.tab_3.ObjectName = "tab_3";
            QVBoxLayout verticalLayout_3;

            verticalLayout_3                         = new QVBoxLayout(this.tab_3);
            verticalLayout_3.Spacing                 = 6;
            verticalLayout_3.Margin                  = 12;
            this.extensionsList                      = new QTableView(this.tab_3);
            this.extensionsList.ObjectName           = "extensionsList";
            this.extensionsList.AlternatingRowColors = true;
            this.extensionsList.selectionMode        = QAbstractItemView.SelectionMode.SingleSelection;
            this.extensionsList.selectionBehavior    = QAbstractItemView.SelectionBehavior.SelectRows;
            this.extensionsList.ShowGrid             = false;
            this.extensionsList.WordWrap             = false;
            verticalLayout_3.AddWidget(this.extensionsList);
            this.widget_2            = new QWidget(this.tab_3);
            this.widget_2.ObjectName = "widget_2";
            QHBoxLayout horizontalLayout_2;

            horizontalLayout_2           = new QHBoxLayout(this.widget_2);
            horizontalLayout_2.Margin    = 0;
            this.pushButton_3            = new QPushButton(this.widget_2);
            this.pushButton_3.ObjectName = "pushButton_3";
            this.pushButton_3.Enabled    = false;
            this.pushButton_3.Text       = "Find Updates";
            horizontalLayout_2.AddWidget(this.pushButton_3);
            QSpacerItem horizontalSpacer_2;

            horizontalSpacer_2 = new QSpacerItem(293, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum);
            horizontalLayout_2.AddItem(horizontalSpacer_2);
            verticalLayout_3.AddWidget(this.widget_2);
            this.tabWidget.AddTab(this.tab_3, "Extensions");
            this.tab_6            = new QWidget(this.tabWidget);
            this.tab_6.ObjectName = "tab_6";
            this.tabWidget.AddTab(this.tab_6, "Advanced");
            this.buttonBox                 = new QDialogButtonBox(this);
            this.buttonBox.ObjectName      = "buttonBox";
            this.buttonBox.Orientation     = Qt.Orientation.Horizontal;
            this.buttonBox.StandardButtons = global::Qyoto.Qyoto.GetCPPEnumValue("QDialogButtonBox", "Close");
            verticalLayout.AddWidget(this.buttonBox);
            QObject.Connect(buttonBox, Qt.SIGNAL("rejected()"), this, Qt.SLOT("close()"));
            QObject.Connect(buttonBox,Qt.SIGNAL("accepted()"),this,Qt.SLOT("close()"));
            QMetaObject.ConnectSlotsByName(this);
        }
Example #17
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);
        }