void Plugin::initPlugin (QObject *obj) { AzothProxy_ = qobject_cast<IProxyObject*> (obj); OtrHandler_ = new OtrHandler (CoreProxy_, AzothProxy_); FPManager_ = new FPManager (OtrHandler_->GetUserState (), AzothProxy_); connect (FPManager_, SIGNAL (fingerprintsChanged ()), OtrHandler_, SLOT (writeFingerprints ())); XSD_->SetDataSource ("KnownFPs", FPManager_->GetModel ()); PKManager_ = new PrivKeyManager (OtrHandler_->GetUserState (), AzothProxy_); connect (PKManager_, SIGNAL (keysChanged ()), OtrHandler_, SLOT (writeKeys ())); connect (PKManager_, SIGNAL (keysGenerationRequested (QString, QString)), OtrHandler_, SLOT (generateKeys (QString, QString))); connect (OtrHandler_, SIGNAL (privKeysChanged ()), PKManager_, SLOT (reloadAll ())); XSD_->SetDataSource ("PrivKeys", PKManager_->GetModel ()); }
//============================================================================== ResourceEditorPanel::ResourceEditorPanel (JucerDocument& doc) : document (doc), addButton ("Add new resource..."), reloadAllButton ("Reload all resources"), delButton ("Delete selected resources") { addAndMakeVisible (addButton); addButton.onClick = [this] { document.getResources().browseForResource ("Select a file to add as a resource", "*", {}, {}); }; addAndMakeVisible (reloadAllButton); reloadAllButton.onClick = [this] { reloadAll(); }; addAndMakeVisible (delButton); delButton.setEnabled (false); delButton.onClick = [this] { document.getResources().remove (listBox->getSelectedRow (0)); }; listBox.reset (new TableListBox (String(), this)); addAndMakeVisible (listBox.get()); listBox->getHeader().addColumn ("name", 1, 150, 80, 400); listBox->getHeader().addColumn ("original file", 2, 350, 80, 800); listBox->getHeader().addColumn ("size", 3, 100, 40, 150); listBox->getHeader().addColumn ("reload", 4, 100, 100, 100, TableHeaderComponent::notResizableOrSortable); listBox->getHeader().setStretchToFitActive (true); listBox->setOutlineThickness (1); listBox->updateContent(); document.addChangeListener (this); handleCommandMessage (1); lookAndFeelChanged(); }
void Display::isHidden(bool hidden) { isHidden_ = hidden; if (hidden) { extern void clearScreenCertain(int x, int y, int start_y); clearScreenCertain(size_x_, size_y_, offset_y_); } else { reloadAll(); } }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), disableRefreshFilters(false), ui(new Ui::MainWindow), currentFile(0) { this->ui->setupUi(this); connect(this->ui->actOpen, SIGNAL(activated()), this, SLOT(openDir())); connect(this->ui->butFilterAll, SIGNAL(clicked()), this, SLOT(checkAll())); connect(this->ui->butRefresh, SIGNAL(clicked()), this, SLOT(reloadAll())); this->currentDir.setSorting(QDir::Name); this->ui->tblLog->setWordWrap(false); this->ui->tblLog->setModel(&this->model); this->ui->tblLog->setItemDelegate(new TableLogItemDelegate(this)); this->ui->tblLog->horizontalHeader()->setResizeMode(QHeaderView::Interactive); this->ui->tblLog->horizontalHeader()->resizeSection(0, 140); this->ui->tblLog->horizontalHeader()->resizeSection(1, 50); this->ui->tblLog->horizontalHeader()->resizeSection(2, 140); this->ui->tblLog->horizontalHeader()->resizeSection(3, 50); this->ui->tblLog->horizontalHeader()->resizeSection(4, 180); this->ui->tblLog->horizontalHeader()->resizeSection(5, 1200); this->ui->tblLog->verticalHeader()->setResizeMode(QHeaderView::Fixed); this->ui->tblLog->verticalHeader()->setDefaultSectionSize(17); this->ui->tblLog->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel); this->severities = new TooglableList(this); this->modules = new TooglableList(this); this->threads = new TooglableList(this); connect(this->severities, SIGNAL(stateChanged()), this, SLOT(filtersChange())); connect(this->modules, SIGNAL(stateChanged()), this, SLOT(filtersChange())); connect(this->threads, SIGNAL(stateChanged()), this, SLOT(filtersChange())); this->ui->laySeverity->addWidget(this->severities); this->ui->layModule->addWidget(this->modules); this->ui->layThread->addWidget(this->threads); this->lblStatus = new QLabel(this->ui->statusBar); this->ui->statusBar->addWidget(this->lblStatus); connect(this->ui->butPause, SIGNAL(toggled(bool)), this, SLOT(setWatchingPause(bool))); this->setWatchingPause(false); }
void KateMainWindow::setupActions() { KAction *a; actionCollection()->addAction( KStandardAction::New, "file_new", m_viewManager, SLOT(slotDocumentNew()) ) ->setWhatsThis(i18n("Create a new document")); actionCollection()->addAction( KStandardAction::Open, "file_open", m_viewManager, SLOT(slotDocumentOpen()) ) ->setWhatsThis(i18n("Open an existing document for editing")); fileOpenRecent = KStandardAction::openRecent (m_viewManager, SLOT(openUrl(KUrl)), this); actionCollection()->addAction(fileOpenRecent->objectName(), fileOpenRecent); fileOpenRecent->setWhatsThis(i18n("This lists files which you have opened recently, and allows you to easily open them again.")); a = actionCollection()->addAction( "file_save_all" ); a->setIcon( KIcon("document-save-all") ); a->setText( i18n("Save A&ll") ); a->setShortcut( QKeySequence(Qt::CTRL + Qt::Key_L) ); connect( a, SIGNAL(triggered()), KateDocManager::self(), SLOT(saveAll()) ); a->setWhatsThis(i18n("Save all open, modified documents to disk.")); a = actionCollection()->addAction( "file_reload_all" ); a->setText( i18n("&Reload All") ); connect( a, SIGNAL(triggered()), KateDocManager::self(), SLOT(reloadAll()) ); a->setWhatsThis(i18n("Reload all open documents.")); a = actionCollection()->addAction( "file_close_orphaned" ); a->setText( i18n("Close Orphaned") ); connect( a, SIGNAL(triggered()), KateDocManager::self(), SLOT(closeOrphaned()) ); a->setWhatsThis(i18n("Close all documents in the file list that could not be reopened, because they are not accessible anymore.")); actionCollection()->addAction( KStandardAction::Close, "file_close", m_viewManager, SLOT(slotDocumentClose()) ) ->setWhatsThis(i18n("Close the current document.")); a = actionCollection()->addAction( "file_close_other" ); a->setText( i18n( "Close Other" ) ); connect( a, SIGNAL(triggered()), this, SLOT(slotDocumentCloseOther()) ); a->setWhatsThis(i18n("Close other open documents.")); a = actionCollection()->addAction( "file_close_all" ); a->setText( i18n( "Clos&e All" ) ); connect( a, SIGNAL(triggered()), this, SLOT(slotDocumentCloseAll()) ); a->setWhatsThis(i18n("Close all open documents.")); a = actionCollection()->addAction( KStandardAction::Quit, "file_quit" ); // Qt::QueuedConnection: delay real shutdown, as we are inside menu action handling (bug #185708) connect( a, SIGNAL(triggered()), this, SLOT(slotFileQuit()), Qt::QueuedConnection ); a->setWhatsThis(i18n("Close this window")); a = actionCollection()->addAction( "view_new_view" ); a->setIcon( KIcon("window-new") ); a->setText( i18n("&New Window") ); connect( a, SIGNAL(triggered()), this, SLOT(newWindow()) ); a->setWhatsThis(i18n("Create a new Kate view (a new window with the same document list).")); KToggleAction* showFullScreenAction = KStandardAction::fullScreen( 0, 0, this, this); actionCollection()->addAction( showFullScreenAction->objectName(), showFullScreenAction ); connect( showFullScreenAction, SIGNAL(toggled(bool)), this, SLOT(slotFullScreen(bool))); documentOpenWith = new KActionMenu(i18n("Open W&ith"), this); actionCollection()->addAction("file_open_with", documentOpenWith); documentOpenWith->setWhatsThis(i18n("Open the current document using another application registered for its file type, or an application of your choice.")); connect(documentOpenWith->menu(), SIGNAL(aboutToShow()), this, SLOT(mSlotFixOpenWithMenu())); connect(documentOpenWith->menu(), SIGNAL(triggered(QAction*)), this, SLOT(slotOpenWithMenuAction(QAction*))); a = KStandardAction::keyBindings(this, SLOT(editKeys()), actionCollection()); a->setWhatsThis(i18n("Configure the application's keyboard shortcut assignments.")); a = KStandardAction::configureToolbars(this, SLOT(slotEditToolbars()), actionCollection()); a->setWhatsThis(i18n("Configure which items should appear in the toolbar(s).")); QAction* settingsConfigure = KStandardAction::preferences(this, SLOT(slotConfigure()), actionCollection()); settingsConfigure->setWhatsThis(i18n("Configure various aspects of this application and the editing component.")); // tip of the day :-) actionCollection()->addAction( KStandardAction::TipofDay, this, SLOT(tipOfTheDay()) ) ->setWhatsThis(i18n("This shows useful tips on the use of this application.")); if (KatePluginManager::self()->pluginList().count() > 0) { a = actionCollection()->addAction( "help_plugins_contents" ); a->setText( i18n("&Plugins Handbook") ); connect( a, SIGNAL(triggered()), this, SLOT(pluginHelp()) ); a->setWhatsThis(i18n("This shows help files for various available plugins.")); } a = actionCollection()->addAction( "help_about_editor" ); a->setText( i18n("&About Editor Component") ); connect( a, SIGNAL(triggered()), this, SLOT(aboutEditor()) ); connect(m_viewManager, SIGNAL(viewChanged()), m_mainWindow, SIGNAL(viewChanged())); connect(m_viewManager, SIGNAL(viewCreated(KTextEditor::View*)), m_mainWindow, SIGNAL(viewCreated(KTextEditor::View*))); connect(m_viewManager, SIGNAL(viewChanged()), this, SLOT(slotWindowActivated())); connect(m_viewManager, SIGNAL(viewChanged()), this, SLOT(slotUpdateOpenWith())); connect(m_viewManager, SIGNAL(viewChanged()), this, SLOT(slotUpdateBottomViewBar())); connect(m_viewManager, SIGNAL(viewChanged()), this, SLOT(slotUpdateTopViewBar())); slotWindowActivated (); // session actions a = actionCollection()->addAction( "sessions_new" ); a->setIcon( KIcon("document-new") ); a->setText( i18nc("Menu entry Session->New", "&New") ); // Qt::QueuedConnection to avoid deletion of code that is executed when reducing the amount of mainwindows. (bug #227008) connect( a, SIGNAL(triggered()), KateSessionManager::self(), SLOT(sessionNew()), Qt::QueuedConnection ); a = actionCollection()->addAction( "sessions_open" ); a->setIcon( KIcon("document-open") ); a->setText( i18n("&Open Session") ); // Qt::QueuedConnection to avoid deletion of code that is executed when reducing the amount of mainwindows. (bug #227008) connect( a, SIGNAL(triggered()), KateSessionManager::self(), SLOT(sessionOpen()), Qt::QueuedConnection ); a = actionCollection()->addAction( "sessions_save" ); a->setIcon( KIcon("document-save") ); a->setText( i18n("&Save Session") ); connect( a, SIGNAL(triggered()), KateSessionManager::self(), SLOT(sessionSave()) ); a = actionCollection()->addAction( "sessions_save_as" ); a->setIcon( KIcon("document-save-as") ); a->setText( i18n("Save Session &As...") ); connect( a, SIGNAL(triggered()), KateSessionManager::self(), SLOT(sessionSaveAs()) ); a = actionCollection()->addAction( "sessions_manage" ); a->setIcon( KIcon("view-choose") ); a->setText( i18n("&Manage Sessions...") ); // Qt::QueuedConnection to avoid deletion of code that is executed when reducing the amount of mainwindows. (bug #227008) connect( a, SIGNAL(triggered()), KateSessionManager::self(), SLOT(sessionManage()), Qt::QueuedConnection ); // quick open menu ;) a = new KateSessionsAction (i18n("&Quick Open Session"), this); actionCollection()->addAction("sessions_list", a); }
void CirclesDialog::updateDisplay(bool /*complete*/) { reloadAll(); }
Void PlaYUVerApp::createActions() { m_arrayActions.resize( TOTAL_ACT ); // ------------ File ------------ m_arrayActions[OPEN_ACT] = new QAction( QIcon( ":/images/open.png" ), tr( "&Open" ), this ); m_arrayActions[OPEN_ACT]->setIcon( style()->standardIcon( QStyle::SP_DialogOpenButton ) ); m_arrayActions[OPEN_ACT]->setShortcuts( QKeySequence::Open ); m_arrayActions[OPEN_ACT]->setStatusTip( tr( "Open stream" ) ); connect( m_arrayActions[OPEN_ACT], SIGNAL( triggered() ), this, SLOT( open() ) ); m_arrayRecentFilesActions.resize( MAX_RECENT_FILES ); for( Int i = 0; i < MAX_RECENT_FILES; i++ ) { m_arrayRecentFilesActions[i] = new QAction( this ); m_arrayRecentFilesActions[i]->setVisible( false ); connect( m_arrayRecentFilesActions[i], SIGNAL( triggered() ), this, SLOT( openRecent() ) ); } m_arrayActions[SAVE_ACT] = new QAction( QIcon( ":/images/save.png" ), tr( "&Save Frame" ), this ); m_arrayActions[SAVE_ACT]->setIcon( style()->standardIcon( QStyle::SP_DialogSaveButton ) ); m_arrayActions[SAVE_ACT]->setShortcuts( QKeySequence::SaveAs ); m_arrayActions[SAVE_ACT]->setStatusTip( tr( "Save current frame" ) ); connect( m_arrayActions[SAVE_ACT], SIGNAL( triggered() ), this, SLOT( save() ) ); m_arrayActions[FORMAT_ACT] = new QAction( tr( "&Format" ), this ); m_arrayActions[FORMAT_ACT]->setIcon( QIcon::fromTheme( "transform-scale", QIcon( ":/images/configuredialog.png" ) ) ); m_arrayActions[FORMAT_ACT]->setShortcut( Qt::CTRL + Qt::Key_F ); m_arrayActions[FORMAT_ACT]->setStatusTip( tr( "Open format dialog" ) ); connect( m_arrayActions[FORMAT_ACT], SIGNAL( triggered() ), this, SLOT( format() ) ); m_arrayActions[RELOAD_ACT] = new QAction( tr( "&Reload" ), this ); m_arrayActions[RELOAD_ACT]->setIcon( style()->standardIcon( QStyle::SP_BrowserReload ) ); m_arrayActions[RELOAD_ACT]->setShortcut( Qt::CTRL + Qt::Key_R ); m_arrayActions[RELOAD_ACT]->setShortcut( Qt::Key_F5 ); m_arrayActions[RELOAD_ACT]->setStatusTip( tr( "Reload current sequence" ) ); connect( m_arrayActions[RELOAD_ACT], SIGNAL( triggered() ), this, SLOT( reload() ) ); m_arrayActions[RELOAD_ALL_ACT] = new QAction( tr( "Reload All" ), this ); m_arrayActions[RELOAD_ALL_ACT]->setShortcut( Qt::CTRL + Qt::SHIFT + Qt::Key_R ); m_arrayActions[RELOAD_ALL_ACT]->setStatusTip( tr( "Reload all sequences" ) ); connect( m_arrayActions[RELOAD_ALL_ACT], SIGNAL( triggered() ), this, SLOT( reloadAll() ) ); m_arrayActions[LOAD_ALL_ACT] = new QAction( tr( "Preload" ), this ); m_arrayActions[LOAD_ALL_ACT]->setStatusTip( tr( "Load sequence into memory (caution)" ) ); connect( m_arrayActions[LOAD_ALL_ACT], SIGNAL( triggered() ), this, SLOT( loadAll() ) ); m_arrayActions[CLOSE_ACT] = new QAction( tr( "&Close" ), this ); m_arrayActions[CLOSE_ACT]->setIcon( style()->standardIcon( QStyle::SP_DialogCloseButton ) ); m_arrayActions[CLOSE_ACT]->setStatusTip( tr( "Close the active window" ) ); connect( m_arrayActions[CLOSE_ACT], SIGNAL( triggered() ), m_pcWindowHandle, SLOT( removeActiveSubWindow() ) ); m_arrayActions[CLOSEALL_ACT] = new QAction( tr( "Close &All" ), this ); m_arrayActions[CLOSEALL_ACT]->setStatusTip( tr( "Close all the windows" ) ); connect( m_arrayActions[CLOSEALL_ACT], SIGNAL( triggered() ), m_pcWindowHandle, SLOT( removeAllSubWindow() ) ); m_arrayActions[EXIT_ACT] = new QAction( tr( "E&xit" ), this ); m_arrayActions[EXIT_ACT]->setShortcuts( QKeySequence::Quit ); m_arrayActions[EXIT_ACT]->setStatusTip( tr( "Exit the application" ) ); connect( m_arrayActions[EXIT_ACT], SIGNAL( triggered() ), qApp, SLOT( closeAllWindows() ) ); // ------------ View ------------ mapperZoom = new QSignalMapper( this ); connect( mapperZoom, SIGNAL( mapped(int) ), this, SLOT( scaleFrame(int) ) ); m_arrayActions[ZOOM_IN_ACT] = new QAction( tr( "Zoom &In (+25%)" ), this ); m_arrayActions[ZOOM_IN_ACT]->setIcon( QIcon::fromTheme( "zoom-in", QIcon( ":/images/zoomin.png" ) ) ); m_arrayActions[ZOOM_IN_ACT]->setShortcut( tr( "Ctrl++" ) ); m_arrayActions[ZOOM_IN_ACT]->setStatusTip( tr( "Scale the image up by 25%" ) ); connect( m_arrayActions[ZOOM_IN_ACT], SIGNAL( triggered() ), mapperZoom, SLOT( map() ) ); mapperZoom->setMapping( m_arrayActions[ZOOM_IN_ACT], 125 ); m_arrayActions[ZOOM_OUT_ACT] = new QAction( tr( "Zoom &Out (-25%)" ), this ); m_arrayActions[ZOOM_OUT_ACT]->setIcon( QIcon::fromTheme( "zoom-out", QIcon( ":/images/zoomout.png" ) ) ); m_arrayActions[ZOOM_OUT_ACT]->setShortcut( tr( "Ctrl+-" ) ); m_arrayActions[ZOOM_OUT_ACT]->setStatusTip( tr( "Scale the image down by 25%" ) ); connect( m_arrayActions[ZOOM_OUT_ACT], SIGNAL( triggered() ), mapperZoom, SLOT( map() ) ); mapperZoom->setMapping( m_arrayActions[ZOOM_OUT_ACT], 80 ); m_arrayActions[ZOOM_NORMAL_ACT] = new QAction( tr( "&Normal Size" ), this ); m_arrayActions[ZOOM_NORMAL_ACT]->setIcon( QIcon::fromTheme( "zoom-original", QIcon( ":/images/zoomtonormal.png" ) ) ); m_arrayActions[ZOOM_NORMAL_ACT]->setShortcut( tr( "Ctrl+N" ) ); m_arrayActions[ZOOM_NORMAL_ACT]->setStatusTip( tr( "Show the image at its original size" ) ); connect( m_arrayActions[ZOOM_NORMAL_ACT], SIGNAL( triggered() ), this, SLOT( normalSize() ) ); m_arrayActions[ZOOM_FIT_ACT] = new QAction( tr( "Zoom to &Fit" ), this ); m_arrayActions[ZOOM_FIT_ACT]->setIcon( QIcon::fromTheme( "zoom-fit-best", QIcon( ":/images/fittowindow.png" ) ) ); m_arrayActions[ZOOM_FIT_ACT]->setStatusTip( tr( "Zoom in or out to fit on the window." ) ); connect( m_arrayActions[ZOOM_FIT_ACT], SIGNAL( triggered() ), this, SLOT( zoomToFit() ) ); m_arrayActions[ZOOM_FIT_ALL_ACT] = new QAction( tr( "Zoom to Fit All" ), this ); //m_arrayActions[ZOOM_FIT_ALL_ACT]->setIcon( QIcon::fromTheme( "zoom-fit-best", QIcon( ":/images/fittowindow.png" ) ) ); m_arrayActions[ZOOM_FIT_ALL_ACT]->setStatusTip( tr( "Apply zoom to fit to all windows" ) ); connect( m_arrayActions[ZOOM_FIT_ALL_ACT], SIGNAL( triggered() ), this, SLOT( zoomToFitAll() ) ); m_appModuleVideo->createActions(); m_appModuleQuality->createActions(); m_appModuleExtensions->createActions(); m_pcWindowHandle->createActions(); // ------------ About ------------ #ifdef USE_FERVOR m_arrayActions[UPDATE_ACT] = new QAction( tr( "&Update" ), this ); m_arrayActions[UPDATE_ACT]->setStatusTip( tr( "Check for updates" ) ); connect( m_arrayActions[UPDATE_ACT], SIGNAL( triggered() ), FvUpdater::sharedUpdater(), SLOT( CheckForUpdatesNotSilent() ) ); #endif m_arrayActions[ABOUT_ACT] = new QAction( tr( "&About" ), this ); m_arrayActions[ABOUT_ACT]->setStatusTip( tr( "Show the application's About box" ) ); connect( m_arrayActions[ABOUT_ACT], SIGNAL( triggered() ), this, SLOT( about() ) ); m_arrayActions[ABOUTQT_ACT] = new QAction( tr( "About &Qt" ), this ); m_arrayActions[ABOUTQT_ACT]->setIcon( QIcon( ":images/qt.png" ) ); m_arrayActions[ABOUTQT_ACT]->setStatusTip( tr( "Show the Qt library's About box" ) ); connect( m_arrayActions[ABOUTQT_ACT], SIGNAL( triggered() ), qApp, SLOT( aboutQt() ) ); }