void MainWindow::createActions(){ actionOpen = new QAction(tr("&Open Mesh" ), this); actionOpenShader = new QAction(tr("Open Shade&r" ), this); actionSave_as = new QAction(tr("&Save As ..." ), this); actionClose = new QAction(tr("Close &Mesh" ), this); actionAbout = new QAction(tr("About Me" ), this); actionAbout_QT = new QAction(tr("About QT" ), this); actionAbout_Tucano = new QAction(tr("About Tucano" ), this); actionQuit = new QAction(tr("E&xit" ), this); actionViewReset = new QAction(tr("Reset view" ), this); actionOpen->setShortcut(tr("Ctrl+O")); actionOpenShader->setShortcut(tr("Ctrl+R")); actionQuit->setShortcut(tr("Ctrl+X")); actionSave_as->setShortcut(tr("Ctrl+S")); actionClose->setShortcut(tr("Ctrl+M")); actionAbout->setShortcut(tr("Ctrl+Shift+A")); actionAbout_QT->setShortcut(tr("Ctrl+Shift+B")); actionAbout_Tucano->setShortcut(tr("Ctrl+Shift+C")); connect(actionOpen, SIGNAL(triggered()), this, SLOT(OpenFile()) ); connect(actionOpenShader, SIGNAL(triggered()), this, SLOT(OpenFileShader()) ); connect(actionSave_as, SIGNAL(triggered()), this, SLOT(SaveAs()) ); connect(actionClose, SIGNAL(triggered()), this, SLOT(CloseFile()) ); connect(actionQuit, SIGNAL(triggered()), this, SLOT(QuitApp()) ); connect(actionAbout, SIGNAL(triggered()), this, SLOT(AboutMe()) ); connect(actionAbout_QT, SIGNAL(triggered()), this, SLOT(AboutQT()) ); connect(actionAbout_Tucano, SIGNAL(triggered()), this, SLOT(AboutTucano()) ); connect(actionViewReset, SIGNAL(triggered()), this, SLOT(ViewReset()) ); }
CSolidView::CSolidView() { ViewReset(); m_size = Point(0, 0); m_refresh_wanted = false; }
/*************************************************************************** Name: ViewLogicalFile Desc: This routine displays a single logical file and allows the user to press menu keys while displaying the information. *****************************************************************************/ void ViewLogicalFile( FLMUINT lfNum ) { FLMUINT Option; VIEW_INFO SaveView; FLMUINT Done = 0; FLMUINT Repaint = 1; FLMBYTE LFH[ LFH_SIZE]; BLK_EXP BlkExp2; FLMUINT BlkAddress2 = 0; /* Loop getting commands until the hit the exit key */ ViewReset( &SaveView); while ((!Done) && (!gv_bViewPoppingStack)) { if (Repaint) { if (!ViewSetupLogicalFileMenu( lfNum, LFH)) Done = 1; } if (!Done) { Repaint = 1; Option = ViewGetMenuOption(); switch( Option) { case ESCAPE_OPTION: Done = 1; break; case SEARCH_OPTION: { VIEW_MENU_ITEM_p vp = gv_pViewMenuCurrItem; /* Determine which logical file, if any we are pointing at */ while ((vp != NULL) && (vp->iLabelIndex != LBL_LOGICAL_FILE_NAME)) vp = vp->PrevItem; if (vp != NULL) { while ((vp != NULL) && (vp->iLabelIndex != LBL_LOGICAL_FILE_NUMBER)) vp = vp->NextItem; } if (vp != NULL) { gv_uiViewSearchLfNum = (FLMUINT)vp->Value; if (ViewGetKey()) gv_bViewPoppingStack = TRUE; } else ViewShowError( "Position cursor to a logical file before searching"); } break; default: if ((Option & LFH_OPTION_ROOT_BLOCK) || (Option & LFH_OPTION_LAST_BLOCK)) { if (Option & LFH_OPTION_ROOT_BLOCK) { BlkExp2.Level = 0xFF; BlkExp2.Type = 0xFF; BlkAddress2 = FB2UD( &LFH [LFH_ROOT_BLK_OFFSET]); BlkExp2.NextAddr = BlkExp2.PrevAddr = 0xFFFFFFFF; } else { flmAssert( 0); } BlkExp2.LfNum = FB2UW( &LFH [LFH_LF_NUMBER_OFFSET]); ViewBlocks( BlkAddress2, BlkAddress2, &BlkExp2); } else if (Option & LOGICAL_FILE_OPTION) ViewLogicalFile( (FLMUINT)(Option & (~(LOGICAL_FILE_OPTION)))); else Repaint = 0; break; } } } ViewRestore( &SaveView); }