本文整理汇总了C++中QMdiSubWindow::show方法的典型用法代码示例。如果您正苦于以下问题:C++ QMdiSubWindow::show方法的具体用法?C++ QMdiSubWindow::show怎么用?C++ QMdiSubWindow::show使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QMdiSubWindow
的用法示例。
在下文中一共展示了QMdiSubWindow::show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addWidget
void QMdiAreaContainer::addWidget(QWidget *widget)
{
QMdiSubWindow *frame = m_mdiArea->addSubWindow(widget, Qt::Window);
frame->show();
m_mdiArea->cascadeSubWindows();
positionNewMdiChild(m_mdiArea, frame);
}
示例2: addMDIWindow
void MWMDIManagerImpl::addMDIWindow(MWMDIWindow* w) {
bool contains = getWindowById(w->getId())!=NULL;
if (contains) {
assert(0); //must never happen
return;
}
w->setParent(mdiArea);
QMdiSubWindow* qw = mdiArea->addSubWindow(w);
qw->setWindowTitle(w->windowTitle());
QIcon icon = w->windowIcon();
if (icon.isNull()) {
icon = QIcon(":/ugene/images/ugene_16.png");
}
qw->setWindowIcon(icon);
//qw->setAttribute(Qt::WA_NativeWindow);
MDIItem* i = new MDIItem(w, qw);
items.append(i);
qw->installEventFilter(this);
uiLog.trace(QString("Adding window: '%1'").arg(w->windowTitle()));
updateState();
emit si_windowAdded(w);
if (items.count() == 1 && defaultIsMaximized) {
qw->showMaximized();
} else {
qw->show();
}
qw->raise();
}
示例3: openForm
void PERPMainWindow::openForm(const QString &actionName)
{
QString tableName = actionName;
tableName.replace("table_", "");
QString formName = QString("mdiform_%1").arg(tableName);
if ( d->m_mapeoVentanas.contains(formName) ) {
d->m_mdiArea->setActiveSubWindow(d->m_mapeoVentanas.value(formName));
return;
}
DBFormDlg *dlg = new DBFormDlg(tableName, this);
if ( dlg->openSuccess() ) {
// Muy importante para el mapeo MDI
dlg->setObjectName(formName);
dlg->setAttribute(Qt::WA_DeleteOnClose);
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
dlg->init();
QApplication::restoreOverrideCursor();
QMdiSubWindow *subWin = d->m_mdiArea->addSubWindow(dlg);
d->m_mapeoVentanas.insert(formName, subWin);
subWin->setOption(QMdiSubWindow::RubberBandResize, true);
subWin->setOption(QMdiSubWindow::RubberBandMove, true);
// Guardamos una referencia al objeto
subWin->setAttribute(Qt::WA_DeleteOnClose);
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
subWin->show();
QApplication::restoreOverrideCursor();
connect (dlg, SIGNAL(closingWindow(QWidget *)), this, SLOT(closeSubWindow(QWidget *)));
connect (subWin, SIGNAL(aboutToActivate()), dlg, SLOT(refreshFilterTableView()));
configuracion.applyDimensionForm(subWin);
} else {
示例4: loadFixtureDefinition
void App::loadFixtureDefinition(const QString& path)
{
QLCFixtureDef* fixtureDef = NULL;
/* Attempt to create a fixture definition from the selected file */
QString error(tr("Unrecognized file extension: %1").arg(path));
if (path.toLower().endsWith(KExtFixture) == true)
fixtureDef = loadQXF(path, error);
else if (path.toLower().endsWith(KExtAvolitesFixture) == true)
fixtureDef = loadD4(path, error);
else
fixtureDef = NULL;
if (fixtureDef != NULL)
{
/* Create a new sub window and put a fixture editor widget
in that sub window with the newly-created fixture def */
QMdiSubWindow* sub = new QMdiSubWindow(centralWidget());
QLCFixtureEditor* editor = new QLCFixtureEditor(sub, fixtureDef, path);
sub->setWidget(editor);
sub->setAttribute(Qt::WA_DeleteOnClose);
qobject_cast<QMdiArea*> (centralWidget())->addSubWindow(sub);
editor->show();
sub->show();
}
else
{
QMessageBox::warning(this, tr("Fixture loading failed"),
tr("Unable to load fixture definition: ") + error);
}
}
示例5: fileNew
void MainWindow::fileNew() {
if (_sdata)
if (!_sdata->isSaved())
maybeSave();
fileClose();
// if project exist,
// if not saved,
//maybe save?
// close
// run wizard
QMdiSubWindow * world = _mdiArea->addSubWindow(new WorldWidget());
world->setWindowTitle("*untitled");
world->setMinimumSize(300, 200);
world->show();
_sdata = new SimulationData();
_sdata->setSaved(false);
connect(_sdata, SIGNAL(fileNameChanged(QString)), world, SLOT(setWindowTitle(QString)));
SensorNetwork net(40);
net.push();
net.start();
_fileSaveAsAct->setEnabled(true);
_fileCloseAct->setEnabled(true);
}
示例6: connect
inline QMdiSubWindow *MainWindow::CreateTable(ETable aType, Table *aTable)
{
QMdiSubWindow *sw = mdiArea->addSubWindow(aTable);
sw->show();
mapTable.insert(aType, aTable);
connect(aTable, SIGNAL(destroyed(QObject *)), this, SLOT(DestroyTable(QObject *)));
return sw;
}
示例7: QMdiArea
Workspace::Workspace(PreviewFrame *parent)
: QMdiArea(parent)
{
previewFrame = parent;
PreviewWidget *previewWidget = previewFrame->widget();
QMdiSubWindow *frame = addSubWindow(previewWidget, Qt::Window);
frame->move(10, 10);
frame->show();
}
示例8: new_combo_trade
void MainWindow::new_combo_trade()
{
ComboTradeDialog *comboTradeDialog = new ComboTradeDialog;
QMdiSubWindow *qMdiSubWindow = ui_->mdiArea_combo->addSubWindow(comboTradeDialog);
qMdiSubWindow->setAttribute(Qt::WA_DeleteOnClose);
qMdiSubWindow->setFixedSize(320, 240);
qMdiSubWindow->setWindowFlags(qMdiSubWindow->windowFlags()& ~Qt::WindowMaximizeButtonHint& ~Qt::WindowMinimizeButtonHint);
qMdiSubWindow->show();
}
示例9: QMdiArea
Workspace::Workspace(PreviewFrame* parent, const char* name)
: QMdiArea(parent)
{
previewFrame = parent;
PreviewWidget *previewWidget = previewFrame->widget();
setObjectName(QLatin1String(name));
QMdiSubWindow *frame = addSubWindow(previewWidget, Qt::Window);
frame->move(10,10);
frame->show();
}
示例10: react
void FileNewController::react() {
qDebug() << "Creating new window";
EditSubWindow *newEditWindow = new EditSubWindow(&mdiMain);
BufferRef buffer = bufferPool.getEmptyBuffer();
newEditWindow->setBuffer(buffer);
newEditWindow->show();
QMdiSubWindow *subWindow = mdiMain.addSubWindow(newEditWindow);
subWindow->setAttribute(Qt::WA_DeleteOnClose);
subWindow->show();
}
示例11: addEditor
void MainWindow::addEditor(Editor *editor)
{
connect(editor, SIGNAL(copyAvailable(bool)),
cutAction, SLOT(setEnabled(bool)));
connect(editor, SIGNAL(copyAvailable(bool)),
copyAction, SLOT(setEnabled(bool)));
QMdiSubWindow *subWindow = mdiArea->addSubWindow(editor);
windowMenu->addAction(editor->windowMenuAction());
windowActionGroup->addAction(editor->windowMenuAction());
subWindow->show();
}
示例12: TimeTrackingWindow
// =============================================================================
ITimeTrackingWindow * MainWindow::createSubWindow(const QString& userName, const QDate& tmpDate) {
DEBUG_OBJ("");
ITimeTrackingWindow * timeTrackingWindow = new TimeTrackingWindow(&mSubject, userName, tmpDate, this);
DEBUG("Opening subWindow " + userName + ", date: " + tmpDate.toString());
QMdiSubWindow *subWindow = mMdiArea->addSubWindow(timeTrackingWindow);
// TODO Update events in MDI
// *windowMenu->addAction(editor->windowMenuAction());
// windowActionGroup->addAction(editor->windowMenuAction());
subWindow->show();
return timeTrackingWindow;
}
示例13: on_action_New_triggered
// 新建文件菜单
void MainWindow::on_action_New_triggered()
{
// 新建文本编辑器部件
QTextEdit *edit = new QTextEdit(this);
// 使用QMdiArea类的addSubWindow()函数创建子窗口,以文本编辑器为中心部件
QMdiSubWindow *child = ui->mdiArea->addSubWindow(edit);
child->setWindowTitle(tr("多文档编辑器子窗口"));
// 显示子窗口
child->show();
}
示例14: addImage
void WindowService::addImage(const QString& id, ImageWindow* image)
{
if(_widgets.find(id) != _widgets.end())
{
QMdiSubWindow* sw = _mdi->addSubWindow(image);
_widgets[id] << sw;
SubWindowController* swc = new SubWindowController(id, sw);
QObject::connect(sw, SIGNAL(aboutToActivate()), image, SLOT(activated()));
QObject::connect(sw, SIGNAL(destroyed()), swc, SLOT(closeSubWindow()));
QObject::connect(swc, SIGNAL(removeFromWindowsMap(const QString&, QMdiSubWindow*)), this, SLOT(removeSubWindow(const QString&,QMdiSubWindow*)));
sw->show();
}
示例15: new_swing_trade
void MainWindow::new_swing_trade()
{
QString contractName = tr("Exchange-Contract-").append(QString("%1").arg(swing_counter_));
SwingTradeDialog *swingTradeDialog = new SwingTradeDialog(contractName, swing_counter_, disp_, this);
connect(swingTradeDialog, SIGNAL(update_contract(QString)), this, SLOT(update_swing_contract(QString)));
QMdiSubWindow *qMdiSubWindow = ui_->mdiArea_swing->addSubWindow(swingTradeDialog);
qMdiSubWindow->setAttribute(Qt::WA_DeleteOnClose);
qMdiSubWindow->setFixedSize(265, 440);
qMdiSubWindow->setWindowFlags(qMdiSubWindow->windowFlags()& ~Qt::WindowMaximizeButtonHint& ~Qt::WindowMinimizeButtonHint);
qMdiSubWindow->setWindowTitle(contractName);
qMdiSubWindow->show();
swing_counter_++;
selcon_->setCurrentText(contractName);
}