int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = Q3MainWindow::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: OnFileNew(); break; case 1: OnFileEdit(); break; case 2: OnFileOpen(); break; case 3: OnFileSave(); break; case 4: OnFileConfig(); break; case 5: OnFileExit(); break; case 6: OnSimRun(); break; case 7: OnSimPause(); break; case 8: OnSimSkip(); break; case 9: OnSimStop(); break; case 10: OnNetInit(); break; case 11: OnNetClose(); break; case 12: OnNetServer(); break; case 13: OnNetServer((*reinterpret_cast< int(*)>(_a[1]))); break; default: ; } _id -= 14; } return _id; }
BOOL CMainFrame::OnCommand(WPARAM wParam, LPARAM lParam) { // OnCommand responds to menu and and toolbar input UNREFERENCED_PARAMETER(lParam); switch(LOWORD(wParam)) { case IDM_FILE_EXIT: OnFileExit(); return TRUE; case IDM_MODERN: ChooseColor(IDM_MODERN); return TRUE; case IDM_BLUE: ChooseColor(IDM_BLUE); return TRUE; case IDM_GREY: ChooseColor(IDM_GREY); return TRUE; case IDM_OLIVE: ChooseColor(IDM_OLIVE); return TRUE; case IDM_OCHRE: ChooseColor(IDM_OCHRE); return TRUE; case IDM_MAUVE: ChooseColor(IDM_MAUVE); return TRUE; case IDM_PINK: ChooseColor(IDM_PINK); return TRUE; case IDM_GOLD: ChooseColor(IDM_GOLD); return TRUE; case IDM_BLACK: ChooseColor(IDM_BLACK); return TRUE; case IDM_USE_THEMES: OnUseThemes(); return TRUE; case IDM_BAND_COLORS: OnBandColors(); return TRUE; case IDM_FLAT_STYLE: OnFlatStyle(); return TRUE; case IDM_LEFT_BANDS: OnLeftBands(); return TRUE; case IDM_LOCK_MENUBAR: OnLockMenuBar(); return TRUE; case IDM_ROUND_BORDERS: OnRoundBorders(); return TRUE; case IDM_SHORT_BANDS: OnShortBands(); return TRUE; case IDM_USE_LINES: OnUseLines(); return TRUE; case IDM_VIEW_ARROWS: OnViewArrows(); return TRUE; case IDM_VIEW_CARDS: OnViewCards(); return TRUE; case IDW_VIEW_STATUSBAR: OnViewStatusBar(); return TRUE; case IDW_VIEW_TOOLBAR: OnViewToolBar(); return TRUE; case IDM_HELP_ABOUT: OnHelp(); return TRUE; } return FALSE; }
BOOL CMainMDIFrame::OnCommand(WPARAM wParam, LPARAM lParam) { switch (LOWORD(wParam)) { case IDM_FILE_NEW: return OnFileNew(); case IDM_FILE_CLOSE: return OnFileClose(); case IDM_FILE_OPEN: return OnFileOpen(); case IDM_FILE_SAVE: return OnFileSave(); case IDM_FILE_SAVEAS: return OnFileSave(); case IDM_FILE_PRINT: return OnFilePrint(); case IDW_VIEW_STATUSBAR: return OnViewStatusBar(); case IDW_VIEW_TOOLBAR: return OnViewToolBar(); case IDW_MDI_ARRANGE: return OnMDIIconArrange(); case IDW_MDI_CASCADE: return OnMDICascade(); case IDW_MDI_CLOSEALL: return OnMDICloseAll(); case IDW_MDI_TILE: return OnMDITile(); case IDM_FILE_EXIT: return OnFileExit(); case IDM_HELP_ABOUT: return OnHelp(); default: // Pass to active child... { if (GetActiveMDIChild()) GetActiveMDIChild()->SendMessage(WM_COMMAND, wParam, lParam); } break ; } return FALSE; }
BOOL CMainFrame::OnCommand(WPARAM wParam, LPARAM lParam) { UNREFERENCED_PARAMETER(lParam); // OnCommand responds to menu and and toolbar input switch(LOWORD(wParam)) { case IDM_FILE_EXIT: OnFileExit(); return TRUE; case IDM_DOCK_DEFAULT: OnDockDefault(); return TRUE; case IDM_DOCK_CLOSEALL: OnDockCloseAll(); return TRUE; case IDM_PROP_RESIZE: OnPropResize(); return TRUE; case IDM_3DBORDER: On3DBorder(); return TRUE; case IDM_NO_UNDOCK: OnNoUndocking(); return TRUE; case IDM_NO_RESIZE: OnNoResize(); return TRUE; case IDM_NO_DOCK_LR: OnNoDockLR(); return TRUE; case IDM_NO_DOCK_CLOSE: OnNoDockClose(); return TRUE; case IDM_DYNAMIC_RESIZE: OnDynamicResize(); return TRUE; case IDW_VIEW_STATUSBAR: OnViewStatusBar(); return TRUE; case IDW_VIEW_TOOLBAR: OnViewToolBar(); return TRUE; case IDM_HELP_ABOUT: OnHelp(); return TRUE; } return FALSE; }
BOOL CMainFrame::OnCommand(WPARAM wParam, LPARAM lParam) { // Process the messages from the Menu and Tool Bar UNREFERENCED_PARAMETER(lParam); switch (LOWORD(wParam)) { case IDM_FILE_NEW: OnFileNew(); return TRUE; case IDM_FILE_OPEN: OnFileOpen(); return TRUE; case IDM_FILE_SAVE: OnFileSave(); return TRUE; case IDM_FILE_SAVEAS: OnFileSaveAs(); return TRUE; case IDM_FILE_PRINT: OnFilePrint(); return TRUE; case IDM_PEN_COLOR: OnPenColor(); return TRUE; case IDM_FILE_EXIT: OnFileExit(); return TRUE; case IDW_FILE_MRU_FILE1: case IDW_FILE_MRU_FILE2: case IDW_FILE_MRU_FILE3: case IDW_FILE_MRU_FILE4: case IDW_FILE_MRU_FILE5: OnFileMRU(wParam); return TRUE; case IDW_VIEW_STATUSBAR: return OnViewStatusBar(); case IDW_VIEW_TOOLBAR: return OnViewToolBar(); case IDM_HELP_ABOUT: return OnHelp(); } return FALSE; }
BOOL CMainFrame::OnCommand(WPARAM wParam, LPARAM lParam) { UNREFERENCED_PARAMETER(lParam); switch(LOWORD(wParam)) { case IDM_FILE_EXIT: return OnFileExit(); case IDM_VIEW_TEXT: return OnViewText(); case IDM_VIEW_LIST: return OnViewList(); case IDW_VIEW_STATUSBAR: return OnViewStatusBar(); case IDW_VIEW_TOOLBAR: return OnViewToolBar(); case IDM_HELP_ABOUT: return OnHelp(); } return FALSE; }
BOOL CView::OnCommand(WPARAM wParam, LPARAM lParam) { // OnCommand responds to menu and and toolbar input UNREFERENCED_PARAMETER(lParam); switch(LOWORD(wParam)) { case IDM_MINTOTRAY: Minimize(); return TRUE; case IDM_FILE_EXIT: OnFileExit(); return TRUE; case IDM_HELP_ABOUT: OnAbout(); return TRUE; } return FALSE; }
BOOL CMainFrame::OnCommand(WPARAM wParam, LPARAM lParam) { // OnCommand responds to menu and and toolbar input UNREFERENCED_PARAMETER(lParam); switch(LOWORD(wParam)) { case IDM_FILE_EXIT: OnFileExit(); return TRUE; case IDM_MODELESS: OnModeless(); return TRUE; case IDM_MODAL: OnModal(); return TRUE; case IDM_WIZARD: OnWizard(); return TRUE; case IDW_VIEW_STATUSBAR: OnViewStatusBar(); return TRUE; case IDW_VIEW_TOOLBAR: OnViewToolBar(); return TRUE; case IDM_HELP_ABOUT: OnHelp(); return TRUE; } return FALSE; }
DeformableRegistration::DeformableRegistration(QWidget *parent, Qt::WFlags flags) : QMainWindow(parent, flags) { ui.setupUi(this); ui.view->pParentDlg = this; ui.horizontalLayout->setContentsMargins(0, 0, 0, 0); connect(ui.actionNew, SIGNAL(triggered()), this, SLOT(OnFileNew())); connect(ui.actionOpenTemplate, SIGNAL(triggered()), this, SLOT(OnFileOpenTemplate())); connect(ui.actionOpenTarget, SIGNAL(triggered()), this, SLOT(OnFileOpenTarget())); connect(ui.actionSaveTemplate, SIGNAL(triggered()), this, SLOT(OnFileSaveTemplate())); connect(ui.actionSaveTarget, SIGNAL(triggered()), this, SLOT(OnFileSaveTarget())); connect(ui.actionExit, SIGNAL(triggered()), this, SLOT(OnFileExit())); connect(ui.actionScreencapture, SIGNAL(triggered()), this, SLOT(OnScreenCapture())); connect(ui.actionPoint, SIGNAL(triggered()), this, SLOT(UpdateViewState())); connect(ui.actionWireframe, SIGNAL(triggered()), this, SLOT(UpdateViewState())); connect(ui.actionFace, SIGNAL(triggered()), this, SLOT(UpdateViewState())); connect(ui.actionSmooth, SIGNAL(triggered()), this, SLOT(UpdateViewState())); connect(ui.actionTemplateVisible, SIGNAL(triggered()), this, SLOT(UpdateViewState())); connect(ui.actionPoints_2, SIGNAL(triggered()), this, SLOT(UpdateViewState())); connect(ui.actionWireframe_2, SIGNAL(triggered()), this, SLOT(UpdateViewState())); connect(ui.actionFace_2, SIGNAL(triggered()), this, SLOT(UpdateViewState())); connect(ui.actionSmooth_2, SIGNAL(triggered()), this, SLOT(UpdateViewState())); connect(ui.actionTargetVisible, SIGNAL(triggered()), this, SLOT(UpdateViewState())); connect(ui.actionDecimate, SIGNAL(triggered()), this, SLOT(OnToolsDecimate())); connect(ui.actionRANDOM, SIGNAL(triggered()), this, SLOT(OnToolsSample_Random())); connect(ui.actionQuadricFitting, SIGNAL(triggered()), this, SLOT(OnToolsSample_Quad())); connect(ui.actionDartThrowing, SIGNAL(triggered()), this, SLOT(OnToolsSample_Uniform_Dart())); connect(ui.actionEmbededDeformation, SIGNAL(triggered()), this, SLOT(OnToolsEmbededDeformation())); srand((unsigned)time(NULL)); // 매번 다른 random number 생성을 위해 #ifdef HAO_LI connect(ui.actionInitalize_HaoLi, SIGNAL(triggered()), this, SLOT(OnToolsInitHaoLi())); connect(ui.actionStart_HaoLi, SIGNAL(triggered()), this, SLOT(OnToolsRunHaoLi())); connect(ui.actionGeodesic, SIGNAL(triggered()), this, SLOT(OnToolsGeodesic())); connect(ui.actionInitGeo, SIGNAL(triggered()), this, SLOT(OnInitGeo())); #endif }
BOOL CMainFrame::OnCommand(WPARAM wParam, LPARAM lParam) { // OnCommand responds to menu and and toolbar input UNREFERENCED_PARAMETER(lParam); switch(LOWORD(wParam)) { case IDM_FILE_OPEN: return OnFileOpen(); case IDM_FILE_SAVE: return OnFileSave(); case IDM_FILE_SAVEAS: return OnFileSave(); case IDM_FILE_PRINT: return OnFilePrint(); case IDM_FILE_EXIT: return OnFileExit(); case IDW_VIEW_STATUSBAR: return OnViewStatusBar(); case IDW_VIEW_TOOLBAR: return OnViewToolBar(); case IDM_HELP_ABOUT: return OnHelp(); } return FALSE; }
BOOL CMainFrame::OnCommand(WPARAM wParam, LPARAM lParam) { UNREFERENCED_PARAMETER(lParam); switch (LOWORD(wParam)) { case IDM_FILE_EXIT: return OnFileExit(); case IDM_HELP_ABOUT: return OnHelp(); case IDW_VIEW_STATUSBAR: return OnViewStatusBar(); case IDW_VIEW_TOOLBAR: return OnViewToolBar(); case IDM_VIEW_LARGEICON: return OnViewLargeIcon(); case IDM_VIEW_SMALLICON: return OnViewSmallIcon(); case IDM_VIEW_LIST: return OnViewList(); case IDM_VIEW_REPORT: return OnViewReport(); case IDM_SHOW_HIDDEN: return OnShowHidden(); case IDM_VIEWMENU: return OnViewMenu(); } return FALSE; } // CMainFrame::OnCommand(...)
BOOL CMainFrame::OnCommand(WPARAM wParam, LPARAM lParam) { UNREFERENCED_PARAMETER(lParam); WORD wpLo = LOWORD(wParam); switch(LOWORD(wParam)) { case ID_CHECK_A: m_SdiView.OnCheckA(); return TRUE; case ID_CHECK_B: m_SdiView.OnCheckB(); return TRUE; case ID_CHECK_C: m_SdiView.OnCheckC(); return TRUE; case IDM_FILE_EXIT: OnFileExit(); return TRUE; case IDW_VIEW_STATUSBAR: OnViewStatusBar(); return TRUE; case IDW_VIEW_TOOLBAR: OnViewToolBar(); return TRUE; case IDM_HELP_ABOUT: OnHelp(); return TRUE; case ID_RADIO_A: case ID_RADIO_B: // intentionally blank case ID_RADIO_C: m_SdiView.OnRangeOfIds_Radio(wpLo - ID_RADIO_A); return TRUE; } return FALSE; }
BOOL CMainFrame::OnCommand(WPARAM wParam, LPARAM lParam) { // Process the messages from the (non-ribbon) Menu and Tool Bar UNREFERENCED_PARAMETER(lParam); switch (LOWORD(wParam)) { case IDM_FILE_NEW: OnFileNew(); return TRUE; case IDM_FILE_OPEN: OnFileOpen(); return TRUE; case IDM_FILE_SAVE: OnFileSave(); return TRUE; case IDM_FILE_SAVEAS: OnFileSaveAs(); return TRUE; case IDM_FILE_PRINT: OnFilePrint(); return TRUE; case IDM_FILE_EXIT: OnFileExit(); return TRUE; case IDW_FILE_MRU_FILE1: case IDW_FILE_MRU_FILE2: case IDW_FILE_MRU_FILE3: case IDW_FILE_MRU_FILE4: case IDW_FILE_MRU_FILE5: { UINT uMRUEntry = LOWORD(wParam) - IDW_FILE_MRU_FILE1; MRUFileOpen(uMRUEntry); return TRUE; } case IDM_PEN_RED: SetPenColor(RGB(255, 0, 0)); return TRUE; case IDM_PEN_BLUE: SetPenColor(RGB(0, 0, 255)); return TRUE; case IDM_PEN_GREEN: SetPenColor(RGB(0, 196, 0)); return TRUE; case IDM_PEN_BLACK: SetPenColor(RGB(0, 0, 0)); return TRUE; case IDW_VIEW_STATUSBAR: return OnViewStatusBar(); case IDW_VIEW_TOOLBAR: return OnViewToolBar(); case IDM_HELP_ABOUT: return OnHelp(); } return FALSE; }
BOOL CMainFrame::OnCommand(WPARAM wParam, LPARAM lParam) { // OnCommand responds to menu and and toolbar input UNREFERENCED_PARAMETER(lParam); switch(LOWORD(wParam)) { case IDM_FILE_OPEN: OnFileOpen(); return TRUE; case IDM_FILE_SAVE: OnFileSave(); return TRUE; case IDM_FILE_SAVEAS: OnFileSave(); return TRUE; case IDM_FILE_PRINT: OnFilePrint(); return TRUE; case IDM_FILE_EXIT: OnFileExit(); return TRUE; case IDW_VIEW_STATUSBAR: OnViewStatusBar(); return TRUE; case IDW_VIEW_TOOLBAR: OnViewToolBar(); return TRUE; case IDM_TOOLBAR_CUSTOMIZE: OnTBCustomize(); return TRUE; case IDM_TOOLBAR_DEFAULT: OnTBDefault(); return TRUE; case IDM_TOOLBAR_BIGICONS: OnTBBigIcons(); return TRUE; case IDM_HELP_ABOUT: OnHelp(); return TRUE; } return FALSE; }
STDMETHODIMP CMainFrame::Execute(UINT32 nCmdID, UI_EXECUTIONVERB verb, const PROPERTYKEY* key, const PROPVARIANT* ppropvarValue, IUISimplePropertySet* pCmdExProp) { // This function is called when a ribbon button is pressed. // Refer to IUICommandHandler::Execute in the Windows 7 SDK documentation if (UI_EXECUTIONVERB_EXECUTE == verb) { switch(nCmdID) { case IDC_CMD_NEW: OnFileNew(); break; case IDC_CMD_OPEN: OnFileOpen(); break; case IDC_CMD_SAVE: OnFileSave(); break; case IDC_CMD_SAVE_AS: OnFileSaveAs(); break; case IDC_CMD_PRINT: OnFilePrint(); break; case IDC_CMD_COPY: TRACE("Copy\n"); break; case IDC_CMD_CUT: TRACE("Cut\n"); break; case IDC_CMD_PASTE: TRACE("Paste\n"); break; case IDC_CMD_ABOUT: OnHelp(); break; case IDC_CMD_EXIT: OnFileExit(); break; case IDC_RICHFONT: TRACE("Font dialog\n"); break; case IDC_RIBBONHELP: OnHelp(); break; case IDC_MRULIST: OnMRUList(key, ppropvarValue); break; case IDC_PEN_COLOR: OnPenColor(ppropvarValue, pCmdExProp); break; case IDC_CUSTOMIZE_QAT: TRACE("Customize Quick Access ToolBar\n"); break; default: { CString str; str.Format(_T("Unknown Button %d\n"),nCmdID); TRACE(str); } break; } } return S_OK; }
BOOL CMainFrame::OnCommand(WPARAM wParam, LPARAM lParam) { UNREFERENCED_PARAMETER(lParam); // Process the messages from the Menu and Tool Bar switch (LOWORD(wParam)) { case IDM_FILE_NEW: OnFileNew(); return TRUE; case IDM_FILE_OPEN: OnFileOpen(); return TRUE; case IDM_FILE_SAVE: OnFileSave(); return TRUE; case IDM_FILE_SAVEAS: OnFileSaveAs(); return TRUE; case IDM_FILE_PRINT: OnFilePrint(); return TRUE; case IDM_PEN_RED: OnPenRed(); return TRUE; case IDM_PEN_BLUE: OnPenBlue(); return TRUE; case IDM_PEN_GREEN: OnPenGreen(); return TRUE; case IDM_PEN_BLACK: OnPenBlack(); return TRUE; case IDW_VIEW_STATUSBAR: OnViewStatusBar(); return TRUE; case IDW_VIEW_TOOLBAR: OnViewToolBar(); return TRUE; case IDM_HELP_ABOUT: OnHelp(); return TRUE; case IDM_FILE_EXIT: OnFileExit(); return TRUE; } return FALSE; }
MainWindow::MainWindow() : QMainWindow( 0, "MainWindow", WDestructiveClose ) { QDockWindow * pNMWindow; std::map<QString, ServerCreator>::iterator iterCreator; m_pCentralWidget = new QWorkspace(this, "CENTRALWIDGET"); m_pCentralWidget->setScrollBarsEnabled(true); setIcon(app32x32_xpm); setCentralWidget(m_pCentralWidget); // create menus m_pFileMenu = new QPopupMenu(this, "File Menu"); m_pFileNew = new QAction("&New...", QAccel::stringToKey("Ctrl+N"), this, "file.new"); m_pFileNew->setToolTip("Create a new simulation file, ending the current simulation"); connect(m_pFileNew, SIGNAL(activated()), this, SLOT(OnFileNew())); m_pFileNew->addTo(m_pFileMenu); m_pFileEdit = new QAction("&Edit...", QAccel::stringToKey("Ctrl+E"), this, "file.edit"); m_pFileEdit->setToolTip("Edit the current simulation file, ending the current simulation"); connect(m_pFileEdit, SIGNAL(activated()), this, SLOT(OnFileEdit())); m_pFileEdit->setEnabled(false); m_pFileEdit->addTo(m_pFileMenu); m_pFileOpen = new QAction(QPixmap(fileopen), "&Open...", QAccel::stringToKey("Ctrl+O"), this, "file.open"); m_pFileOpen->setToolTip("Open a simulation file, ending the current simulation"); connect(m_pFileOpen, SIGNAL(activated()), this, SLOT(OnFileOpen())); m_pFileOpen->addTo(m_pFileMenu); m_pFileSave = new QAction(QPixmap(filesave), "&Save As...", QAccel::stringToKey("Ctrl+S"), this, "file.save"); m_pFileSave->setToolTip("Save the current setup to a simulation file (this ends any running simulation)"); connect(m_pFileSave, SIGNAL(activated()), this, SLOT(OnFileSave())); m_pFileSave->setEnabled(false); m_pFileSave->addTo(m_pFileMenu); m_pFileMenu->insertSeparator(); m_pFileConfig = new QAction("&Configure...", QKeySequence(), this, "file.config"); m_pFileConfig->setToolTip("Edit the current configuration"); connect(m_pFileConfig, SIGNAL(activated()), this, SLOT(OnFileConfig())); m_pFileConfig->addTo(m_pFileMenu); m_pFileExit = new QAction("E&xit...", QAccel::stringToKey("Ctrl+Q"), this, "file.exit"); m_pFileExit->setToolTip("Exit the program"); connect(m_pFileExit, SIGNAL(activated()), this, SLOT(OnFileExit())); m_pFileExit->addTo(m_pFileMenu); m_pSimMenu = new QPopupMenu(this, "Sim Menu"); m_pSimRun = new QAction("&Run...", QKeySequence(Qt::Key_F2), this, "sim.run"); m_pSimRun->setToolTip("Start a new simulation"); connect(m_pSimRun, SIGNAL(activated()), this, SLOT(OnSimRun())); m_pSimRun->setEnabled(false); m_pSimRun->addTo(m_pSimMenu); m_pSimPause = new QAction("Pause", QKeySequence(Qt::Key_F3), this, "sim.pause"); m_pSimPause->setToolTip("Pause the currently running simulation"); m_pSimPause->setEnabled(false); connect(m_pSimPause, SIGNAL(activated()), this, SLOT(OnSimPause())); m_pSimPause->addTo(m_pSimMenu); m_pSimSkip = new QAction("Skip to next", QKeySequence(), this, "sim.skip"); m_pSimSkip->setToolTip("Skip to the next Monte Carlo iteration of the simulation"); m_pSimSkip->setEnabled(false); connect(m_pSimSkip, SIGNAL(activated()), this, SLOT(OnSimSkip())); m_pSimSkip->addTo(m_pSimMenu); m_pSimStop = new QAction("&Stop", QKeySequence(Qt::SHIFT | Qt::Key_F2), this, "sim.stop"); m_pSimStop->setToolTip("Stop the currently running simulation"); m_pSimStop->setEnabled(false); connect(m_pSimStop, SIGNAL(activated()), this, SLOT(OnSimStop())); m_pSimStop->addTo(m_pSimMenu); m_pNetMenu = new QPopupMenu(this, "Net Menu"); m_pNetInit = new QAction("&Initialize", QKeySequence(), this, "net.init"); m_pNetInit->setToolTip("Initialize network devices and connections"); m_pNetInit->setEnabled(true); connect(m_pNetInit, SIGNAL(activated()), this, SLOT(OnNetInit())); m_pNetInit->addTo(m_pNetMenu); m_pNetClose = new QAction("&Close", QKeySequence(), this, "net.close"); m_pNetClose->setToolTip("Close network devices and connections"); m_pNetClose->setEnabled(false); connect(m_pNetClose, SIGNAL(activated()), this, SLOT(OnNetClose())); m_pNetClose->addTo(m_pNetMenu); m_pNetServer = new QAction("&Stop Server", QKeySequence(), this, "net.server"); m_pNetServer->setToolTip("Stop GrooveNet server"); connect(m_pNetServer, SIGNAL(activated()), this, SLOT(OnNetServer())); m_pNetServerMenu = new QPopupMenu(this, "startserver"); connect(m_pNetServerMenu, SIGNAL(activated(int)), this, SLOT(OnNetServer(int))); for (iterCreator = g_mapServerCreators.begin(); iterCreator != g_mapServerCreators.end(); ++iterCreator) m_pNetServerMenu->insertItem(iterCreator->first); m_iNetServerMenuID = m_pNetMenu->insertItem("&Start Server", m_pNetServerMenu); m_pWindowMenu = new QPopupMenu(this, "Window Menu"); m_pWindowCascade = new QAction("&Cascade", QKeySequence(), this, "window.cascade"); m_pWindowCascade->setToolTip("Cascade all open windows"); connect(m_pWindowCascade, SIGNAL(activated()), m_pCentralWidget, SLOT(cascade())); m_pWindowCascade->addTo(m_pWindowMenu); m_pWindowTile = new QAction("&Tile", QKeySequence(), this, "window.tile"); m_pWindowTile->setToolTip("Tile all open windows"); connect(m_pWindowTile, SIGNAL(activated()), m_pCentralWidget, SLOT(tile())); m_pWindowTile->addTo(m_pWindowMenu); m_pWindowCloseAll = new QAction("Close &All Windows", QKeySequence(), this, "window.closeall"); m_pWindowCloseAll->setToolTip("Close all open windows"); connect(m_pWindowCloseAll, SIGNAL(activated()), m_pCentralWidget, SLOT(closeAllWindows())); m_pWindowCloseAll->addTo(m_pWindowMenu); menuBar()->insertItem("&File", m_pFileMenu); menuBar()->insertItem("&Simulator", m_pSimMenu); menuBar()->insertItem("&Network", m_pNetMenu); menuBar()->insertItem("&Window", m_pWindowMenu); statusBar()->addWidget(m_pLblStatus = new QLabel("Ready", this, "statusbar.label"), 1); statusBar()->setSizeGripEnabled(true); /* pNMWindow = new QDockWindow(this); pNMWindow->setCaption("Network Manager"); pNMWindow->setHorizontallyStretchable(true); pNMWindow->setVerticallyStretchable(false); pNMWindow->setResizeEnabled(true); pNMWindow->setMovingEnabled(true); pNMWindow->setCloseMode(QDockWindow::Always); m_pNetworkManager = new QNetworkManager(pNMWindow, "network manager"); pNMWindow->setWidget(m_pNetworkManager); addDockWindow(pNMWindow, Qt::DockBottom, true); */ tabsContainer = new QToolBar(this); tabsWidget = new QTabWidget(tabsContainer, "tabs"); tabsWidget->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); tabsWidget->setMargin(8); tabsContainer->setStretchableWidget(tabsWidget); tabsContainer->setLabel(tr("GrooveNet - Tooltabs")); addDockWindow(tabsContainer, Qt::DockBottom, TRUE); m_pNetworkManager = new QNetworkManager(tabsContainer, "network manager"); tabsWidget->addTab(m_pNetworkManager, QString("Network Manager")); m_pMessageList = new QMessageList(tabsContainer, "message list"); tabsWidget->addTab(m_pMessageList, QString("Messages")); setAppropriate(tabsContainer, false); tabsWidget->addTab(NULL, QString("Congestion Info")); tabsWidget->addTab(NULL, QString("Playback")); }