protected void SetupUi() { base.ObjectName = "AccountStatusWidget"; this.Geometry = new QRect(0, 0, 416, 47); QSizePolicy AccountStatusWidget_sizePolicy; AccountStatusWidget_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Minimum); AccountStatusWidget_sizePolicy.SetVerticalStretch(0); AccountStatusWidget_sizePolicy.SetHorizontalStretch(0); AccountStatusWidget_sizePolicy.SetHeightForWidth(this.SizePolicy.HasHeightForWidth()); this.SizePolicy = AccountStatusWidget_sizePolicy; this.WindowTitle = "Form"; QHBoxLayout horizontalLayout; horizontalLayout = new QHBoxLayout(this); horizontalLayout.Spacing = 6; horizontalLayout.SetContentsMargins(6, 0, 6, 6); this.m_AvatarLabel = new Synapse.QtClient.Widgets.AvatarLabel(this); this.m_AvatarLabel.ObjectName = "m_AvatarLabel"; QSizePolicy m_AvatarLabel_sizePolicy; m_AvatarLabel_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Fixed, QSizePolicy.Policy.Fixed); m_AvatarLabel_sizePolicy.SetVerticalStretch(0); m_AvatarLabel_sizePolicy.SetHorizontalStretch(0); m_AvatarLabel_sizePolicy.SetHeightForWidth(this.m_AvatarLabel.SizePolicy.HasHeightForWidth()); this.m_AvatarLabel.SizePolicy = m_AvatarLabel_sizePolicy; this.m_AvatarLabel.MinimumSize = new QSize(36, 36); this.m_AvatarLabel.MaximumSize = new QSize(32, 32); horizontalLayout.AddWidget(this.m_AvatarLabel); QVBoxLayout verticalLayout; verticalLayout = new QVBoxLayout(); horizontalLayout.AddLayout(verticalLayout); verticalLayout.Spacing = 0; this.m_NameLabel = new Synapse.QtClient.Widgets.FadingQLabel(this); this.m_NameLabel.ObjectName = "m_NameLabel"; this.m_NameLabel.Text = "test@localhost"; this.m_NameLabel.TextFormat = Qt.TextFormat.RichText; verticalLayout.AddWidget(this.m_NameLabel); this.m_StatusLabel = new QLabel(this); this.m_StatusLabel.ObjectName = "m_StatusLabel"; this.m_StatusLabel.Text = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\np, li { white-space: pre-wrap; }\n</style></head><body style=\" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;\">\n<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><a href=\"#show-presence-menu\"><span style=\" text-decoration: underline; color:#0057ae;\">Offline</span></a></p></body></html>"; this.m_StatusLabel.ScaledContents = false; this.m_StatusLabel.OpenExternalLinks = false; this.m_StatusLabel.TextInteractionFlags = global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "LinksAccessibleByMouse"); verticalLayout.AddWidget(this.m_StatusLabel); QMetaObject.ConnectSlotsByName(this); }
protected void SetupUi() { base.ObjectName = "MainWindow"; this.Geometry = new QRect(0, 0, 236, 483); this.WindowTitle = "Synapse"; QVBoxLayout verticalLayout; verticalLayout = new QVBoxLayout(this); verticalLayout.Spacing = 0; verticalLayout.Margin = 0; this.containerWidget = new QWidget(this); this.containerWidget.ObjectName = "containerWidget"; QVBoxLayout verticalLayout_2; verticalLayout_2 = new QVBoxLayout(this.containerWidget); verticalLayout_2.Spacing = 0; verticalLayout_2.Margin = 0; this.headerWidget = new QWidget(this.containerWidget); this.headerWidget.ObjectName = "headerWidget"; QHBoxLayout horizontalLayout_3; horizontalLayout_3 = new QHBoxLayout(this.headerWidget); horizontalLayout_3.Spacing = 3; horizontalLayout_3.SetContentsMargins(0, 0, 3, 0); this.headerLabel = new QLabel(this.headerWidget); this.headerLabel.ObjectName = "headerLabel"; QSizePolicy headerLabel_sizePolicy; headerLabel_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum); headerLabel_sizePolicy.SetVerticalStretch(0); headerLabel_sizePolicy.SetHorizontalStretch(0); headerLabel_sizePolicy.SetHeightForWidth(this.headerLabel.SizePolicy.HasHeightForWidth()); this.headerLabel.SizePolicy = headerLabel_sizePolicy; this.headerLabel.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:33px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600;\">Synapse</span></p></body></html>"; this.headerLabel.Alignment = global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "AlignCenter"); this.headerLabel.Margin = 3; horizontalLayout_3.AddWidget(this.headerLabel); this.menuButton = new QPushButton(this.headerWidget); this.menuButton.ObjectName = "menuButton"; QSizePolicy menuButton_sizePolicy; menuButton_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Fixed, QSizePolicy.Policy.Fixed); menuButton_sizePolicy.SetVerticalStretch(0); menuButton_sizePolicy.SetHorizontalStretch(0); menuButton_sizePolicy.SetHeightForWidth(this.menuButton.SizePolicy.HasHeightForWidth()); this.menuButton.SizePolicy = menuButton_sizePolicy; this.menuButton.MinimumSize = new QSize(12, 12); this.menuButton.MaximumSize = new QSize(12, 12); this.menuButton.FocusPolicy = Qt.FocusPolicy.TabFocus; this.menuButton.Text = ""; this.menuButton.IconSize = new QSize(7, 7); this.menuButton.Flat = true; horizontalLayout_3.AddWidget(this.menuButton); this.closeButton = new QPushButton(this.headerWidget); this.closeButton.ObjectName = "closeButton"; QSizePolicy closeButton_sizePolicy; closeButton_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Fixed, QSizePolicy.Policy.Fixed); closeButton_sizePolicy.SetVerticalStretch(0); closeButton_sizePolicy.SetHorizontalStretch(0); closeButton_sizePolicy.SetHeightForWidth(this.closeButton.SizePolicy.HasHeightForWidth()); this.closeButton.SizePolicy = closeButton_sizePolicy; this.closeButton.MinimumSize = new QSize(12, 12); this.closeButton.MaximumSize = new QSize(12, 12); this.closeButton.FocusPolicy = Qt.FocusPolicy.TabFocus; this.closeButton.Text = ""; this.closeButton.IconSize = new QSize(7, 7); this.closeButton.Flat = true; horizontalLayout_3.AddWidget(this.closeButton); verticalLayout_2.AddWidget(this.headerWidget); this.stackedWidget = new Synapse.QtClient.Widgets.LightboxContainerWidget(this.containerWidget); this.stackedWidget.ObjectName = "stackedWidget"; this.stackedWidget.CurrentIndex = 0; verticalLayout_2.AddWidget(this.stackedWidget); this.page = new QWidget(this.stackedWidget); this.page.ObjectName = "page"; QHBoxLayout horizontalLayout; horizontalLayout = new QHBoxLayout(this.page); horizontalLayout.Spacing = 0; horizontalLayout.Margin = 0; this.contentWidget = new QWidget(this.page); this.contentWidget.ObjectName = "contentWidget"; QSizePolicy contentWidget_sizePolicy; contentWidget_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Expanding); contentWidget_sizePolicy.SetVerticalStretch(0); contentWidget_sizePolicy.SetHorizontalStretch(0); contentWidget_sizePolicy.SetHeightForWidth(this.contentWidget.SizePolicy.HasHeightForWidth()); this.contentWidget.SizePolicy = contentWidget_sizePolicy; horizontalLayout.AddWidget(this.contentWidget); this.stackedWidget.AddWidget(this.page); verticalLayout.AddWidget(this.containerWidget); QMetaObject.ConnectSlotsByName(this); }
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:"; this.label_5.SetBuddy(avatarSearchLineEdit); 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); }
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 = 0; 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 QWebView(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); }
public TabbedChatsWindow() { // FIXME: This doesn't work very well in most themes... //this.SetStyleSheet("QTabWidget::pane { border: 0px; }"); // The tab widget messes up this background color. this.SetStyleSheet("QTabWidget > QWidget { background: palette(window); }"); m_Tabs = new QTabWidget(); m_Tabs.tabPosition = QTabWidget.TabPosition.South; QToolButton newTabButton = new QToolButton(m_Tabs); newTabButton.AutoRaise = true; newTabButton.SetDefaultAction(new QAction(Gui.LoadIcon("tab-new", 16), "New Tab", newTabButton)); newTabButton.SetToolButtonStyle(Qt.ToolButtonStyle.ToolButtonIconOnly); QObject.Connect<QAction>(newTabButton, Qt.SIGNAL("triggered(QAction*)"), HandleNewTab); m_Tabs.SetCornerWidget(newTabButton, Qt.Corner.BottomLeftCorner); QHBoxLayout rightButtonsLayout = new QHBoxLayout(); rightButtonsLayout.SetContentsMargins(0, 0, 0, 0); rightButtonsLayout.Spacing = 0; QToolButton closeTabButton = new QToolButton(m_Tabs); closeTabButton.SetToolButtonStyle(Qt.ToolButtonStyle.ToolButtonIconOnly); closeTabButton.AutoRaise = true; closeTabButton.SetDefaultAction(new QAction(Gui.LoadIcon("window-close", 16), "Close Tab", closeTabButton)); QObject.Connect<QAction>(closeTabButton, Qt.SIGNAL("triggered(QAction*)"), HandleCloseTab); rightButtonsLayout.AddWidget(closeTabButton); QMenu menu = new QMenu(this); menu.AddAction(new QIcon(), "No Recently Closed Tabs"); QToolButton trashButton = new QToolButton(m_Tabs); trashButton.SetToolButtonStyle(Qt.ToolButtonStyle.ToolButtonIconOnly); trashButton.AutoRaise = true; trashButton.PopupMode = QToolButton.ToolButtonPopupMode.InstantPopup; trashButton.SetMenu(menu); trashButton.SetDefaultAction(new QAction(Gui.LoadIcon("user-trash", 16), "Recently Closed Tabs", trashButton)); rightButtonsLayout.AddWidget(trashButton); // FIXME: This looks bad. //rightButtonsLayout.AddWidget(new QSizeGrip(this)); QWidget rightButtonsContainer = new QWidget(m_Tabs); rightButtonsContainer.SetLayout(rightButtonsLayout); m_Tabs.SetCornerWidget(rightButtonsContainer, Qt.Corner.BottomRightCorner); QVBoxLayout layout = new QVBoxLayout(this); layout.SetContentsMargins(0, 0, 0, 0); layout.AddWidget(m_Tabs, 1, 0); this.SetLayout(layout); QObject.Connect<int>(m_Tabs, Qt.SIGNAL("currentChanged(int)"), HandleCurrentChanged); this.SetGeometry(0, 0, 445, 370); Gui.CenterWidgetOnScreen(this); QAction closeAction = new QAction(this); QObject.Connect<bool>(closeAction, Qt.SIGNAL("triggered(bool)"), HandleCloseActionTriggered); closeAction.Shortcut = new QKeySequence("Ctrl+w"); this.AddAction(closeAction); 0.UpTo(9).ForEach(num => { QAction action = new QAction(this); action.Shortcut = new QKeySequence("Alt+" + num.ToString()); QObject.Connect(action, Qt.SIGNAL("triggered(bool)"), delegate { m_Tabs.CurrentIndex = num - 1; }); this.AddAction(action); }); QAction nextTabAction = new QAction(this); nextTabAction.Shortcut = new QKeySequence(QKeySequence.StandardKey.NextChild); QObject.Connect(nextTabAction, Qt.SIGNAL("triggered(bool)"), delegate { if (m_Tabs.CurrentIndex == m_Tabs.Count - 1) m_Tabs.CurrentIndex = 0; else m_Tabs.CurrentIndex += 1; }); this.AddAction(nextTabAction); QAction prevTabAction = new QAction(this); prevTabAction.Shortcut = new QKeySequence(QKeySequence.StandardKey.PreviousChild); QObject.Connect(prevTabAction, Qt.SIGNAL("triggered(bool)"), delegate { if (m_Tabs.CurrentIndex == 0) m_Tabs.CurrentIndex = m_Tabs.Count - 1; else m_Tabs.CurrentIndex -= 1; }); var accountService = ServiceManager.Get<AccountService>(); accountService.AccountAdded += HandleAccountAdded; accountService.AccountRemoved += HandleAccountRemoved; foreach (Account account in accountService.Accounts) HandleAccountAdded(account); var settingsService = ServiceManager.Get<SettingsService>(); if (settingsService.Has("ChatsWindowGeometry")) { var geometry = settingsService.Get<byte[]>("ChatsWindowGeometry"); base.RestoreGeometry(QByteArrayConverter.FromArray(geometry)); } }
internal ChatWindow(IChatHandler handler) { if (handler == null) throw new ArgumentNullException("handler"); m_Handler = handler; 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; 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; m_ParticipantsMenu.AddAction(listModeAction); var separatorAction = new QAction(participantsGrid); separatorAction.SetSeparator(true); m_ParticipantsMenu.AddAction(separatorAction); var sliderAction = new AvatarGridZoomAction<jabber.connection.RoomParticipant>(participantsGrid); 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); 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("fonts", 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", 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("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")); }