コード例 #1
0
        protected void SetupUi()
        {
            base.ObjectName = "AccountStatusWidget";
            this.Geometry   = new QRect(0, 0, 416, 47);
            QSizePolicy AccountStatusWidget_sizePolicy;

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

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

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

            verticalLayout = new QVBoxLayout();
            horizontalLayout.AddLayout(verticalLayout);
            verticalLayout.Spacing      = 0;
            this.m_NameLabel            = new Synapse.QtClient.Widgets.FadingQLabel(this);
            this.m_NameLabel.ObjectName = "m_NameLabel";
            this.m_NameLabel.Text       = "test@localhost";
            this.m_NameLabel.TextFormat = Qt.TextFormat.RichText;
            verticalLayout.AddWidget(this.m_NameLabel);
            this.m_StatusLabel                      = new QLabel(this);
            this.m_StatusLabel.ObjectName           = "m_StatusLabel";
            this.m_StatusLabel.Text                 = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\np, li { white-space: pre-wrap; }\n</style></head><body style=\" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;\">\n<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><a href=\"#show-presence-menu\"><span style=\" text-decoration: underline; color:#0057ae;\">Offline</span></a></p></body></html>";
            this.m_StatusLabel.ScaledContents       = false;
            this.m_StatusLabel.OpenExternalLinks    = false;
            this.m_StatusLabel.TextInteractionFlags = global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "LinksAccessibleByMouse");
            verticalLayout.AddWidget(this.m_StatusLabel);
            QMetaObject.ConnectSlotsByName(this);
        }
コード例 #2
0
 protected void SetupUi()
 {
     base.ObjectName = "AccountStatusWidget";
     this.Geometry = new QRect(0, 0, 416, 47);
     QSizePolicy AccountStatusWidget_sizePolicy;
     AccountStatusWidget_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Minimum);
     AccountStatusWidget_sizePolicy.SetVerticalStretch(0);
     AccountStatusWidget_sizePolicy.SetHorizontalStretch(0);
     AccountStatusWidget_sizePolicy.SetHeightForWidth(this.SizePolicy.HasHeightForWidth());
     this.SizePolicy = AccountStatusWidget_sizePolicy;
     this.WindowTitle = "Form";
     QHBoxLayout horizontalLayout;
     horizontalLayout = new QHBoxLayout(this);
     horizontalLayout.Spacing = 6;
     horizontalLayout.SetContentsMargins(6, 0, 6, 6);
     this.m_AvatarLabel = new Synapse.QtClient.Widgets.AvatarLabel(this);
     this.m_AvatarLabel.ObjectName = "m_AvatarLabel";
     QSizePolicy m_AvatarLabel_sizePolicy;
     m_AvatarLabel_sizePolicy = new QSizePolicy(QSizePolicy.Policy.Fixed, QSizePolicy.Policy.Fixed);
     m_AvatarLabel_sizePolicy.SetVerticalStretch(0);
     m_AvatarLabel_sizePolicy.SetHorizontalStretch(0);
     m_AvatarLabel_sizePolicy.SetHeightForWidth(this.m_AvatarLabel.SizePolicy.HasHeightForWidth());
     this.m_AvatarLabel.SizePolicy = m_AvatarLabel_sizePolicy;
     this.m_AvatarLabel.MinimumSize = new QSize(36, 36);
     this.m_AvatarLabel.MaximumSize = new QSize(32, 32);
     horizontalLayout.AddWidget(this.m_AvatarLabel);
     QVBoxLayout verticalLayout;
     verticalLayout = new QVBoxLayout();
     horizontalLayout.AddLayout(verticalLayout);
     verticalLayout.Spacing = 0;
     this.m_NameLabel = new Synapse.QtClient.Widgets.FadingQLabel(this);
     this.m_NameLabel.ObjectName = "m_NameLabel";
     this.m_NameLabel.Text = "test@localhost";
     this.m_NameLabel.TextFormat = Qt.TextFormat.RichText;
     verticalLayout.AddWidget(this.m_NameLabel);
     this.m_StatusLabel = new QLabel(this);
     this.m_StatusLabel.ObjectName = "m_StatusLabel";
     this.m_StatusLabel.Text = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\np, li { white-space: pre-wrap; }\n</style></head><body style=\" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;\">\n<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><a href=\"#show-presence-menu\"><span style=\" text-decoration: underline; color:#0057ae;\">Offline</span></a></p></body></html>";
     this.m_StatusLabel.ScaledContents = false;
     this.m_StatusLabel.OpenExternalLinks = false;
     this.m_StatusLabel.TextInteractionFlags = global::Qyoto.Qyoto.GetCPPEnumValue("Qt", "LinksAccessibleByMouse");
     verticalLayout.AddWidget(this.m_StatusLabel);
     QMetaObject.ConnectSlotsByName(this);
 }