当前位置: 首页>>代码示例>>C++>>正文


C++ QMdiSubWindow::show方法代码示例

本文整理汇总了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);
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:7,代码来源:qmdiarea_container.cpp

示例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();
}
开发者ID:ggrekhov,项目名称:ugene,代码行数:32,代码来源:MDIManagerImpl.cpp

示例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 {
开发者ID:BaconGo,项目名称:alepherp,代码行数:32,代码来源:perpmainwindow.cpp

示例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);
    }
}
开发者ID:Babbsdrebbler,项目名称:qlcplus,代码行数:33,代码来源:app.cpp

示例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);
}
开发者ID:ZeroGroup,项目名称:project-hpc,代码行数:29,代码来源:MainWindow.cpp

示例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;
}
开发者ID:VasayXTX,项目名称:AIS--for-univer-,代码行数:8,代码来源:mainWindow.cpp

示例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();
}
开发者ID:Drakey83,项目名称:steamlink-sdk,代码行数:9,代码来源:previewframe.cpp

示例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();
}
开发者ID:ifhuang,项目名称:AutoTrade,代码行数:9,代码来源:mainwindow.cpp

示例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();
}
开发者ID:kuailexs,项目名称:symbiandump-mw3,代码行数:10,代码来源:previewframe.cpp

示例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();
}
开发者ID:d11,项目名称:Audo,代码行数:10,代码来源:FileNewController.cpp

示例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();
}
开发者ID:Iownnoname,项目名称:qt,代码行数:12,代码来源:mainwindow.cpp

示例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;
}
开发者ID:2BlackCoffees,项目名称:EasyTimeTracker,代码行数:14,代码来源:mainwindow.cpp

示例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();
}
开发者ID:Rookiee,项目名称:Qt_Codes,代码行数:14,代码来源:mainwindow.cpp

示例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();
    }
开发者ID:detiq-t,项目名称:detiq-t_old,代码行数:16,代码来源:WindowService.cpp

示例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);
}
开发者ID:ifhuang,项目名称:AutoTrade,代码行数:17,代码来源:mainwindow.cpp


注:本文中的QMdiSubWindow::show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。