public ConfigurationPage(QWidget parent) { super(parent); QGroupBox configGroup = new QGroupBox(tr("Server configuration")); QLabel serverLabel = new QLabel(tr("Server:")); QComboBox serverCombo = new QComboBox(); serverCombo.addItem(tr("Qt Software (Australia)")); serverCombo.addItem(tr("Qt Software (Germany)")); serverCombo.addItem(tr("Qt Software (Norway)")); serverCombo.addItem(tr("Qt Software (People's Republic of China)")); serverCombo.addItem(tr("Qt Software (USA)")); QHBoxLayout serverLayout = new QHBoxLayout(); serverLayout.addWidget(serverLabel); serverLayout.addWidget(serverCombo); QVBoxLayout configLayout = new QVBoxLayout(); configLayout.addLayout(serverLayout); configGroup.setLayout(configLayout); QVBoxLayout mainLayout = new QVBoxLayout(); mainLayout.addWidget(configGroup); mainLayout.addStretch(1); setLayout(mainLayout); }
private void createImagesGroupBox() { imagesGroupBox = new QGroupBox(tr("Images")); imagesTable = new QTableWidget(); imagesTable.setSelectionMode(QAbstractItemView.SelectionMode.NoSelection); imagesTable.setItemDelegate(new ImageDelegate(this)); List<String> labels = new LinkedList<String>(); labels.add(tr("Image")); labels.add(tr("Mode")); labels.add(tr("State")); imagesTable.horizontalHeader().setDefaultSectionSize(90); imagesTable.setColumnCount(3); imagesTable.setHorizontalHeaderLabels(labels); imagesTable.horizontalHeader().setResizeMode(0, QHeaderView.ResizeMode.Stretch); imagesTable.horizontalHeader().setResizeMode(1, QHeaderView.ResizeMode.Fixed); imagesTable.horizontalHeader().setResizeMode(2, QHeaderView.ResizeMode.Fixed); imagesTable.verticalHeader().hide(); imagesTable.itemChanged.connect(this, "changeIcon()"); QVBoxLayout layout = new QVBoxLayout(); layout.addWidget(imagesTable); imagesGroupBox.setLayout(layout); }
private void createPreviewGroupBox() { previewGroupBox = new QGroupBox(tr("Preview")); previewArea = new IconPreviewArea(); QVBoxLayout layout = new QVBoxLayout(); layout.addWidget(previewArea); previewGroupBox.setLayout(layout); }
// ! [0] public window(QWidget parent) { super(parent); // ! [0] QLabel textLabel = new QLabel(tr("Data:"), this); textBrowser = new QTextBrowser(this); QLabel mimeTypeLabel = new QLabel(tr("MIME types:"), this); mimeTypeCombo = new QComboBox(this); QVBoxLayout layout = new QVBoxLayout(this); layout.addWidget(textLabel); layout.addWidget(textBrowser); layout.addWidget(mimeTypeLabel); layout.addWidget(mimeTypeCombo); // ! [1] setAcceptDrops(true); // ! [1] setWindowTitle(tr("Drop Events")); // ! [2] }
public QueryPage(QWidget parent) { super(parent); QGroupBox packagesGroup = new QGroupBox(tr("Look for packages")); QLabel nameLabel = new QLabel(tr("Name:")); QLineEdit nameEdit = new QLineEdit(); QLabel dateLabel = new QLabel(tr("Released after:")); QDateTimeEdit dateEdit = new QDateTimeEdit(QDate.currentDate()); QCheckBox releasesCheckBox = new QCheckBox(tr("Releases")); QCheckBox upgradesCheckBox = new QCheckBox(tr("Upgrades")); QSpinBox hitsSpinBox = new QSpinBox(); hitsSpinBox.setPrefix(tr("Return up to") + " "); hitsSpinBox.setSuffix(" " + tr("results")); hitsSpinBox.setSpecialValueText(tr("Return only the first result")); hitsSpinBox.setMinimum(1); hitsSpinBox.setMaximum(100); hitsSpinBox.setSingleStep(10); QPushButton startQueryButton = new QPushButton(tr("Start query")); QGridLayout packagesLayout = new QGridLayout(); packagesLayout.addWidget(nameLabel, 0, 0); packagesLayout.addWidget(nameEdit, 0, 1); packagesLayout.addWidget(dateLabel, 1, 0); packagesLayout.addWidget(dateEdit, 1, 1); packagesLayout.addWidget(releasesCheckBox, 2, 0); packagesLayout.addWidget(upgradesCheckBox, 3, 0); packagesLayout.addWidget(hitsSpinBox, 4, 0, 1, 2); packagesGroup.setLayout(packagesLayout); QVBoxLayout mainLayout = new QVBoxLayout(); mainLayout.addWidget(packagesGroup); mainLayout.addSpacing(12); mainLayout.addWidget(startQueryButton); mainLayout.addStretch(1); setLayout(mainLayout); }
public ConfigDialog(QWidget parent) { super(parent); contentsWidget = new QListWidget(this); contentsWidget.setViewMode(QListView.ViewMode.IconMode); contentsWidget.setIconSize(new QSize(96, 84)); contentsWidget.setMovement(QListView.Movement.Static); contentsWidget.setMaximumWidth(128); contentsWidget.setSpacing(12); pagesWidget = new QStackedWidget(this); pagesWidget.addWidget(new ConfigurationPage(this)); pagesWidget.addWidget(new UpdatePage(this)); pagesWidget.addWidget(new QueryPage(this)); QPushButton closeButton = new QPushButton(tr("Close")); createIcons(); contentsWidget.setCurrentRow(0); closeButton.clicked.connect(this, "close()"); QHBoxLayout horizontalLayout = new QHBoxLayout(); horizontalLayout.addWidget(contentsWidget); horizontalLayout.addWidget(pagesWidget, 1); QHBoxLayout buttonsLayout = new QHBoxLayout(); buttonsLayout.addStretch(1); buttonsLayout.addWidget(closeButton); QVBoxLayout mainLayout = new QVBoxLayout(); mainLayout.addLayout(horizontalLayout); mainLayout.addStretch(1); mainLayout.addSpacing(12); mainLayout.addLayout(buttonsLayout); setLayout(mainLayout); setWindowTitle(tr("Config Dialog")); setWindowIcon(new QIcon("classpath:com/trolltech/images/qt-logo.png")); }
public IcsImportView(final String path) { setWindowTitle("ICS Import"); QVBoxLayout gLayout = new QVBoxLayout(); this.setLayout(gLayout); tabWidget = new QTabWidget(this); lblStatus = new QLabel(this); gLayout.addWidget(tabWidget); gLayout.addWidget(lblStatus); ArrayList<WorkSession> workSessions; try { workSessions = IcsParser.parseIcsFile(path); for (WorkSession workSession : workSessions) { IcsImportDetailView icsImportDetailView = new IcsImportDetailView(workSession); icsImportDetailView.errorMessage.connect(this, "setErrorMessage(String)"); icsImportDetailView.closeMe.connect(this, "closeTab(IcsImportDetailView)"); icsImportDetailView.initialize(); tabWidget.addTab(icsImportDetailView, workSession.getDescription()); } } catch (WaktuException e) { setErrorMessage(e.getMessage()); } }
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
public UpdatePage(QWidget parent) { super(parent); QGroupBox updateGroup = new QGroupBox(tr("Package selection")); QCheckBox systemCheckBox = new QCheckBox(tr("Update system")); QCheckBox appsCheckBox = new QCheckBox(tr("Update applications")); QCheckBox docsCheckBox = new QCheckBox(tr("Update documentation")); QGroupBox packageGroup = new QGroupBox(tr("Existing packages")); QListWidget packageList = new QListWidget(); QListWidgetItem qtItem = new QListWidgetItem(packageList); qtItem.setText(tr("Qt")); QListWidgetItem qsaItem = new QListWidgetItem(packageList); qsaItem.setText(tr("QSA")); QListWidgetItem teamBuilderItem = new QListWidgetItem(packageList); teamBuilderItem.setText(tr("Teambuilder")); QPushButton startUpdateButton = new QPushButton(tr("Start update")); QVBoxLayout updateLayout = new QVBoxLayout(); updateLayout.addWidget(systemCheckBox); updateLayout.addWidget(appsCheckBox); updateLayout.addWidget(docsCheckBox); updateGroup.setLayout(updateLayout); QVBoxLayout packageLayout = new QVBoxLayout(); packageLayout.addWidget(packageList); packageGroup.setLayout(packageLayout); QVBoxLayout mainLayout = new QVBoxLayout(); mainLayout.addWidget(updateGroup); mainLayout.addWidget(packageGroup); mainLayout.addSpacing(12); mainLayout.addWidget(startUpdateButton); mainLayout.addStretch(1); setLayout(mainLayout); }
private void initUI() { final QHBoxLayout mainHbox = new QHBoxLayout(); { final QGroupBox videoBox = new QGroupBox(Strings.grpRenderingVideoFrames); final QVBoxLayout videoVbox = new QVBoxLayout(); { final QHBoxLayout hbox = new QHBoxLayout(); hbox.addWidget(new QLabel(Strings.lblLastFrameProcessed)); lblLastFrameProcessed = new QLabel(Strings.lblLastFrameProcessedDefault); lblLastFrameProcessed.setAlignment(AlignmentFlag.AlignRight); hbox.addWidget(lblLastFrameProcessed); videoVbox.addLayout(hbox, 0); } { final QHBoxLayout hbox = new QHBoxLayout(); hbox.addWidget(new QLabel(Strings.lblFramesProcessedPerSecond)); lblFramesProcessedPerSecond = new QLabel(Strings.lblFramesProcessedPerSecondDefault); lblFramesProcessedPerSecond.setAlignment(AlignmentFlag.AlignRight); hbox.addWidget(lblFramesProcessedPerSecond); videoVbox.addLayout(hbox, 0); } { final QHBoxLayout hbox = new QHBoxLayout(); hbox.addWidget(new QLabel(Strings.lblLastFrameSaved)); lblLastFrameSaved = new QLabel(Strings.lblLastFrameSavedDefault); lblLastFrameSaved.setAlignment(AlignmentFlag.AlignRight); hbox.addWidget(lblLastFrameSaved); videoVbox.addLayout(hbox, 0); } { previewPicture = new UpdatablePicture( Files.iconRenderingDefault, maximumPreviewWidth, maximumPreviewHeight); videoVbox.addWidget(previewPicture, 1); } { previewEnabledCheckbox = new QCheckBox(Strings.lblEnablePreview); previewEnabledCheckbox.stateChanged.connect(this, "updatePreviewEnabled()"); previewEnabled = getSettings().getPreviewEnabled(); previewEnabledCheckbox.setChecked(previewEnabled); videoVbox.addWidget(previewEnabledCheckbox, 0, AlignmentFlag.AlignHCenter); } videoBox.setLayout(videoVbox); mainHbox.addWidget(videoBox, 1); } { final QGroupBox audioBox = new QGroupBox(Strings.grpRenderingAudioBuffer); final QVBoxLayout audioVbox = new QVBoxLayout(); { audioBuffer = new QProgressBar(); audioBuffer.setOrientation(Orientation.Vertical); audioBuffer.setSizePolicy(Policy.Expanding, Policy.Expanding); audioVbox.addWidget(audioWidget(audioBuffer), 1, AlignmentFlag.AlignHCenter); lblAudioBuffer1 = new QLabel(); audioVbox.addWidget(audioWidget(lblAudioBuffer1), 0, AlignmentFlag.AlignCenter); lblAudioBuffer2 = new QLabel(); audioVbox.addWidget(audioWidget(lblAudioBuffer2), 0, AlignmentFlag.AlignCenter); btnFlushAudioBuffer = new QPushButton(Strings.btnRenderAudioBufferFlush); btnFlushAudioBuffer.clicked.connect(this, "onFlushAudioBuffer()"); btnFlushAudioBuffer.setEnabled(false); audioVbox.addWidget(audioWidget(btnFlushAudioBuffer), 0, AlignmentFlag.AlignCenter); } audioBox.setLayout(audioVbox); mainHbox.addWidget(audioBox, 0); } setLayout(mainHbox); }