这篇教程C++ updateMenu函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中updateMenu函数的典型用法代码示例。如果您正苦于以下问题:C++ updateMenu函数的具体用法?C++ updateMenu怎么用?C++ updateMenu使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了updateMenu函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: updateMenu void MainMenu::setVisible (bool visible) { if (visible) updateMenu(); OEngine::GUI::Layout::setVisible (visible); }
开发者ID:Chiur,项目名称:openmw,代码行数:7,
示例2: QObjectTrayIcon::TrayIcon(Application *parent) : QObject(parent), m_icon(new QSystemTrayIcon(this)){ QMenu *menu = new QMenu(); menu->addAction(tr("Show Windows"))->setData(QLatin1String("toggleVisibility")); menu->addSeparator(); menu->addAction(tr("New Tab"))->setData(QLatin1String("newTab")); menu->addAction(tr("New Private Tab"))->setData(QLatin1String("newPrivateTab")); menu->addSeparator(); menu->addAction(tr("Bookmarks"))->setData(QLatin1String("bookmarks")); menu->addAction(tr("Transfers"))->setData(QLatin1String("transfers")); menu->addAction(tr("History"))->setData(QLatin1String("history")); menu->addSeparator(); menu->addAction(tr("Exit"))->setData(QLatin1String("exit")); m_icon->setIcon(parent->windowIcon()); m_icon->setContextMenu(menu); m_icon->setToolTip(tr("Otter Browser")); m_icon->show(); setParent(NULL); connect(Application::getInstance(), SIGNAL(aboutToQuit()), this, SLOT(hide())); connect(this, SIGNAL(destroyed()), menu, SLOT(deleteLater())); connect(parent, SIGNAL(destroyed()), this, SLOT(deleteLater())); connect(menu, SIGNAL(triggered(QAction*)), this, SLOT(triggerAction(QAction*))); connect(menu, SIGNAL(aboutToShow()), this, SLOT(updateMenu())); connect(m_icon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(activated(QSystemTrayIcon::ActivationReason)));}
开发者ID:beaumale7952,项目名称:otter,代码行数:29,
示例3: qFatalRecentFiles::RecentFiles( QMenu * menu, QAction * before, int maxfiles, const QString& settingsname ){ if ( maxfiles < 1 ) qFatal( "RecentFiles::RecentFiles: maxfiles (%d) is < 1 ", maxfiles ); m_settingsName = settingsname.isEmpty() ? "recentFileList" : settingsname; m_actions.resize( maxfiles ); // Create the actions for ( int i = 0; i < maxfiles; ++i ) { m_actions[i] = new QAction( this ); m_actions[i]->setVisible(false); connect( m_actions[i], SIGNAL(triggered()), this, SLOT(actionRecent()) ); } // Add them to the menu for ( int i = 0; i < maxfiles; ++i ) menu->insertAction( before, m_actions[i] ); // Add a separator after the last action m_separator = menu->insertSeparator( before ); // Update the actions menu updateMenu();}
开发者ID:martin-steghoefer,项目名称:debian-karlyriceditor,代码行数:26,
示例4: mButtonBoxMainMenu::MainMenu(int w, int h) : OEngine::GUI::Layout("openmw_mainmenu.layout") , mButtonBox(0), mWidth (w), mHeight (h) , mSaveGameDialog(NULL){ updateMenu();}
开发者ID:bwrsandman,项目名称:openmw,代码行数:7,
示例5: updateMenuvoid QgsRendererV2DataDefinedMenus::sizeScaleFieldSelected( QAction* a ){ if ( a == NULL ) return; QString fldName = a->text();#if 0 updateMenu( mSizeAttributeActionGroup, fldName );#endif if ( fldName == tr( "- no field -" ) ) { fldName = QString(); } else if ( fldName.startsWith( tr( "- expression -" ) ) ) { QString expr( fldName ); expr.replace( 0, tr( "- expression -" ).length(), "" ); QgsExpressionBuilderDialog dialog( mLayer, expr ); if ( !dialog.exec() ) return; fldName = dialog.expressionText(); Q_ASSERT( !QgsExpression( fldName ).hasParserError() ); a->setText( tr( "- expression -" ) + fldName ); } emit sizeScaleFieldChanged( fldName );}
开发者ID:cxqttkl,项目名称:QGIS,代码行数:26,
示例6: loadSettingsvoid DolphinRemoteEncoding::slotAboutToShow(){ if (!m_loaded) { loadSettings(); } updateMenu();}
开发者ID:emmanuel099,项目名称:dolphin,代码行数:7,
示例7: switchint ToolBar::qt_metacall(QMetaObject::Call _c, int _id, void **_a){ _id = QToolBar::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: order(); break; case 1: randomize(); break; case 2: addSpinBox(); break; case 3: removeSpinBox(); break; case 4: changeMovable((*reinterpret_cast< bool(*)>(_a[1]))); break; case 5: allowLeft((*reinterpret_cast< bool(*)>(_a[1]))); break; case 6: allowRight((*reinterpret_cast< bool(*)>(_a[1]))); break; case 7: allowTop((*reinterpret_cast< bool(*)>(_a[1]))); break; case 8: allowBottom((*reinterpret_cast< bool(*)>(_a[1]))); break; case 9: placeLeft((*reinterpret_cast< bool(*)>(_a[1]))); break; case 10: placeRight((*reinterpret_cast< bool(*)>(_a[1]))); break; case 11: placeTop((*reinterpret_cast< bool(*)>(_a[1]))); break; case 12: placeBottom((*reinterpret_cast< bool(*)>(_a[1]))); break; case 13: updateMenu(); break; case 14: insertToolBarBreak(); break; default: ; } _id -= 15; } return _id;}
开发者ID:venkatarajasekhar,项目名称:ECE497,代码行数:28,
示例8: qDebugbool MountTray::addDevice(QString dev, QString label, QString type, QString filesys){ if(!dev.startsWith(DEVICEDIR)){ dev.prepend(DEVICEDIR); } //Check if the device is already in the list int tot=0; for(int i=0; i<deviceList.length(); i++){ if( deviceList[i]->device == dev ){ return false; } //already exists, do nothing if( deviceList[i]->getDeviceName().startsWith(label) ){ tot++; } } //See if the label is unique as well, otherwise add a number to the end to make it unique if(tot > 0 && !label.isEmpty()){ label.append("-"+QString::number(tot)); } qDebug() << "Valid Device Connection:" << dev << type << label << filesys; //Create the menu item (will automount if necessary) MenuItem *tmp = new MenuItem(this, DCheck, dev, label, type, filesys); //connect the signals/slots connect(tmp, SIGNAL(itemMounted(QString)), this, SLOT(openMediaDir(QString)) ); connect(tmp, SIGNAL(newMessage(QString,QString)), this, SLOT(slotDisplayPopup(QString,QString)) ); connect(tmp, SIGNAL(itemRemoved(QString)), this, SLOT(removeDevice(QString)) ); connect(tmp, SIGNAL(itemWorking()), this, SLOT(slotCloseMenu()) ); connect(tmp, SIGNAL(openAVDisk(QString)), this, SLOT(slotOpenAVDisk(QString)) ); deviceList << tmp; //Update the menu updateMenu(); return true;}
开发者ID:DJHartley,项目名称:pcbsd,代码行数:26,
示例9: applicationvoid application() { scene = G_sceneMenu; // Primera escena (y la actual) nextScene = scene; // Siguiente escena (siempre empieza siendo igual a la primera) interruptId = 0; // Primera interrupcion // Initialize CPC before starting the game initializeCPC(); // Inicializamos la primera escena initScene(&scene); // Main loop while (1) { // Scene updates switch(scene) { case G_sceneMenu: nextScene = updateMenu(); break; case G_sceneGame: nextScene = updateGame(); break; } // Comprobamos si vamos a cambiar de escena if(scene != nextScene) { // Cambiamos la escena actual y la inicializamos scene = nextScene; initScene(&scene); } }}
开发者ID:Davitsu,项目名称:TopTop,代码行数:31,
示例10: loadRecentFilesvoid RecentFiles::removeRecentFile( const QString& file ){ QStringList files = loadRecentFiles(); files.removeAll( file ); saveRecentFiles( files ); updateMenu();}
开发者ID:martin-steghoefer,项目名称:debian-karlyriceditor,代码行数:8,
示例11: restoreSessionPrefsvoid ChatWindowMenu::onStanzaSessionTerminated(const IStanzaSession &ASession){ if (ASession.streamJid==streamJid() && ASession.contactJid==contactJid()) { restoreSessionPrefs(contactJid()); updateMenu(); }}
开发者ID:ChALkeR,项目名称:vacuum-im,代码行数:8,
示例12: updateMenuvoid MulticrewUI::disconnected( std::string error ) { d->core->stop(); d->connection = 0; updateMenu(); d->statusDlg->setUnconnected(); if( error.length()==0 ) error = "Session terminated"; MessageBox( d->hwnd, error.c_str(), "Multicrew", MB_OK | MB_ICONINFORMATION );}
开发者ID:BackupTheBerlios,项目名称:multicrew-svn,代码行数:8,
示例13: updateMenuvoid TrayIcon::pauseOrResume(){ _isPaused = !_isPaused; updateMenu(); updateToolTip(); updateTrayIcon();}
开发者ID:marek-g,项目名称:Tapeciarnia,代码行数:8,
示例14: QDirvoid ProfileAddDialog::createProfile() { QString folder = QApplication::applicationDirPath() + "/profiles/" + ui->lineEdit->text(); if(!ui->lineEdit->text().isEmpty()) { if(!QDir(folder).exists()) QDir().mkdir(folder); } emit updateMenu();}
开发者ID:carriercomm,项目名称:frostbite,代码行数:8,
示例15: loopMainMenuvoid loopMainMenu(Inputs input, Map *map, Map *menu) { updateMenu(&input, &map); if (isOnMenu() != IS_IN_PRINCIPAL_MENU) clearWindow(); else drawMenu(menu);}
开发者ID:hamtaro75,项目名称:madblocks,代码行数:8,
示例16: WXUNUSEDvoid FractalImagesFrame::OnCloseFractal(wxCommandEvent& WXUNUSED(event)){ int pos = m_tabs->GetSelection(); closeTab(pos); updateMenu();}
开发者ID:svenhertle,项目名称:fractalimages,代码行数:8,
示例17: updateDisplayvoid updateDisplay() { int elapsed = 0; int countdown = 0; elapsed = s_currentTimer/2; countdown = s_selectedDuration - elapsed; if(s_currentTimer%2 == 0) { static char bUp[10]; static char bDown[4]; //static char bDuration[10]; //static char bDuration[5]; //static int elapsed = 0; //static int countdown = 0; //elapsed = s_currentTimer/2; //countdown = s_selectedDuration - elapsed; if(countdown > 0) { //printInt(s_countup, elapsed, bUp); printInt(s_countdown, countdown, bDown); //printInt(s_duration, s_selectedDuration, bDuration); snprintf(bUp, 10, "%d / %d", elapsed, s_selectedDuration); text_layer_set_text(s_countup, bUp); } else { printInt(s_countup, elapsed - s_selectedDuration, bUp); //text_layer_set_text(s_duration, ""); } if(countdown == 10) { vibes_double_pulse(); } else if(countdown == 3) { vibes_long_pulse(); } else if(countdown == 2 || countdown == 1) { vibes_short_pulse(); } else if(countdown == 0) { window_set_background_color(s_window, GColorWhite); vibes_long_pulse(); s_timerActive = false; updateMenu(s_selectedDuration); text_layer_set_text(s_countdown, ""); text_layer_set_text(s_countup, ""); updateSets(); } } if(s_timerActive) { if(countdown <= 10) { window_set_background_color(s_window, GColorRed); } else if (s_currentTimer < s_selectedDuration) { window_set_background_color(s_window, GColorGreen); } else { window_set_background_color(s_window, GColorOrange); if(s_currentTimer == s_selectedDuration) { // halfway point vibes_double_pulse(); } } }}
开发者ID:eviltobz,项目名称:pebble_jim,代码行数:58,
示例18: constructMenuvoid MRU::initialise(){ // Construct the MRU commands and menu structure constructMenu(); // Initialise the most recently used files list loadRecentFiles(); updateMenu();}
开发者ID:codereader,项目名称:DarkRadiant,代码行数:10,
示例19: updateMenuvoid FileHistoryHandler::restoreState(){ filePaths = atools::settings::Settings::instance().valueStrList(settings); // Convert all loaded paths to native for(int i = 0; i < filePaths.size(); i++) filePaths[i] = QDir::toNativeSeparators(filePaths.at(i)); updateMenu();}
开发者ID:albar965,项目名称:atools,代码行数:10,
示例20: FavoritesTVList::TVList(bool check_channels_conf, Services services, QString filename, QWidget * parent) : Favorites(filename,parent){#ifndef Q_OS_WIN if (check_channels_conf) { /* f_list.clear(); */ parse_channels_conf(services); updateMenu(); }#endif}
开发者ID:dradetsky,项目名称:smplayer-mirror,代码行数:11,
示例21: updateMenu void MainMenu::setVisible (bool visible) { if (visible) updateMenu(); else showBackground( MWBase::Environment::get().getWindowManager()->containsMode(MWGui::GM_MainMenu) && MWBase::Environment::get().getStateManager()->getState() == MWBase::StateManager::State_NoGame); OEngine::GUI::Layout::setVisible (visible); }
开发者ID:ViteFalcon,项目名称:openmw,代码行数:11,
示例22: updateMenuvoid Menu::show(sf::Vector2f pos){ updateMenu(); setVisible(true); if (isVerticalFlipped()) setPosition(pos.x, pos.y - getSize().y); else setPosition(pos); acquireFocus();}
开发者ID:RedMser,项目名称:NecroEdit,代码行数:12,
示例23: updateMenuvoid RecentFilesAction::addFile(const QString &fileName){ if (m_recentFilesList.contains(fileName)) m_recentFilesList.move(m_recentFilesList.indexOf(fileName), 0); else { if (m_recentFilesList.count() >= m_numOfRecentFiles) m_recentFilesList.removeLast(); m_recentFilesList.prepend(fileName); } updateMenu();}
开发者ID:amkhlv,项目名称:pdfviewer,代码行数:12,
示例24: logvoid MainState::play () { if(_state == PLAYING && _messages.empty()) { log().warning("Turn"); if(_fight->game_over()) { _state = GAME_OVER; } else if(_fight->tick_fight()) { _state = BOSS_TURN; updateMenu(); openMenu(_mainMenu.get()); } updateHealthBars(); }}
开发者ID:DrWindu,项目名称:lof3,代码行数:13,
示例25: setAvailablevoid LastRecentFileList::remove(int index) { if (_size == 0 || _locked) return; if (index > -1 && index < (int)_lrfl.size()) { ::RemoveMenu(_hMenu, _lrfl.at(index)._id, MF_BYCOMMAND); setAvailable(_lrfl.at(index)._id); _lrfl.erase(_lrfl.begin() + index); --_size; updateMenu(); }};
开发者ID:AndersBillLinden,项目名称:nppcr_npp,代码行数:13,
示例26: findDeviceInListvoid MountTray::removeDevice(QString dev){ if(!dev.startsWith(DEVICEDIR)){ dev.prepend(DEVICEDIR); } //Find the device in the list int index = findDeviceInList(dev); if( index == -1 ){ return; } //does not exist, do nothing //Remove the menu entry from the list deviceList[index]->cleanup(); //make sure it is unmounted with mountpoint removed deviceList.removeAt(index); //Update the menu updateMenu(); qDebug() << "Valid Device Removal:" << dev;}
开发者ID:DJHartley,项目名称:pcbsd,代码行数:13,
示例27: EffectControlsVstEffectControls::VstEffectControls( VstEffect * _eff ) : EffectControls( _eff ), m_effect( _eff ), m_subWindow( NULL ), knobFModel( NULL ), vstKnobs( NULL ), ctrHandle( NULL ), lastPosInMenu (0)// m_presetLabel ( NULL ){ menu = new QMenu; connect( menu, SIGNAL( aboutToShow() ), this, SLOT( updateMenu() ) );}
开发者ID:AHudon,项目名称:SOEN6471_LMMS,代码行数:13,
注:本文中的updateMenu函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ updateModel函数代码示例 C++ updateMask函数代码示例 |