コード例 #1
0
ファイル: t6.cs プロジェクト: KDE/qyoto
    public LCDRange(QWidget parent)
        : base(parent)
    {
        QLCDNumber lcd  = new QLCDNumber( 2, this );
        lcd.segmentStyle = QLCDNumber.SegmentStyle.Filled;

        QSlider slider = new QSlider( Orientation.Horizontal, this );
        slider.SetRange( 0, 99 );
        slider.Value = 0;
        Connect( slider, SIGNAL("valueChanged(int)"), lcd, SLOT("display(int)") );

        QVBoxLayout layout = new QVBoxLayout();
        layout.AddWidget(lcd);
        layout.AddWidget(slider);
        SetLayout(layout);
    }
コード例 #2
0
ファイル: t5.cs プロジェクト: KDE/qyoto
    public MyWidget(QWidget parent)
        : base(parent)
    {
        QPushButton quit = new QPushButton(Tr("Quit"));
        quit.Font = new QFont("Times", 18, (int) QFont.Weight.Bold);

        QLCDNumber lcd = new QLCDNumber(2);
        lcd.segmentStyle = QLCDNumber.SegmentStyle.Filled;

        QSlider slider = new QSlider(Qt.Orientation.Horizontal);
        slider.SetRange(0, 99);
        slider.Value = 0;

        Connect(quit, SIGNAL("clicked()"), qApp, SLOT("quit()"));
        Connect(slider, SIGNAL("valueChanged(int)"),
            lcd, SLOT("display(int)"));

        QVBoxLayout layout = new QVBoxLayout();
        layout.AddWidget(quit);
        layout.AddWidget(lcd);
        layout.AddWidget(slider);
        SetLayout(layout);
    }
コード例 #3
0
ファイル: PreferencesWindow.cs プロジェクト: goto/synapse
 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.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.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.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.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);
 }
コード例 #4
0
ファイル: lcdrange.cs プロジェクト: KDE/qyoto
    private void Init()
    {
        QLCDNumber lcd = new QLCDNumber(2);
        lcd.segmentStyle = QLCDNumber.SegmentStyle.Filled;

        slider = new QSlider(Qt.Orientation.Horizontal);
        slider.SetRange(0, 99);
        slider.Value = 0;
        label = new QLabel();
        label.Alignment = (int) (Qt.AlignmentFlag.AlignHCenter | Qt.AlignmentFlag.AlignTop);
        label.SetSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Fixed);

        Connect(slider, SIGNAL("valueChanged(int)"),
            lcd, SLOT("display(int)"));
        Connect(slider, SIGNAL("valueChanged(int)"),
            this, SIGNAL("ValueChanged(int)"));

        QVBoxLayout layout = new QVBoxLayout();
        layout.AddWidget(lcd);
        layout.AddWidget(slider);
        layout.AddWidget(label);
        SetLayout(layout);

        SetFocusProxy(slider);
    }