void TagEditor::createActions(){ connect(LoadScriptButton,SIGNAL(clicked()),this,SLOT(loadScript())); connect(SaveScriptButton,SIGNAL(clicked()),this,SLOT(saveScript())); connect(RunScriptButton,SIGNAL(clicked()),this, SLOT(runScript())); QAction* searchOnlineAction = new QAction(tr("Search for selected file/album in online musicdatabases..."), this); searchOnlineAction->setShortcut(tr("Ctrl+S")); connect(searchOnlineAction, SIGNAL(triggered()), this, SLOT(searchOnline())); QAction* searchForFilesAction = new QAction(tr("Search for files to add to workspace..."), this); //searchForFilesAction->setShortcut(tr("Ctrl+S")); connect(searchForFilesAction, SIGNAL(triggered()), this, SLOT(searchAndAddFiles())); TreeView->setContextMenuPolicy(Qt::ActionsContextMenu); TreeView->addAction(searchOnlineAction); TreeView->addAction(searchForFilesAction); connect( TreeView, SIGNAL( expanded( const QModelIndex & ) ), this, SLOT( resizeColumn() ) ); connect( TreeView, SIGNAL( collapsed( const QModelIndex & ) ), this, SLOT( resizeColumn() ) ); //connect( TreeWidget_, SIGNAL( currentRowChanged( int ) ), this, SLOT( showTagInfo(int) ) ); connect( TreeWidget_, SIGNAL( itemSelectionChanged() ), this, SLOT( showTagInfo() ) ); connect( AddButton, SIGNAL( clicked() ), this, SLOT(addFiles() ) ); connect( RemoveButton, SIGNAL( clicked() ), this, SLOT(removeFiles() ) ); connect( ClearButton, SIGNAL( clicked() ), this, SLOT(removeAllFiles() ) ); connect( SaveButton, SIGNAL( clicked() ), this, SLOT(saveTag() ) ); connect( ChooseDirButton, SIGNAL( clicked() ), this, SLOT(chooseDir() ) ); connect( actionSettings, SIGNAL( triggered() ), this, SLOT( showSettings() ) ); connect( actionRewriteTag, SIGNAL( triggered() ), this, SLOT( rewriteTag() ) ); connect( actionRenameFiles, SIGNAL( triggered() ), this, SLOT( renameFiles() ) ); connect( actionReplaceTags, SIGNAL( triggered() ), this, SLOT( replaceTags() ) ); connect( actionSerialize, SIGNAL( triggered() ), this, SLOT( serialize() ) ); connect( actionClearTags, SIGNAL( triggered() ), this, SLOT( clearTags() ) ); //connect( actionRemoveFrames, SIGNAL( triggered() ), this, SLOT( removeFrames() ) ); //styles QSignalMapper *styleMapper = new QSignalMapper(this); QStringList styles = QStyleFactory::keys(); for(int i=0;i<styles.size();i++){ QAction *a = new QAction(styles[i],menuStyle); a->setCheckable(true); connect(a, SIGNAL(triggered()), styleMapper, SLOT(map())); styleMapper->setMapping(a, styles[i]); menuStyle->addAction(a); } menuStyle->addSeparator(); QAction *actionCustomStyleSheet = new QAction("Custom...",menuStyle); actionCustomStyleSheet->setCheckable(true); connect(actionCustomStyleSheet, SIGNAL(triggered()), this, SLOT(openStyleSheet())); menuStyle->addAction( actionCustomStyleSheet ); connect(styleMapper, SIGNAL(mapped(const QString &)), this, SLOT(setGUIStyle(const QString &))); }
void WebTab::startSearch() { if (SCUT_SEARCH_PAGE == m_search_type) searchPage(); else searchOnline(); }