本文整理汇总了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();
}
示例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();
}
示例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;
}
示例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);
}
示例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");
}
}
}