Пример #1
0
QtNoWengoAlert::QtNoWengoAlert(QWidget * parent, QtWengoPhone & qtWengoPhone)
    : _qtWengoPhone(qtWengoPhone) {

    _NoWengoAlert = new QDialog(parent);

    _ui = new Ui::NoWengoAlert();
    _ui->setupUi(_NoWengoAlert);

    SAFE_CONNECT(_ui->haveBtn, SIGNAL(clicked()), SLOT(haveButtonClicked()));
    SAFE_CONNECT(_ui->createBtn, SIGNAL(clicked()), SLOT(createButtonClicked()));
}
Пример #2
0
void SelectProjectScreen::createProjectGui()
{
  Gui::label(Rect(centerPanel.x + PADDING,
                  centerPanel.y + PADDING, 300, 30),
                  "Project Location:");

  if(Gui::button(Rect(centerPanel.x + centerPanel.width - 100 - PADDING,
                      centerPanel.y + centerPanel.height - 25 - PADDING,
                      100, 25), "Create") == true)
  {
    createButtonClicked();
  }
}
Пример #3
0
QtNoWengoAlert::QtNoWengoAlert(QWidget * parent, QtWengoPhone & qtWengoPhone, QString title, QString maintext)
    : _qtWengoPhone(qtWengoPhone) {

    _NoWengoAlert = new QDialog(parent);

    _ui = new Ui::NoWengoAlert();
    _ui->setupUi(_NoWengoAlert);

    _NoWengoAlert->setWindowTitle(title);
    _ui->mainText->setText(maintext);

    SAFE_CONNECT(_ui->haveBtn, SIGNAL(clicked()), SLOT(haveButtonClicked()));
    SAFE_CONNECT(_ui->createBtn, SIGNAL(clicked()), SLOT(createButtonClicked()));
}
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)));
}