public IconPreviewArea() { QGridLayout mainLayout = new QGridLayout(); setLayout(mainLayout); icon = new QIcon(); stateLabels[0] = createHeaderLabel(tr("Off")); stateLabels[1] = createHeaderLabel(tr("On")); modeLabels[0] = createHeaderLabel(tr("Normal")); modeLabels[1] = createHeaderLabel(tr("Active")); modeLabels[2] = createHeaderLabel(tr("Disabled")); modeLabels[3] = createHeaderLabel(tr("Selected")); for (int j = 0; j < NumStates; ++j) mainLayout.addWidget(stateLabels[j], j + 1, 0); for (int i = 0; i < NumModes; ++i) { mainLayout.addWidget(modeLabels[i], 0, i + 1); for (int j = 0; j < NumStates; ++j) { pixmapLabels[i][j] = createPixmapLabel(); mainLayout.addWidget(pixmapLabels[i][j], j + 1, i + 1); } } }
public Icons() { centralWidget = new QWidget(); setCentralWidget(centralWidget); createPreviewGroupBox(); createImagesGroupBox(); createIconSizeGroupBox(); createActions(); createMenus(); createContextMenu(); QGridLayout mainLayout = new QGridLayout(); mainLayout.addWidget(previewGroupBox, 0, 0, 1, 2); mainLayout.addWidget(imagesGroupBox, 1, 0); mainLayout.addWidget(iconSizeGroupBox, 1, 1); centralWidget.setLayout(mainLayout); setWindowTitle(tr("Icons")); otherRadioButton.click(); setTextOnRadioButtons(); resize(minimumSizeHint()); }
public void setupUi(QWidget AnalisisForm) { AnalisisForm.setObjectName("AnalisisForm"); AnalisisForm.resize(new QSize(568, 351).expandedTo(AnalisisForm.minimumSizeHint())); gridLayout_3 = new QGridLayout(AnalisisForm); gridLayout_3.setObjectName("gridLayout_3"); horizontalLayout = new QHBoxLayout(); horizontalLayout.setObjectName("horizontalLayout"); tableWidget = new QTableWidget(AnalisisForm); tableWidget.setObjectName("tableWidget"); horizontalLayout.addWidget(tableWidget); verticalLayout_2 = new QVBoxLayout(); verticalLayout_2.setObjectName("verticalLayout_2"); groupBox = new QGroupBox(AnalisisForm); groupBox.setObjectName("groupBox"); groupBox.setMinimumSize(new QSize(0, 0)); gridLayout = new QGridLayout(groupBox); gridLayout.setObjectName("gridLayout"); verticalLayout = new QVBoxLayout(); verticalLayout.setObjectName("verticalLayout"); pasosButton = new QPushButton(groupBox); pasosButton.setObjectName("pasosButton"); verticalLayout.addWidget(pasosButton); completoButton = new QPushButton(groupBox); completoButton.setObjectName("completoButton"); verticalLayout.addWidget(completoButton); gridLayout.addLayout(verticalLayout, 0, 0, 1, 1); verticalLayout_2.addWidget(groupBox); groupBox_2 = new QGroupBox(AnalisisForm); groupBox_2.setObjectName("groupBox_2"); groupBox_2.setMaximumSize(new QSize(16777215, 80)); gridLayout_2 = new QGridLayout(groupBox_2); gridLayout_2.setObjectName("gridLayout_2"); cerrarButton = new QPushButton(groupBox_2); cerrarButton.setObjectName("cerrarButton"); gridLayout_2.addWidget(cerrarButton, 0, 0, 1, 1); verticalLayout_2.addWidget(groupBox_2); horizontalLayout.addLayout(verticalLayout_2); gridLayout_3.addLayout(horizontalLayout, 0, 0, 1, 1); retranslateUi(AnalisisForm); cerrarButton.clicked.connect(AnalisisForm, "close()"); AnalisisForm.connectSlotsByName(); } // setupUi
private void createIconSizeGroupBox() { iconSizeGroupBox = new QGroupBox(tr("Icon Size")); smallRadioButton = new QRadioButton(); largeRadioButton = new QRadioButton(); toolBarRadioButton = new QRadioButton(); listViewRadioButton = new QRadioButton(); iconViewRadioButton = new QRadioButton(); tabBarRadioButton = new QRadioButton(); otherRadioButton = new QRadioButton(tr("Other:")); otherSpinBox = new IconSizeSpinBox(); otherSpinBox.setRange(8, 128); otherSpinBox.setValue(64); smallRadioButton.toggled.connect(this, "changeSize(boolean)"); largeRadioButton.toggled.connect(this, "changeSize(boolean)"); toolBarRadioButton.toggled.connect(this, "changeSize(boolean)"); listViewRadioButton.toggled.connect(this, "changeSize(boolean)"); iconViewRadioButton.toggled.connect(this, "changeSize(boolean)"); tabBarRadioButton.toggled.connect(this, "changeSize(boolean)"); otherRadioButton.toggled.connect(this, "changeSize(boolean)"); otherSpinBox.valueChanged.connect(this, "changeSize(int)"); QHBoxLayout otherSizeLayout = new QHBoxLayout(); otherSizeLayout.addWidget(otherRadioButton); otherSizeLayout.addWidget(otherSpinBox); otherSizeLayout.addStretch(); QGridLayout layout = new QGridLayout(); layout.addWidget(smallRadioButton, 0, 0); layout.addWidget(largeRadioButton, 1, 0); layout.addWidget(toolBarRadioButton, 2, 0); layout.addWidget(listViewRadioButton, 0, 1); layout.addWidget(iconViewRadioButton, 1, 1); layout.addWidget(tabBarRadioButton, 2, 1); layout.addLayout(otherSizeLayout, 3, 0, 1, 2); layout.setRowStretch(4, 1); iconSizeGroupBox.setLayout(layout); }
public void setupUi(QDialog AboutTextRecognition) { AboutTextRecognition.setObjectName("AboutTextRecognition"); AboutTextRecognition.resize( new QSize(622, 412).expandedTo(AboutTextRecognition.minimumSizeHint())); AboutTextRecognition.setAutoFillBackground(false); gridLayout = new QGridLayout(AboutTextRecognition); gridLayout.setObjectName("gridLayout"); gridLayout1 = new QGridLayout(); gridLayout1.setObjectName("gridLayout1"); textEdit = new QTextEdit(AboutTextRecognition); textEdit.setObjectName("textEdit"); QPalette palette = new QPalette(); palette.setColor( QPalette.ColorGroup.Active, QPalette.ColorRole.Base, new QColor(224, 223, 227)); palette.setColor( QPalette.ColorGroup.Inactive, QPalette.ColorRole.Base, new QColor(224, 223, 227)); palette.setColor( QPalette.ColorGroup.Disabled, QPalette.ColorRole.Base, new QColor(224, 223, 227)); textEdit.setPalette(palette); textEdit.setAcceptDrops(true); textEdit.setFrameShape(com.trolltech.qt.gui.QFrame.Shape.Box); textEdit.setUndoRedoEnabled(false); textEdit.setReadOnly(true); gridLayout1.addWidget(textEdit, 0, 1, 2, 1); spacerItem = new QSpacerItem( 20, 221, com.trolltech.qt.gui.QSizePolicy.Policy.Minimum, com.trolltech.qt.gui.QSizePolicy.Policy.Expanding); gridLayout1.addItem(spacerItem, 1, 0, 1, 1); gridLayout.addLayout(gridLayout1, 0, 0, 1, 3); spacerItem1 = new QSpacerItem( 40, 20, com.trolltech.qt.gui.QSizePolicy.Policy.Expanding, com.trolltech.qt.gui.QSizePolicy.Policy.Minimum); gridLayout.addItem(spacerItem1, 1, 0, 1, 1); okButton = new QPushButton(AboutTextRecognition); okButton.setObjectName("okButton"); gridLayout.addWidget(okButton, 1, 1, 1, 1); spacerItem2 = new QSpacerItem( 40, 20, com.trolltech.qt.gui.QSizePolicy.Policy.Expanding, com.trolltech.qt.gui.QSizePolicy.Policy.Minimum); gridLayout.addItem(spacerItem2, 1, 2, 1, 1); retranslateUi(AboutTextRecognition); okButton.clicked.connect(AboutTextRecognition, "accept()"); AboutTextRecognition.connectSlotsByName(); } // setupUi