LithologicalUnitEditorDialog::LithologicalUnitEditorDialog(QWidget* parent, LithologicalUnit* p)
: DatasetEditorDialog(parent, p) {
    addMainPage(tr("Lithological Unit"));
    addIdLabel();
    addNameEdit();

    _typeV = new LithologicalUnitTypeView(getMainPage(),
            (static_cast<ProfileLogger*>(QApplication::instance()))->getLithologicalUnitTypeItemModel());

    QGridLayout* l = static_cast<QGridLayout*>(getMainPage()->layout());
    QLabel* lbl = new QLabel(tr("Unit Type"), getMainPage());
    lbl->setAlignment(Qt::AlignTop);
    
    l->addWidget(lbl, r, lC);
    l->addWidget(_typeV, r, wC);
    r++;
    
    addDescriptionEdit();
    addButtons();

    connect(_typeV, SIGNAL(currentLithologicalUnitTypeChanged(LithologicalUnitType*)),
            this, SLOT(slotLithologicalUnitTypeChanged(LithologicalUnitType*)));

    _typeV->selectLithologicalUnitType(getLithologicalUnit()->getLithologicalUnitType());
    emit showDatasetRequest(getLithologicalUnit());
    slotShowDataset(getLithologicalUnit());
}
void BedCorrelationEditorDialog::setupBedSelectors() {
  QWidget* w = new QWidget(getMainPage());

  QGridLayout* l = new QGridLayout(w);
  w->setLayout(l);

  _leftProfileM = new ProfileItemModel(this);
  _leftProfileV = new ProfileItemView(this, _leftProfileM);
  _rightProfileM = new ProfileItemModel(this);
  _rightProfileV = new ProfileItemView(this, _rightProfileM);

  _leftProfileV->setEnabled(true);
  _leftProfileV->setContextMenuPolicy(Qt::NoContextMenu);
  _rightProfileV->setEnabled(true);
  _rightProfileV->setContextMenuPolicy(Qt::NoContextMenu);
    
  _leftBedM = new BedItemModel(this);
  _leftBedV = new BedItemView(this, _leftBedM);
  _rightBedM = new BedItemModel(this);
  _rightBedV = new BedItemView(this, _rightBedM);

  _leftBedV->setEnabled(true);
  _leftBedV->setContextMenuPolicy(Qt::NoContextMenu);
  _rightBedV->setEnabled(true);
  _rightBedV->setContextMenuPolicy(Qt::NoContextMenu);

  l->addWidget(_leftProfileV, 0, 0);
  l->addWidget(_rightProfileV, 0, 1);
  l->addWidget(_leftBedV, 1, 0);
  l->addWidget(_rightBedV, 1, 1);

  ((QGridLayout*)(getMainPage()->layout()))->addWidget(w, r, wC);
  r++;
}
Example #3
0
    void SearchDropdown::addContact()
    {
        const auto mainWindow = Utils::InterConnector::instance().getMainWindow();
        if (mainWindow)
        {
            auto mainPage = mainWindow->getMainPage();
            if (mainPage)
                mainPage->setSearchFocus();
        }

        showPlaceholder();
        searchWidget_->setPlaceholderText(QT_TRANSLATE_NOOP("search_widget", "Phone, UIN, Name, Email"));
    }
Example #4
0
 void MainWindow::pasteEmoji()
 {
     getMainPage()->getContactDialog()->onSmilesMenu();
 }