void QmitkPythonConsoleView::CreateQtPartControl( QWidget *parent ) { QGridLayout *gridLayout; if (parent->objectName().isEmpty()) parent->setObjectName(QString::fromUtf8("parent")); parent->resize(790, 774); parent->setMinimumSize(QSize(0, 0)); gridLayout = new QGridLayout(parent); gridLayout->setObjectName(QString::fromUtf8("gridLayout")); m_ctkPythonManager = new ctkAbstractPythonManager(parent); m_ctkPythonShell = new QmitkCTKPythonShell(m_ctkPythonManager, parent); m_ctkPythonShell->setObjectName(QString::fromUtf8("m_ctkPythonShell")); m_ctkPythonShell->setMinimumSize(QSize(120, 100)); m_ctkPythonShell->setMaximumSize(QSize(2000, 2000)); gridLayout->addWidget(m_ctkPythonShell, 0, 0, 1, 1); m_ButtonOpenEditor = new QPushButton(parent); m_ButtonOpenEditor->setObjectName(QString::fromUtf8("m_ButtonOpenEditor")); gridLayout->addWidget(m_ButtonOpenEditor, 1, 0, 1, 1); parent->setWindowTitle(QApplication::translate("parent", "QmitkTemplate", 0, QApplication::UnicodeUTF8)); m_ButtonOpenEditor->setText(QApplication::translate("parent", "Open Editor", 0, QApplication::UnicodeUTF8)); QMetaObject::connectSlotsByName(parent); mitk::DataStorage::Pointer dataStorage = this->GetDefaultDataStorage(); m_ctkPythonManager->executeString("import mitk"); QmitkPythonMediator::getInstance()->setClient(this); QmitkPythonMediator::getInstance()->update(); connect( m_ctkPythonShell, SIGNAL(executeCommandSignal(const QString&)), this, SLOT(SetCommandHistory(const QString&))); connect( m_ButtonOpenEditor, SIGNAL(clicked()), this, SLOT(OpenEditor()) ); }
bool DataGridContentProvider::SetSelectedCell(const GridPos& value, bool openEditor) { if(currentCell!=value) { if(value==GridPos(-1, -1)) { CloseEditor(false); return true; } else if(0<=value.row && value.row<dataProvider->GetRowCount() && 0<=value.column && value.column<dataProvider->GetColumnCount()) { IDataEditorFactory* editorFactory=openEditor?dataProvider->GetCellDataEditorFactory(value.row, value.column):0; OpenEditor(value.row, value.column, editorFactory); return true; } return false; } return true; }
void ProjectFrame::EditItem() { ProjectItem *itm = prjTree->GetSelectedNode(); if (itm != NULL) OpenEditor(itm); }
/*! * \en Opens property editor. \_en * \ru Открывает окно редактора свойсв, если fn == true \_ru */ void wDBTable::setOpenEditor( bool fn ) { if(fn) OpenEditor(); }