MeshSubWindow::MeshSubWindow(void) { m_pMeshViewer = new MeshViewer; m_pMeshViewer->setAttribute(Qt::WA_OpaquePaintEvent); m_pMeshViewer->setAttribute(Qt::WA_NoSystemBackground);//与上面连用,avoid transparent window backgrounds setCentralWidget(m_pMeshViewer); setWindowTitle("Mesh Viewer"); surfacedata = NULL; createActions(); createMenus(); createContextMenus(); createStatusBar(); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { createActions(); createMenus(); createToolBars(); createContextMenus(); mdiArea = new QMdiArea; setCentralWidget(mdiArea); resize(640,480); XSliceInterval = 1; /*operate the database*/ CdbTrace = new CtrlDB; }
MeshSubWindow::MeshSubWindow(void) { m_pMeshViewer = new MeshViewer; m_pMeshViewer->setAttribute(Qt::WA_OpaquePaintEvent); m_pMeshViewer->setAttribute(Qt::WA_NoSystemBackground); setCentralWidget(m_pMeshViewer); setWindowTitle("Mesh Viewer"); surfacedata = NULL; createActions(); createMenus(); createContextMenus(); createStatusBar(); setCurrentFile(""); connect(m_pMeshViewer, SIGNAL(position_changed()), this, SLOT(updateStatusBar())); //connect(m_pMeshViewer,SIGNAL(CSurfaceData_changed(CSurfaceData*)),this,SLOT(emit_changed_surfacedata(CSurfaceData*))); }
void BinManager::initStandardBins() { createCombinedMenu(); createContextMenus(); //DebugDialog::debug("init bin manager"); QList<BinLocation *> actualLocations; findAllBins(actualLocations); hackLocalContrib(actualLocations); restoreStateAndGeometry(actualLocations); foreach (BinLocation * location, actualLocations) { PartsBinPaletteWidget* bin = newBin(); bin->load(location->path, m_mainWindow->fileProgressDialog(), true); m_stackTabWidget->addTab(bin, bin->icon(), bin->title()); m_stackTabWidget->stackTabBar()->setTabToolTip(m_stackTabWidget->count() - 1, bin->title()); registerBin(bin); delete location; }