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


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

本文整理汇总了C++中QMdiSubWindow::move方法的典型用法代码示例。如果您正苦于以下问题:C++ QMdiSubWindow::move方法的具体用法?C++ QMdiSubWindow::move怎么用?C++ QMdiSubWindow::move使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QMdiSubWindow的用法示例。


在下文中一共展示了QMdiSubWindow::move方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: 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

示例2: 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

示例3: tileSubWindows

/*!
    Tile the windows. There is one window for digital signal generation
    and one window for analog signal generation.
*/
void UiGeneratorArea::tileSubWindows()
{
    QList<QMdiSubWindow*> windows = subWindowList();

    if (windows.size() == 0) return;

    int wHeight = (height()) / windows.size();

    int y = 0;
    for (int i = 0; i < windows.size(); i++) {
        QMdiSubWindow* win = windows.at(i);
        win->resize(width(), wHeight);
        win->move(0, y);
        y += wHeight;
    }

    mIsSubWindowsTiled = true;
}
开发者ID:AlexandreN7,项目名称:Liqui_lense,代码行数:22,代码来源:uigeneratorarea.cpp

示例4: openMap

/**
 * @brief MainWindow::openMap Initialize and opens the given map.
 * @param map
 * @param notify Notifies all the clients that a new map has been opened if true.
 */
void MainWindow::openMap(Map *map, bool notify) {
    QListWidget *tokenList = ui->tokenPage->getUi()->m_tokenList;

    // Initialize Map with the MapServer
    if (m_Server != NULL) {
        Receiver *mapServerReceiver = m_Server->getReceiver(TargetCode::MAP_SERVER);
        MapServer *mapServer = dynamic_cast<MapServer*>(mapServerReceiver);
        map->setSenderServer(mapServer);
    }

    // Initialize Map with the MapClient
    Receiver *mapClientReceiver = m_Client->getReceiver(TargetCode::MAP_CLIENT);
    MapClient *mapClient = dynamic_cast<MapClient*>(mapClientReceiver);
    mapClient->addMapToList(map);
    map->setSenderClient(mapClient);

    QMdiSubWindow *subwindow = ui->tableArea->addSubWindow(map);
    subwindow->show();
    subwindow->move(0, 0);

    connect(tokenList, SIGNAL(currentItemChanged(QListWidgetItem*,  QListWidgetItem *)),
            map->getMapLayer(), SLOT(setTokenItem(QListWidgetItem*))
    );

    if (notify) {
        // Notifies all the clients that a new map has been opened
        Receiver *mapClientReceiver = m_Client->getReceiver(TargetCode::MAP_CLIENT);
        MapClient *mapClient = dynamic_cast<MapClient*>(mapClientReceiver);
        QString msg = QString("%1").arg(map->id());
        mapClient->sendMessageToServer(msg, (quint16) MapCodes::OPEN_MAP);
    }

    m_NotificationStacker.pushNotification("Une carte a été ouverte");

    // Connect to the LogClient
    TargetCode logClientCode(TargetCode::LOGGER_CLIENT);
    Receiver *logClientReceiver = m_Client->getReceiver(logClientCode);
    LogClient *logClient = dynamic_cast<LogClient*>(logClientReceiver);
    map->connectToLogger(logClient);
}
开发者ID:Nepta,项目名称:nixjdr,代码行数:45,代码来源:MainWindow.cpp

示例5: setIsMdiWin

void TopWin::setIsMdiWin(bool val)
{
	if (MusEGlobal::unityWorkaround)
		return;
	
	if (val)
	{
		if (!isMdiWin())
		{
			_savedToolbarState = saveState();
			int width_temp=width();
			int height_temp=height();
			bool vis=isVisible();
			
			QMdiSubWindow* subwin = createMdiWrapper();
			muse->addMdiSubWindow(subwin);
			subwin->resize(width_temp, height_temp);
			subwin->move(0,0);
			subwin->setVisible(vis);
			this->QMainWindow::show(); //bypass the delegation to the subwin
			
			if (_sharesToolsAndMenu == _sharesWhenFree[_type])
				shareToolsAndMenu(_sharesWhenSubwin[_type]);
			
			fullscreenAction->setEnabled(false);
			fullscreenAction->setChecked(false);
			subwinAction->setChecked(true);
			muse->updateWindowMenu();
		}
		else
		{
			if (MusEGlobal::debugMsg) printf("TopWin::setIsMdiWin(true) called, but window is already a MDI win\n");
		}
	}
	else
	{
		if (isMdiWin())
		{
			int width_temp=width();
			int height_temp=height();
			bool vis=isVisible();

			QMdiSubWindow* mdisubwin_temp=mdisubwin;
			mdisubwin=NULL;
			setParent(NULL);
			mdisubwin_temp->hide();
			delete mdisubwin_temp;
			
			resize(width_temp, height_temp);
			setVisible(vis);

			if (_sharesToolsAndMenu == _sharesWhenSubwin[_type])
				shareToolsAndMenu(_sharesWhenFree[_type]);
						
			fullscreenAction->setEnabled(true);
			subwinAction->setChecked(false);
			muse->updateWindowMenu();
		}
		else
		{
			if (MusEGlobal::debugMsg) printf("TopWin::setIsMdiWin(false) called, but window is not a MDI win\n");
		}
	}
}
开发者ID:UIKit0,项目名称:lmuse,代码行数:64,代码来源:cobject.cpp


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