void KHelpMain::createToolbar() { QPixmap pixmap; QString pmpath; KToolBar *tb = new KToolBar( this ); pixmap = kapp->getIconLoader()->loadIcon( "back.xpm" ); tb->insertButton(pixmap, 0, SIGNAL( clicked() ), helpwin, SLOT( slotBack() ), FALSE, klocale->translate("Previous Document")); pixmap = kapp->getIconLoader()->loadIcon( "forward.xpm" ); tb->insertButton(pixmap, 1, SIGNAL( clicked() ), helpwin, SLOT( slotForward() ), FALSE, klocale->translate("Next Document")); tb->insertSeparator(); pixmap = kapp->getIconLoader()->loadIcon( "prev.xpm" ); tb->insertButton(pixmap, 2, SIGNAL( clicked() ), helpwin, SLOT( slotPrev() ), FALSE, klocale->translate("Previous Node")); pixmap = kapp->getIconLoader()->loadIcon( "next.xpm" ); tb->insertButton(pixmap, 3, SIGNAL( clicked() ), helpwin, SLOT( slotNext() ), FALSE, klocale->translate("Next Node")); pixmap = kapp->getIconLoader()->loadIcon( "up.xpm" ); tb->insertButton(pixmap, 4, SIGNAL( clicked() ), helpwin, SLOT( slotUp() ), FALSE,klocale->translate( "Up one Node")); pixmap = kapp->getIconLoader()->loadIcon( "top.xpm" ); tb->insertButton(pixmap, 5, SIGNAL( clicked() ), helpwin, SLOT( slotTop() ), FALSE, klocale->translate("Top Node")); tb->insertSeparator(); pixmap = kapp->getIconLoader()->loadIcon( "contents.xpm" ); tb->insertButton(pixmap, 6, SIGNAL( clicked() ), helpwin, SLOT( slotDir() ), FALSE, klocale->translate("Help Contents")); pixmap = kapp->getIconLoader()->loadIcon( "reload.xpm" ); tb->insertButton(pixmap, 7, SIGNAL( clicked() ), helpwin, SLOT( slotReload() ), TRUE, klocale->translate( "Reload current document" ) ); pixmap = kapp->getIconLoader()->loadIcon( "stop.xpm" ); tb->insertButton(pixmap, 8, SIGNAL( clicked() ), helpwin, SLOT( slotStopProcessing() ), FALSE, klocale->translate("Stop")); tb->setBarPos( KToolBar::Top ); toolbar = tb; }
void ImageWindow::setupConnections() { setupStandardConnections(); connect(this, SIGNAL(loadCurrentLater()), this, SLOT(slotLoadCurrent()), Qt::QueuedConnection); // To toggle properly keyboards shortcuts from comments & tags side bar tab. connect(d->rightSideBar, SIGNAL(signalNextItem()), this, SLOT(slotForward())); connect(d->rightSideBar, SIGNAL(signalPrevItem()), this, SLOT(slotBackward())); connect(d->rightSideBar->getFiltersHistoryTab(), SIGNAL(actionTriggered(const ImageInfo&)), this, SLOT(openImage(const ImageInfo&))); connect(this, SIGNAL(signalSelectionChanged( const QRect&)), d->rightSideBar, SLOT(slotImageSelectionChanged( const QRect&))); connect(this, SIGNAL(signalNoCurrentItem()), d->rightSideBar, SLOT(slotNoCurrentItem())); ImageAttributesWatch* watch = ImageAttributesWatch::instance(); connect(watch, SIGNAL(signalFileMetadataChanged(const KUrl&)), this, SLOT(slotFileMetadataChanged(const KUrl&))); /*connect(DatabaseAccess::databaseWatch(), SIGNAL(collectionImageChange(const CollectionImageChangeset&)), this, SLOT(slotCollectionImageChange(const CollectionImageChangeset&)), Qt::QueuedConnection);*/ connect(ThemeEngine::instance(), SIGNAL(signalThemeChanged()), this, SLOT(slotThemeChanged())); /*connect(d->imageFilterModel, SIGNAL(rowsAboutToBeRemoved(const QModelIndex&, int, int)), this, SLOT(slotRowsAboutToBeRemoved(const QModelIndex&, int, int)));*/ connect(d->thumbBar, SIGNAL(currentChanged(const ImageInfo&)), this, SLOT(slotThumbBarImageSelected(const ImageInfo&))); connect(d->dragDropHandler, SIGNAL(imageInfosDropped(const QList<ImageInfo>&)), this, SLOT(slotDroppedOnThumbbar(const QList<ImageInfo>&))); connect(d->thumbBarDock, SIGNAL(dockLocationChanged(Qt::DockWidgetArea)), d->thumbBar, SLOT(slotDockLocationChanged(Qt::DockWidgetArea))); connect(AlbumSettings::instance(), SIGNAL(setupChanged()), this, SLOT(slotSetupChanged())); }
void MainWnd::keyPressEvent( QKeyEvent * event ) { switch( event->key() ) { case Qt::Key_W: slotForward(); break; case Qt::Key_S: slotBackward(); break; case Qt::Key_A: slotLeft(); break; case Qt::Key_D: slotRight(); break; } }
int WebBrowser::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: slotGo(); break; case 1: slotFinished((*reinterpret_cast< bool(*)>(_a[1]))); break; case 2: slotForward(); break; case 3: slotBack(); break; case 4: slotReload(); break; case 5: clickFindAnswer(); break; case 6: clickHyperlink((*reinterpret_cast< const QUrl(*)>(_a[1]))); break; default: ; } _id -= 7; } return _id; }
dlgMyBrowser::dlgMyBrowser(int *sock, int ident, QWidget *parent, const char *manual) { if(opt.arg_debug) printf("dlgMyBrowser:dlgMyBrowser()\n"); s = sock; id = ident; mainWindow = (MainWindow *) parent; form = new Ui_MyBrowser; form->setupUi(this); #ifdef USE_WEBKIT QObject::connect(form->pushButtonBack,SIGNAL(clicked()) ,this, SLOT(slotBack())); QObject::connect(form->pushButtonHome,SIGNAL(clicked()) ,this, SLOT(slotHome())); QObject::connect(form->pushButtonForward,SIGNAL(clicked()) ,this, SLOT(slotForward())); QObject::connect(form->pushButtonReload,SIGNAL(clicked()) ,this, SLOT(slotReload())); QObject::connect(form->pushButtonFind,SIGNAL(clicked()) ,this, SLOT(slotFind())); QObject::connect(form->lineEditPattern,SIGNAL(returnPressed()) ,this, SLOT(slotFind())); QObject::connect(form->browser,SIGNAL(urlChanged(const QUrl &)) ,this, SLOT(slotUrlChanged(const QUrl &))); QObject::connect(form->browser,SIGNAL(linkClicked(const QUrl &)) ,this, SLOT(slotLinkClicked(const QUrl &))); QObject::connect(form->browser,SIGNAL(titleChanged(const QString &)) ,this, SLOT(slotTitleChanged(const QString &))); QObject::connect(form->browser,SIGNAL(loadFinished(bool)) ,this, SLOT(slotLoadFinished(bool))); //QWebPage *page = form->browser->page(); //QObject::connect(page,SIGNAL(unsupportedContent(QNetworkReply *)),this, SLOT(slotUnsupportedContent(QNetworkReply *))); //enabling plugins leads to problems //see: https://bugs.webkit.org/show_bug.cgi?id=56552 that we have reported if(opt.enable_webkit_plugins) { if(opt.arg_debug) printf("enable_webkit_plugins\n"); form->browser->settings()->setAttribute(QWebSettings::PluginsEnabled, true); form->browser->settings()->setAttribute(QWebSettings::JavascriptEnabled, true); } else { if(opt.arg_debug) printf("do not enable_webkit_plugins\n"); form->browser->settings()->setAttribute(QWebSettings::PluginsEnabled, false); form->browser->settings()->setAttribute(QWebSettings::JavascriptEnabled, false); } #endif if(manual == NULL) return; }
/* BUTTONS SLOTS */ void PlayerEngine::slotPlay(/*bool random, const QTableWidgetItem* item*/) { puts("slotPlay()"); if(!curSong) { slotForward(0,0, true); } else { // error: STATUS_PLAYING here after songover switch(player_status) { case STATUS_PAUSED: slotStartPlayback(); break; case STATUS_STOPPED: // => we assume that LQ is stopped at the track you want to play next case STATUS_SONGOVER: // => this seams buggy to me... setStatus(STATUS_SONGLOADED); break; default: exit_illegal_state("slotPlay()"); } //songTimer.start(); //setStatus(STATUS_SONGLOADED); } }
void KHelpMain::createMenu() { KStdAccel stdAccel; fileMenu = new QPopupMenu; CHECK_PTR( fileMenu ); fileMenu->insertItem( klocale->translate("&New Help Window"), this, SLOT( slotCloneWindow() ), stdAccel.openNew() ); fileMenu->insertSeparator(); fileMenu->insertItem( klocale->translate("&Open File..."), helpwin, SLOT(slotOpenFile()), stdAccel.open() ); // fileMenu->insertItem( klocale->translate("Open UR&L..."), helpwin, // SLOT(slotOpenURL()) ); fileMenu->insertItem( klocale->translate("&Reload"), helpwin, SLOT(slotReload()) ); fileMenu->insertSeparator(); fileMenu->insertItem( klocale->translate("&Search"), helpwin, SLOT(slotSearch()) ); fileMenu->insertSeparator(); fileMenu->insertItem( klocale->translate("&Print..."), helpwin, SLOT(slotPrint()), stdAccel.print() ); fileMenu->insertSeparator(); idClose = fileMenu->insertItem(klocale->translate("&Close"),this, SLOT(slotClose()), stdAccel.close()); // CC :!!!!! fileMenu->insertItem( klocale->translate("&Quit"), this, SLOT(slotQuit()), stdAccel.quit() ); editMenu = new QPopupMenu; CHECK_PTR( editMenu ); idCopy = editMenu->insertItem(klocale->translate("&Copy"), helpwin, SLOT(slotCopy()), stdAccel.copy() ); editMenu->insertItem(klocale->translate("&Find..."), helpwin, SLOT(slotFind()), stdAccel.find() ); editMenu->insertItem(klocale->translate("Find &next"), helpwin, SLOT(slotFindNext()), Key_F3 ); gotoMenu = new QPopupMenu; CHECK_PTR( gotoMenu ); idBack = gotoMenu->insertItem( klocale->translate("&Back"), helpwin, SLOT(slotBack()) ); idForward = gotoMenu->insertItem( klocale->translate("&Forward"), helpwin, SLOT(slotForward()) ); gotoMenu->insertSeparator(); idDir = gotoMenu->insertItem( klocale->translate("&Contents"), helpwin, SLOT(slotDir()) ); idTop = gotoMenu->insertItem( klocale->translate("&Top"), helpwin, SLOT(slotTop()) ); idUp = gotoMenu->insertItem( klocale->translate("&Up"), helpwin, SLOT(slotUp()) ); idPrev = gotoMenu->insertItem( klocale->translate("&Previous"), helpwin, SLOT(slotPrev()) ); idNext = gotoMenu->insertItem( klocale->translate("&Next"), helpwin, SLOT(slotNext()) ); bookmarkMenu = new QPopupMenu; CHECK_PTR( bookmarkMenu ); connect( bookmarkMenu, SIGNAL( activated( int ) ), helpwin, SLOT( slotBookmarkSelected( int ) ) ); connect( bookmarkMenu, SIGNAL( highlighted( int ) ), helpwin, SLOT( slotBookmarkHighlighted( int ) ) ); optionsMenu = new QPopupMenu; CHECK_PTR( optionsMenu ); optionsMenu->setCheckable( true ); optionsMenu->insertItem( klocale->translate("&General Preferences..."), this, SLOT(slotOptionsGeneral()) ); optionsMenu->insertSeparator(); optionsMenu->insertItem(klocale->translate( "Show &Toolbar"), this, SLOT(slotOptionsToolbar())); optionsMenu->insertItem( klocale->translate("Show &Location"), this, SLOT(slotOptionsLocation()) ); optionsMenu->insertItem( klocale->translate("Show Status&bar"), this, SLOT(slotOptionsStatusbar()) ); optionsMenu->insertSeparator(); optionsMenu->insertItem( klocale->translate("&Save Options"), this, SLOT(slotOptionsSave()) ); QString at = klocale->translate("KDE Help System\n"); at+= klocale->translate("Version "); at+= KDEHELP_VERSION; at+=klocale->translate("\n\nCopyright (c) 1997 Martin Jones <*****@*****.**>"\ "\n\nThis program is licensed under the GNU General Public License (GPL)."\ "\nKDEHelp comes with ABSOLUTELY NO WARRANY to the extent permitted by applicable law."); QPopupMenu *helpMenu = kapp->getHelpMenu( true, at ); /* QPopupMenu *helpMenu = new QPopupMenu; CHECK_PTR( helpMenu ); helpMenu->insertItem( klocale->translate("&Using KDE Help"), this, SLOT(slotUsingHelp()) ); helpMenu->insertSeparator(); helpMenu->insertItem( klocale->translate("&About"), this, SLOT(slotAbout()) ); */ menu = new KMenuBar( this ); CHECK_PTR( menu ); menu->insertItem( klocale->translate("&File"), fileMenu ); menu->insertItem( klocale->translate("&Edit"), editMenu ); menu->insertItem( klocale->translate("&Goto"), gotoMenu ); menu->insertItem( klocale->translate("&Bookmarks"), bookmarkMenu ); menu->insertItem( klocale->translate("&Options"), optionsMenu ); menu->insertSeparator(); menu->insertItem( klocale->translate("&Help"), helpMenu ); }
Thesaurus::Thesaurus() { m_standAlone = false; m_thesProc = new KProcess; m_wnProc = new KProcess; m_dialog = new KDialog(0); m_dialog->setButtons(KDialog::Help | KDialog::Ok | KDialog::Cancel); m_dialog->setDefaultButton(KDialog::Ok); m_dialog->setHelp(QString(), "thesaurus"); m_dialog->resize(600, 400); KConfigGroup cfg = KGlobal::config()->group(""); m_dataFile = cfg.readEntry("datafile"); if (m_dataFile.isEmpty()) m_dataFile = KGlobal::dirs()->findResource("data", "koffice/thesaurus/thesaurus.txt"); setCaption(); m_noMatch = i18n("(No match)"); m_historyPos = 1; QWidget *page = new QWidget(); m_dialog->setMainWidget(page); QVBoxLayout *topLayout = new QVBoxLayout(page); topLayout->setMargin(KDialog::marginHint()); topLayout->setSpacing(KDialog::spacingHint()); QHBoxLayout *row1 = new QHBoxLayout; topLayout->addLayout(row1); m_edit = new KHistoryComboBox(page); QLabel editLabel(i18n("&Search for:"), page); editLabel.setBuddy(m_edit); m_search = new KPushButton(i18n("S&earch"), page); connect(m_search, SIGNAL(clicked()), this, SLOT(slotFindTerm())); row1->addWidget(&editLabel, 0); row1->addWidget(m_edit, 1); row1->addWidget(m_search, 0); m_back = new QToolButton(page); m_back->setIcon(KIcon(QString::fromLatin1("go-previous"))); m_back->setToolTip(i18nc("@action:button Go back to the previous word in history", "Back")); row1->addWidget(m_back, 0); m_forward = new QToolButton(page); m_forward->setIcon(KIcon(QString::fromLatin1("go-next"))); m_forward->setToolTip(i18nc("@action:button Go forward to the next word in history", "Forward")); row1->addWidget(m_forward, 0); KPushButton *lang = new KPushButton(i18n("Change Language..."), page); connect(lang, SIGNAL(clicked()), this, SLOT(slotChangeLanguage())); row1->addWidget(lang, 0); connect(m_back, SIGNAL(clicked()), this, SLOT(slotBack())); connect(m_forward, SIGNAL(clicked()), this, SLOT(slotForward())); m_tabWidget = new KTabWidget(page); topLayout->addWidget(m_tabWidget); // // Thesaurus Tab // QWidget *thesWidget = new QWidget(m_tabWidget); m_tabWidget->addTab(thesWidget, i18n("&Thesaurus")); QHBoxLayout *thesLayout = new QHBoxLayout; thesLayout->setSpacing(KDialog::spacingHint()); thesWidget->setLayout(thesLayout); QGroupBox *synGroupBox = new QGroupBox(i18n("Synonyms"), thesWidget); QHBoxLayout *synLayout = new QHBoxLayout(); synGroupBox->setLayout(synLayout); m_synListWidget = new QListWidget(synGroupBox); synLayout->addWidget(m_synListWidget); thesLayout->addWidget(synGroupBox); QGroupBox *hyperGroupBox = new QGroupBox(i18n("More General Words"), thesWidget); QHBoxLayout *hyperLayout = new QHBoxLayout(); hyperGroupBox->setLayout(hyperLayout); m_hyperListWidget = new QListWidget(hyperGroupBox); hyperLayout->addWidget(m_hyperListWidget); thesLayout->addWidget(hyperGroupBox); QGroupBox *hypoGroupBox = new QGroupBox(i18n("More Specific Words"), thesWidget); QHBoxLayout *hypoLayout = new QHBoxLayout(); hypoGroupBox->setLayout(hypoLayout); m_hypoListWidget = new QListWidget(hypoGroupBox); hypoLayout->addWidget(m_hypoListWidget); thesLayout->addWidget(hypoGroupBox); // single click -- keep display unambiguous by removing other selections: connect(m_synListWidget, SIGNAL(itemClicked(QListWidgetItem *)), this, SLOT(slotSetReplaceTermSyn(QListWidgetItem *))); connect(m_hyperListWidget, SIGNAL(itemClicked(QListWidgetItem *)), this, SLOT(slotSetReplaceTermHyper(QListWidgetItem *))); connect(m_hypoListWidget, SIGNAL(itemClicked(QListWidgetItem *)), this, SLOT(slotSetReplaceTermHypo(QListWidgetItem *))); // double click -- set the double clicked item as the new search term connect(m_synListWidget, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(slotFindTermFromList(QListWidgetItem *))); connect(m_hyperListWidget, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(slotFindTermFromList(QListWidgetItem *))); connect(m_hypoListWidget, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(slotFindTermFromList(QListWidgetItem *))); // // WordNet Tab // QWidget *wnWidget = new QWidget(m_tabWidget); m_tabWidget->addTab(wnWidget, i18n("&Wordnet")); QVBoxLayout *wnLayout = new QVBoxLayout; wnLayout->setSpacing(KDialog::spacingHint()); wnLayout->setMargin(KDialog::marginHint()); wnWidget->setLayout(wnLayout); m_wnComboBox = new KComboBox(wnWidget); m_wnComboBox->setEditable(false); wnLayout->addWidget(m_wnComboBox); connect(m_wnComboBox, SIGNAL(activated(int)), this, SLOT(slotFindTerm())); m_resultTextBrowser = new KTextBrowser(wnWidget); m_resultTextBrowser->setReadOnly(true); connect(m_resultTextBrowser, SIGNAL(anchorClicked(const QUrl &)), this, SLOT(slotFindTermFromUrl(const QUrl &))); wnLayout->addWidget(m_resultTextBrowser); // Connect for the history box m_edit->setTrapReturnKey(true); // Do not use Return as default key... connect(m_edit, SIGNAL(returnPressed()), this, SLOT(slotFindTerm())); connect(m_edit, SIGNAL(activated(int)), this, SLOT(slotGotoHistory(int))); QHBoxLayout *row2 = new QHBoxLayout( /*m_top_layout*/ ); topLayout->addLayout(row2); m_replaceLineEdit = new KLineEdit(page); m_replaceLabel = new QLabel(i18n("&Replace with:"), page); m_replaceLabel->setBuddy(m_replaceLineEdit); row2->addWidget(m_replaceLabel, 0); row2->addWidget(m_replaceLineEdit, 1); // Set focus m_edit->setFocus(); updateNavButtons(); connect(m_dialog, SIGNAL(accepted()), this, SLOT(process())); connect(m_dialog, SIGNAL(rejected()), this, SLOT(dialogClosed())); }
MainWnd::MainWnd( QWidget * parent ) : QMainWindow( parent ) { ui.setupUi( this ); connect( this, SIGNAL(sigLog(const QString &)), this, SLOT(slotLog(const QString &)), Qt::QueuedConnection ); connect( ui.console, SIGNAL(line_validate(const QString &)), this, SLOT(slotSend(const QString &)), Qt::QueuedConnection ); QObject::connect( ui.clearLog, SIGNAL(triggered()), this, SLOT(slotClearLog()) ); QObject::connect( ui.dontSleep, SIGNAL(triggered()), this, SLOT(slotDontSleep()) ); QObject::connect( ui.showFullLog, SIGNAL(triggered()), this, SLOT(slotShowFullLog()) ); QObject::connect( ui.queryStatus, SIGNAL(triggered()), this, SLOT(slotStatus()) ); QObject::connect( ui.queryOsc, SIGNAL(triggered()), this, SLOT(slotOsc()) ); QObject::connect( ui.shutdown, SIGNAL(triggered()), this, SLOT(slotShutdown()) ); QObject::connect( ui.setupPipe, SIGNAL(triggered()), this, SLOT(slotSetupPipe()) ); QObject::connect( ui.lightBtn, SIGNAL(clicked()), this, SLOT(slotLight()) ); QObject::connect( ui.motoEnBtn, SIGNAL(clicked()), this, SLOT(slotMotoEn()) ); QObject::connect( ui.fwdBtn, SIGNAL(pressed()), this, SLOT(slotForward()) ); QObject::connect( ui.bwdBtn, SIGNAL(pressed()), this, SLOT(slotBackward()) ); QObject::connect( ui.leftBtn, SIGNAL(pressed()), this, SLOT(slotLeft()) ); QObject::connect( ui.rightBtn, SIGNAL(pressed()), this, SLOT(slotRight()) ); QObject::connect( ui.fwdBtn, SIGNAL(released()), this, SLOT(slotStop()) ); QObject::connect( ui.bwdBtn, SIGNAL(released()), this, SLOT(slotStop()) ); QObject::connect( ui.leftBtn, SIGNAL(released()), this, SLOT(slotStop()) ); QObject::connect( ui.rightBtn, SIGNAL(released()), this, SLOT(slotStop()) ); QObject::connect( ui.showFullLog, SIGNAL(triggered()), this, SLOT(slotShowFullLog()) ); m_peer = new QXmppPeer( this ); QObject::connect( m_peer, SIGNAL(connected()), this, SLOT(slotConnected()) ); QObject::connect( m_peer, SIGNAL(disconnected()), this, SLOT(slotDisconnected()) ); QObject::connect( m_peer, SIGNAL(textmsg(QString)), this, SLOT(qxmppMessageReceived(QString)) ); m_video = new QXmppVideo( m_peer ); // It also connects frameReady() signal to an appropriate slot. ui.view->setVideo( m_video ); this->setCentralWidget( ui.view ); QSettings ini( CONFIG_FILE, QSettings::IniFormat ); ini.beginGroup( "main" ); QString selfJid = ini.value( "selfJid", "client@xmpp" ).toString(); QString destJid = ini.value( "destJid", "host@xmpp" ).toString(); QString password = ini.value( "password", "12345" ).toString(); QString host = ini.value( "host", QString() ).toString(); int port = ini.value( "port", -1 ).toInt(); bool tls = ini.value( "tls", true ).toBool(); bool updateDest = ini.value( "updateDest", true ).toBool(); m_peer->setTarget( destJid, updateDest ); m_video->setTarget( destJid ); m_peer->connect( selfJid, password, host, port, tls ); m_jidDest = destJid; m_pipe = new QXmppMsgPipe( m_peer, 1 ); m_pipe->setOutPipe( m_jidDest, 1234, 22, "localhost" ); m_dontSleepTimer = new QTimer( this ); m_dontSleepTimer->setInterval( 15000 ); QObject::connect( m_dontSleepTimer, SIGNAL(timeout()), this, SLOT(slotDontSleepTimeout()) ); }
KfmView::KfmView( KfmGui *_gui, QWidget *parent, const char *name, KfmView *_parent_view ) : KHTMLView( parent, name, 0, _parent_view ) { rectStart = false; dPainter = 0L; htmlCache = new HTMLCache(); if(!_parent_view) { backStack = new QStack<SavedPage>; forwardStack = new QStack<SavedPage>; backStack->setAutoDelete( false ); forwardStack->setAutoDelete( false ); } else { backStack = _parent_view->getBackStack(); forwardStack = _parent_view->getForwardStack(); } connect( htmlCache, SIGNAL( urlLoaded( const char*, const char *) ), this, SLOT( slotImageLoaded( const char*, const char* ) ) ); connect( this, SIGNAL( imageRequest( const char * ) ), htmlCache, SLOT( slotURLRequest( const char * ) ) ); connect( this, SIGNAL( cancelImageRequest( const char * ) ), htmlCache, SLOT( slotCancelURLRequest( const char * ) ) ); connect( this, SIGNAL( popupMenu( KHTMLView *, const char *, const QPoint & ) ), this, SLOT( slotPopupMenu2( KHTMLView *, const char *, const QPoint & ) ) ); connect( getKHTMLWidget(), SIGNAL( scrollVert( int ) ), SLOT( slotUpdateSelect(int) ) ); connect( this, SIGNAL( goUp() ), this, SLOT( slotUp() ) ); connect( this, SIGNAL( goRight() ), this, SLOT( slotForward() ) ); connect( this, SIGNAL( goLeft() ), this, SLOT( slotBack() ) ); connect ( getKHTMLWidget(), SIGNAL( redirect( int , const char *) ), this, SLOT( slotRedirect( int, const char * )) ); connect( &redirectTimer, SIGNAL(timeout()), this, SLOT(slotDelayedRedirect2())); gui = _gui; dropZone = 0L; popupMenu = 0L; popupMenuEvent = false; stackLock = false; // ignoreMouseRelease = false; // Stephan: Just guessed. It was undefined childViewList.setAutoDelete( false ); manager = new KFMManager( this ); dropZone = new KDNDDropZone( view , DndURL ); connect( dropZone, SIGNAL( dropAction( KDNDDropZone *) ), this, SLOT( slotDropEvent( KDNDDropZone *) ) ); connect( dropZone, SIGNAL( dropEnter( KDNDDropZone *) ), this, SLOT( slotDropEnterEvent( KDNDDropZone *) ) ); connect( dropZone, SIGNAL( dropLeave( KDNDDropZone *) ), this, SLOT( slotDropLeaveEvent( KDNDDropZone *) ) ); connect( KIOServer::getKIOServer(), SIGNAL( notify( const char * ) ), this, SLOT( slotFilesChanged( const char * ) ) ); connect( KIOServer::getKIOServer(), SIGNAL( mountNotify() ), this, SLOT( slotMountNotify() ) ); getKHTMLWidget()->setFocusPolicy( QWidget::StrongFocus ); setHTMLWidgetOptions(); }
Monitor::Monitor(Kdenlive::MONITORID id, MonitorManager *manager, QString profile, QWidget *parent) : AbstractMonitor(id, manager, parent) , render(NULL) , m_currentClip(NULL) , m_overlay(NULL) , m_scale(1) , m_length(2) , m_dragStarted(false) , m_loopClipAction(NULL) , m_contextMenu(NULL) , m_effectWidget(NULL) , m_selectedClip(NULL) , m_loopClipTransition(true) #ifdef USE_OPENGL , m_glWidget(NULL) #endif , m_editMarker(NULL) { QVBoxLayout *layout = new QVBoxLayout; layout->setContentsMargins(0, 0, 0, 0); layout->setSpacing(0); // Video widget holder layout->addWidget(videoBox, 10); layout->addStretch(); // Get base size for icons int s = style()->pixelMetric(QStyle::PM_SmallIconSize); // Tool bar buttons m_toolbar = new QToolBar(this); m_toolbar->setIconSize(QSize(s, s)); m_playIcon = KIcon("media-playback-start"); m_pauseIcon = KIcon("media-playback-pause"); if (id != Kdenlive::dvdMonitor) { m_toolbar->addAction(KIcon("kdenlive-zone-start"), i18n("Set zone start"), this, SLOT(slotSetZoneStart())); m_toolbar->addAction(KIcon("kdenlive-zone-end"), i18n("Set zone end"), this, SLOT(slotSetZoneEnd())); } m_toolbar->addAction(KIcon("media-seek-backward"), i18n("Rewind"), this, SLOT(slotRewind())); //m_toolbar->addAction(KIcon("media-skip-backward"), i18n("Rewind 1 frame"), this, SLOT(slotRewindOneFrame())); QToolButton *playButton = new QToolButton(m_toolbar); m_playMenu = new QMenu(i18n("Play..."), this); m_playAction = m_playMenu->addAction(m_playIcon, i18n("Play")); //m_playAction->setCheckable(true); connect(m_playAction, SIGNAL(triggered()), this, SLOT(slotPlay())); playButton->setMenu(m_playMenu); playButton->setPopupMode(QToolButton::MenuButtonPopup); m_toolbar->addWidget(playButton); //m_toolbar->addAction(KIcon("media-skip-forward"), i18n("Forward 1 frame"), this, SLOT(slotForwardOneFrame())); m_toolbar->addAction(KIcon("media-seek-forward"), i18n("Forward"), this, SLOT(slotForward())); playButton->setDefaultAction(m_playAction); if (id != Kdenlive::dvdMonitor) { QToolButton *configButton = new QToolButton(m_toolbar); m_configMenu = new QMenu(i18n("Misc..."), this); configButton->setIcon(KIcon("system-run")); configButton->setMenu(m_configMenu); configButton->setPopupMode(QToolButton::QToolButton::InstantPopup); m_toolbar->addWidget(configButton); if (id == Kdenlive::clipMonitor) { m_markerMenu = new QMenu(i18n("Go to marker..."), this); m_markerMenu->setEnabled(false); m_configMenu->addMenu(m_markerMenu); connect(m_markerMenu, SIGNAL(triggered(QAction *)), this, SLOT(slotGoToMarker(QAction *))); }