void RoomsDialog::createUI() { this->setWindowTitle(QString::fromUtf8("Tantermek")); this->m_newButton = new QPushButton(QString::fromUtf8("Új")); this->m_modifyButton = new QPushButton(QString::fromUtf8("Módosítások alkalmazása")); this->m_delButton = new QPushButton(QString::fromUtf8("Kijelöltek törlése")); this->m_clearAllButton = new QPushButton(QString::fromUtf8("Mind törlése")); this->m_refreshButton = new QPushButton(QString::fromUtf8("Tábla frissítése")); this->m_buttonsLayout = new QHBoxLayout(); this->m_buttonsLayout->addWidget(this->m_newButton); this->m_buttonsLayout->addWidget(this->m_modifyButton); this->m_buttonsLayout->addWidget(this->m_delButton); this->m_buttonsLayout->addWidget(this->m_clearAllButton); this->m_buttonsLayout->addWidget(this->m_refreshButton); this->m_tableWidget = new QTableWidget(); this->m_tableWidget->setMinimumSize(650, 400); this->m_layout = new QVBoxLayout(); this->m_layout->addLayout(this->m_buttonsLayout); this->m_layout->addWidget(this->m_tableWidget); this->setLayout(this->m_layout); connect(this->m_newButton, SIGNAL(clicked()), this, SLOT(newButtonClicked())); connect(this->m_modifyButton, SIGNAL(clicked()), this, SLOT(modifyButtonClicked())); connect(this->m_delButton, SIGNAL(clicked()), this, SLOT(delButtonClicked())); connect(this->m_clearAllButton, SIGNAL(clicked()), gdata, SLOT(deleteAllRooms())); connect(this->m_refreshButton, SIGNAL(clicked()), this, SLOT(refreshTable())); connect(gdata, SIGNAL(roomsReady()), this, SLOT(roomsReady())); }
UI_AnnotationEditwindow::UI_AnnotationEditwindow(int file_number, QWidget *w_parent) { mainwindow = (UI_Mainwindow *)w_parent; file_num = file_number; annotation = mainwindow->annotationlist[file_num]; dockedit = new QDockWidget("Annotation editor", w_parent); dockedit->setAllowedAreas(Qt::TopDockWidgetArea | Qt::BottomDockWidgetArea); dockedit->setFeatures(QDockWidget::DockWidgetClosable | QDockWidget::DockWidgetMovable); annot_edit_dialog = new QDialog; annot_edit_dialog->setMinimumSize(640, 45); dockedit->setWidget(annot_edit_dialog); descriptionLabel = new QLabel(annot_edit_dialog); descriptionLabel->setGeometry(10, 10, 78, 25); descriptionLabel->setText("Description"); annot_descript_lineEdit = new QLineEdit(annot_edit_dialog); annot_descript_lineEdit->setGeometry(90, 10, 150, 25); onsetLabel = new QLabel(annot_edit_dialog); onsetLabel->setGeometry(250, 10, 48, 25); onsetLabel->setText("Onset"); posNegTimebox = new QComboBox(annot_edit_dialog); posNegTimebox->setGeometry(300, 10, 35, 25); posNegTimebox->setEditable(false); posNegTimebox->addItem("+"); posNegTimebox->addItem("-"); onset_daySpinbox = new QSpinBox(annot_edit_dialog); onset_daySpinbox->setGeometry(335, 10, 45, 25); onset_daySpinbox->setRange(0, 99); onset_daySpinbox->setSingleStep(1); onset_daySpinbox->setValue(0); onset_timeEdit = new QTimeEdit(annot_edit_dialog); onset_timeEdit->setGeometry(380, 10, 100, 25); onset_timeEdit->setDisplayFormat("hh:mm:ss.zzz"); onset_timeEdit->setMinimumTime(QTime(-1, 0, 0, 0)); durationLabel = new QLabel(annot_edit_dialog); durationLabel->setGeometry(490, 10, 58, 25); durationLabel->setText("Duration"); duration_spinbox = new QDoubleSpinBox(annot_edit_dialog); duration_spinbox->setGeometry(550, 10, 120, 25); duration_spinbox->setRange(-1.0, 10000.0); duration_spinbox->setSingleStep(1.0); duration_spinbox->setDecimals(3); duration_spinbox->setSuffix(" sec"); duration_spinbox->setValue(-1.0); modifybutton = new QPushButton(annot_edit_dialog); modifybutton->setGeometry(720, 10, 100, 25); modifybutton->setText("Modify"); modifybutton->setEnabled(false); deletebutton = new QPushButton(annot_edit_dialog); deletebutton->setGeometry(840, 10, 100, 25); deletebutton->setText("Delete"); deletebutton->setEnabled(false); createbutton = new QPushButton(annot_edit_dialog); createbutton->setGeometry(960, 10, 100, 25); createbutton->setText("Create"); QObject::connect(modifybutton, SIGNAL(clicked()), this, SLOT(modifyButtonClicked())); QObject::connect(deletebutton, SIGNAL(clicked()), this, SLOT(deleteButtonClicked())); QObject::connect(createbutton, SIGNAL(clicked()), this, SLOT(createButtonClicked())); QObject::connect(dockedit, SIGNAL(visibilityChanged(bool)), this, SLOT(open_close_dock(bool))); }