int qtbook_cd::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QMainWindow::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: slotGo(); break; case 1: slotPrint(); break; case 2: slotQuery(); break; case 3: slotReset(); break; case 4: slotCancel(); break; case 5: slotShowUsers(); break; case 6: slotSaveTracks(); break; case 7: slotDeleteTrack(); break; case 8: slotInsertTrack(); break; case 9: slotSelectImage(); break; case 10: slotComputeRuntime(); break; case 11: slotCloseTracksBrowser(); break; case 12: slotPopulateCopiesEditor(); break; case 13: slotPopulateTracksBrowser(); break; default: ; } _id -= 14; } return _id; }
DatabaseManager::DatabaseManager(){ //In conjunction with Q_DECLARE_METATYPE(), this helps Qt work with these objects. qRegisterMetaType<ErrorProcess>(); qRegisterMetaType<QueryProcess>(); qRegisterMetaType<TableProcess>(); qRegisterMetaType<DatabaseMySQL>(); qRegisterMetaType<DatabaseSQLite>(); qRegisterMetaType<QSqlQuery>(); connect(this, SIGNAL(signalAddConnection(QString, DatabaseMySQL, ErrorProcess)), this, SLOT(slotAddConnection(QString, DatabaseMySQL, ErrorProcess))); connect(this, SIGNAL(signalAddConnection(QString, DatabaseSQLite, ErrorProcess)), this, SLOT(slotAddConnection(QString, DatabaseSQLite, ErrorProcess))); connect(this, SIGNAL(signalRemoveConnection(QString)), this, SLOT(slotRemoveConnection(QString))); connect(this, SIGNAL(signalQuery(QString, QString, QueryProcess)), this, SLOT(slotQuery(QString, QString, QueryProcess))); connect(this, SIGNAL(signalTables(QString,TableProcess,ErrorProcess)), this, SLOT(slotTables(QString,TableProcess,ErrorProcess))); }
int qtbook_videogame::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QMainWindow::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: slotGo(); break; case 1: slotPrint(); break; case 2: slotQuery(); break; case 3: slotReset(); break; case 4: slotCancel(); break; case 5: slotShowUsers(); break; case 6: slotSelectImage(); break; case 7: slotPopulateCopiesEditor(); break; default: ; } _id -= 8; } return _id; }
dlgJabberChatRoomsList::dlgJabberChatRoomsList(JabberAccount* account, const QString& server, const QString &nick, QWidget *parent, const char *name) : dlgChatRoomsList(parent, name), m_account(account) , m_selectedRow(-1) , m_nick(nick) { if (!server.isNull()) leServer->setText(server); else if(m_account->isConnected()) leServer->setText(m_account->server()); m_chatServer = leServer->text(); // locales setCaption(i18n("List Chatrooms")); tblChatRoomsList->setLeftMargin (0); tblChatRoomsList->setColumnStretchable(0, true); tblChatRoomsList->setColumnStretchable(1, true); if (!server.isNull()) slotQuery(); }
int qtbook::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QMainWindow::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: slotResizeColumns(); break; case 1: slotDisplaySummary(); break; case 2: slotExit(); break; case 3: slotAbout(); break; case 4: slotAllGo(); break; case 5: slotQuery(); break; case 6: slotReset(); break; case 7: slotDelete(); break; case 8: slotModify(); break; case 9: slotSearch(); break; case 10: slotRefresh(); break; case 11: slotRequest(); break; case 12: slotAddAdmin(); break; case 13: slotCheckout(); break; case 14: slotCDSearch(); break; case 15: slotInsertCD(); break; case 16: slotNextPage(); break; case 17: slotSaveUser(); break; case 18: slotSetFonts(); break; case 19: slotShowGrid(); break; case 20: slotShowMenu(); break; case 21: slotShowNext(); break; case 22: slotShowPrev(); break; case 23: slotConnectDB(); break; case 24: slotCopyError(); break; case 25: slotDVDSearch(); break; case 26: slotDuplicate(); break; case 27: slotInsertMag(); break; case 28: slotInsertDVD(); break; case 29: slotMagSearch(); break; case 30: slotPrintView(); break; case 31: slotBookSearch(); break; case 32: slotChangeView((*reinterpret_cast< bool(*)>(_a[1]))); break; case 33: slotDisconnect(); break; case 34: slotInsertBook(); break; case 35: slotSaveConfig(); break; case 36: slotSetColumns(); break; case 37: slotAddBorrower(); break; case 38: slotDeleteAdmin(); break; case 39: slotExportAsCSV(); break; case 40: slotJournSearch(); break; case 41: slotPageClicked((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 42: slotViewDetails(); break; case 43: slotReserveCopy(); break; case 44: slotShowColumns(); break; case 45: slotShowHistory(); break; case 46: slotInsertJourn(); break; case 47: slotPreviousPage(); break; case 48: slotRemoveMember(); break; case 49: slotSavePassword(); break; case 50: slotCancelAddUser(); break; case 51: slotBranchChanged(); break; case 52: slotPrintReserved(); break; case 53: slotResetErrorLog(); break; case 54: slotModifyBorrower(); break; case 55: slotSectionResized((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< int(*)>(_a[2])),(*reinterpret_cast< int(*)>(_a[3]))); break; case 56: slotAutoPopOnFilter(); break; case 57: slotClearSqliteMenu((*reinterpret_cast< bool(*)>(_a[1]))); break; case 58: slotGrantPrivileges(); break; case 59: slotInsertVideoGame(); break; case 60: slotShowAdminDialog(); break; case 61: slotShowCustomQuery(); break; case 62: slotShowErrorDialog(); break; case 63: slotVideoGameSearch(); break; case 64: slotListOverdueItems(); break; case 65: slotRefreshAdminList(); break; case 66: slotResetLoginDialog(); break; case 67: slotShowConnectionDB(); break; case 68: slotListReservedItems(); break; case 69: slotExecuteCustomQuery(); break; case 70: slotSaveAdministrators(); break; case 71: slotSelectDatabaseFile(); break; case 72: slotShowChangePassword(); break; case 73: slotShowDbEnumerations(); break; case 74: slotShowMembersBrowser(); break; case 75: slotSqliteFileSelected((*reinterpret_cast< bool(*)>(_a[1]))); break; case 76: slotCloseMembersBrowser(); break; case 77: slotAdminCheckBoxClicked((*reinterpret_cast< int(*)>(_a[1]))); break; case 78: slotSceneSelectionChanged(); break; case 79: slotCloseCustomQueryDialog(); break; case 80: slotDisplayNewSqliteDialog(); break; case 81: slotPopulateMembersBrowser(); break; case 82: slotResizeColumnsAfterSort(); break; case 83: slotUpdateIndicesAfterSort((*reinterpret_cast< int(*)>(_a[1]))); break; case 84: slotPrintReservationHistory(); break; default: ; } _id -= 85; } return _id; }
/** * Handles the "Cscope->Call Tree..." menu command. * Displays a tree of functions calling the requested function. */ void KScope::slotCallTree() { slotQuery(SymbolDlg::CallTree, true); }
/** * Handles the "Cscope->Find Including Files..." menu command. * Prompts the user for a file name, and initiates a query to find all files * having an '#include' directive to that file. */ void KScope::slotQueryIncluding() { slotQuery(SymbolDlg::Including, true); }
/** * Handles the "Cscope->Find File..." menu command. * Prompts the user for a file name, and initiates a query to find all files * having that name. */ void KScope::slotQueryFile() { slotQuery(SymbolDlg::FileName, true); }
/** * Handles the "Cscope->Find EGrep Pattern..." menu command. * Prompts the user for a regular expression, and initiates a query to find * all strings matching that pattern. */ void KScope::slotQueryPattern() { slotQuery(SymbolDlg::Pattern, true); }
/** * Handles the "Cscope->Find Text..." menu command. * Prompts the user for a string, and initiates a query to find all occurances * of that string. */ void KScope::slotQueryText() { slotQuery(SymbolDlg::Text, true); }
/** * Handles the "Cscope->Calling Functions..." menu command. * Prompts the user for a function name, and initiates a query to find all * functions calling that function. */ void KScope::slotQueryCalling() { slotQuery(SymbolDlg::Calling, true); }
/** * Handles the "Cscope->Called Functions..." menu command. * Prompts the user for a function name, and initiates a query to find all * function calls from that function. */ void KScope::slotQueryCalled() { slotQuery(SymbolDlg::Called, true); }
/** * Handles the "Cscope->Definition..." menu command. * Prompts the user for a symbol name, and initiates a query to find the * global definition of that symbol. */ void KScope::slotQueryDefinition() { slotQuery(SymbolDlg::Definition, true); }
/** * Handles the "Cscope->References..." menu command. * Prompts the user for a symbol name, and initiates a query to find all * references to that symbol. */ void KScope::slotQueryReference() { slotQuery(SymbolDlg::Reference, true); }
QDlgResult::QDlgResult( QString strTabName, QWidget* parent, Qt::WindowFlags flags ) : QDialog(parent, flags) { this->strTabName = strTabName ; modelQuery = new QSqlQueryModel ; tabView = new QTableView; tabView->setModel( modelQuery ); tabView->setSelectionMode(QAbstractItemView::SingleSelection); tabView->setSelectionBehavior(QAbstractItemView::SelectRows); tabView->verticalHeader()->setVisible(false); tabView->setEditTriggers( QAbstractItemView::NoEditTriggers ); tabView->horizontalHeader()->setStretchLastSection( true ); //最后一列占满可视空间 buttonInsert = new QPushButton(tr("增加&A")); //设置功能按钮 buttonDelete = new QPushButton(tr("删除&D")); buttonUpdate = new QPushButton(tr("保存&S")); buttonClose = new QPushButton(tr("关闭&C")); buttonSaveXls = new QPushButton(tr("另存XLS")); connect(buttonInsert, SIGNAL(clicked()), this, SLOT(insertRow())); connect(buttonDelete, SIGNAL(clicked()), this, SLOT(deleteRow())); connect(buttonUpdate, SIGNAL(clicked()), this, SLOT(updateRow())); connect(buttonClose, SIGNAL(clicked()), this, SLOT(close())); connect(buttonSaveXls, SIGNAL(clicked()), this, SLOT( slotSaveXls( ))); lblStart = new QLabel(tr("开始时间:")) ; lblEnd = new QLabel(tr("结束时间:")) ; edtStart = new QLineEdit ; edtEnd = new QLineEdit ; buttonQuery = new QPushButton(tr("查询")); connect(buttonQuery, SIGNAL(clicked()), this, SLOT(slotQuery())); QDateTime dtToday = QDateTime::currentDateTime( ); QDate d = dtToday.date() ; QString strTime1, strTime2 ; strTime1.sprintf( "%04d-%02d-%02d 00:00:00", d.year(),d.month(),d.day() ); strTime2.sprintf( "%04d-%02d-%02d 23:59:59", d.year(),d.month(),d.day() ); edtStart->setText( strTime1 ); edtEnd->setText( strTime2 ); QHBoxLayout *queryLayout = new QHBoxLayout; queryLayout->addWidget( lblStart ); queryLayout->addWidget( edtStart ); queryLayout->addWidget( lblEnd ); queryLayout->addWidget( edtEnd ); queryLayout->addWidget( buttonQuery ); QHBoxLayout *bottomLayout = new QHBoxLayout; bottomLayout->addStretch( ); // bottomLayout -> addWidget(buttonInsert); // bottomLayout -> addWidget(buttonDelete); // bottomLayout -> addWidget(buttonUpdate); bottomLayout -> addWidget(buttonSaveXls); bottomLayout -> addWidget(buttonClose); QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout -> addLayout( queryLayout ); mainLayout -> addWidget( tabView ); mainLayout -> addLayout( bottomLayout ); setLayout( mainLayout ); resize(1200,600); slotQuery( ); setWindowTitle(tr("流速测量结果")); }
void ndManager::setupActions() { //File Menu QMenu *fileMenu = menuBar()->addMenu(tr("&File")); mNewAction = fileMenu->addAction(tr("&New...")); mNewAction->setIcon(QPixmap(":/shared-icons/document-new")); mNewAction->setShortcut(QKeySequence::New); connect(mNewAction, SIGNAL(triggered()), this, SLOT(slotNewFile())); mOpenAction = fileMenu->addAction(tr("&Open...")); mOpenAction->setIcon(QPixmap(":/shared-icons/document-open")); mOpenAction->setShortcut(QKeySequence::Open); connect(mOpenAction, SIGNAL(triggered()), this, SLOT(slotFileOpen())); mFileOpenRecent = new QRecentFileAction(this); QSettings settings; mFileOpenRecent->setRecentFiles(settings.value(QLatin1String("Recent Files"),QStringList()).toStringList()); fileMenu->addAction(mFileOpenRecent); connect(mFileOpenRecent, SIGNAL(recentFileSelected(QString)), this, SLOT(slotFileOpenRecent(QString))); connect(mFileOpenRecent, SIGNAL(recentFileListChanged()), this, SLOT(slotSaveRecentFiles())); mUseTemplateAction = fileMenu->addAction(tr("Use &Template...")); connect(mUseTemplateAction, SIGNAL(triggered()), this, SLOT(slotImport())); fileMenu->addSeparator(); mSaveAction = fileMenu->addAction(tr("Save...")); mSaveAction->setIcon(QPixmap(":/shared-icons/document-save")); mSaveAction->setShortcut(QKeySequence::Save); connect(mSaveAction, SIGNAL(triggered()), this, SLOT(slotSave())); mSaveAsAction = fileMenu->addAction(tr("&Save As...")); mSaveAsAction->setIcon(QPixmap(":/shared-icons/document-save-as")); mSaveAsAction->setShortcut(QKeySequence::SaveAs); connect(mSaveAsAction, SIGNAL(triggered()), this, SLOT(slotSaveAs())); mSaveAsDefaultAction = fileMenu->addAction(tr("Save as &Default")); connect(mSaveAsDefaultAction, SIGNAL(triggered()), this, SLOT(slotSaveDefault())); mReloadAction = fileMenu->addAction(tr("&Reload")); mReloadAction->setShortcut(Qt::Key_F5); connect(mReloadAction, SIGNAL(triggered()), this, SLOT(slotReload())); fileMenu->addSeparator(); mCloseAction = fileMenu->addAction(tr("Close")); mCloseAction->setIcon(QPixmap(":/shared-icons/document-close")); mCloseAction->setShortcut(QKeySequence::Close); connect(mCloseAction, SIGNAL(triggered()), this, SLOT(slotFileClose())); fileMenu->addSeparator(); mQuitAction = fileMenu->addAction(tr("Quit")); mQuitAction->setIcon(QPixmap(":/shared-icons/window-close")); mQuitAction->setShortcut(QKeySequence::Quit); connect(mQuitAction, SIGNAL(triggered()), this, SLOT(close())); QMenu *actionMenu = menuBar()->addMenu(tr("&Actions")); mQueryAction = actionMenu->addAction(tr("&Query")); #ifndef Q_OS_UNIX mQueryAction->setEnabled(false); #endif connect(mQueryAction, SIGNAL(triggered()), this, SLOT(slotQuery())); //mProcessingManager = actionMenu->addAction(tr("Show Processing Manager")); QMenu *settingsMenu = menuBar()->addMenu(tr("&Settings")); //Settings mExpertMode = settingsMenu->addAction(tr("&Expert Mode")); mExpertMode->setCheckable(true); connect(mExpertMode, SIGNAL(triggered(bool)), this, SLOT(slotExpertMode())); settingsMenu->addSeparator(); settings.beginGroup("General"); if ( settings.contains("expertMode")) mExpertMode->setChecked(settings.value("expertMode").toBool()); else mExpertMode->setChecked(true); settings.endGroup(); viewMainToolBar = settingsMenu->addAction(tr("Show Main Toolbar")); viewMainToolBar->setCheckable(true); viewMainToolBar->setChecked(true); connect(viewMainToolBar,SIGNAL(triggered()), this,SLOT(slotViewMainToolBar())); viewStatusBar = settingsMenu->addAction(tr("Show StatusBar")); viewStatusBar->setCheckable(true); connect(viewStatusBar,SIGNAL(triggered()), this,SLOT(slotViewStatusBar())); viewStatusBar->setChecked(true); QMenu *helpMenu = menuBar()->addMenu(tr("Help")); QAction *handbook = helpMenu->addAction(tr("Handbook")); handbook->setShortcut(Qt::Key_F1); connect(handbook,SIGNAL(triggered()), this,SLOT(slotHanbook())); QAction *about = helpMenu->addAction(tr("About")); connect(about,SIGNAL(triggered()), this,SLOT(slotAbout())); mMainToolBar->addAction(mNewAction); mMainToolBar->addAction(mOpenAction); mMainToolBar->addAction(mSaveAction); resize(800,600); }