void K3bVideoDVDRippingView::initActions() { m_actionCollection = new KActionCollection( this ); KAction* actionSelectAll = new KAction( i18n("Check All"), 0, 0, this, SLOT(slotCheckAll()), actionCollection(), "check_all" ); KAction* actionDeselectAll = new KAction( i18n("Uncheck All"), 0, 0, this, SLOT(slotUncheckAll()), actionCollection(), "uncheck_all" ); KAction* actionSelect = new KAction( i18n("Check Track"), 0, 0, this, SLOT(slotCheck()), actionCollection(), "select_track" ); KAction* actionDeselect = new KAction( i18n("Uncheck Track"), 0, 0, this, SLOT(slotUncheck()), actionCollection(), "deselect_track" ); KAction* actionStartRip = new KAction( i18n("Start Ripping"), "gear", 0, this, SLOT(slotStartRipping()), m_actionCollection, "start_rip" ); actionStartRip->setToolTip( i18n("Open the Video DVD ripping dialog") ); // setup the popup menu m_popupMenu = new KActionMenu( actionCollection(), "popup_menu" ); KAction* separator = new KActionSeparator( actionCollection(), "separator" ); m_popupMenu->insert( actionSelect ); m_popupMenu->insert( actionDeselect ); m_popupMenu->insert( actionSelectAll ); m_popupMenu->insert( actionDeselectAll ); m_popupMenu->insert( separator ); m_popupMenu->insert( actionStartRip ); }
void MultipleView::slotOpt3Clicked() { if (Prefs::autoCheck()) slotCheck(); else { opt1->setChecked(false); opt2->setChecked(false); } }
tristate KexiReportDesignView::afterSwitchFrom(Kexi::ViewMode mode) { kDebug() << tempData()->document; if (tempData()->document.isEmpty()) { _rd = new ReportDesigner(this, KexiMainWindowIface::global()->project()->dbConnection()); } else { if (_rd) { scr->takeWidget(); delete _rd; _rd = 0; } _rd = new ReportDesigner(this, KexiMainWindowIface::global()->project()->dbConnection(), tempData()->document); } scr->setWidget(_rd); //plugSharedAction ( "edit_copy", _rd, SLOT ( slotEditCopy() ) ); //plugSharedAction ( "edit_cut", _rd, SLOT ( slotEditCut() ) ); //plugSharedAction ( "edit_paste", _rd, SLOT ( slotEditPaste() ) ); //plugSharedAction ( "edit_delete", _rd, SLOT ( slotEditDelete() ) ); connect(_rd, SIGNAL(propertySetChanged()), this, SLOT(slotDesignerPropertySetChanged())); connect(_rd, SIGNAL(dirty()), this, SLOT(setDirty())); //Edit Actions connect(editCutAction, SIGNAL(activated()), _rd, SLOT(slotEditCut())); connect(editCopyAction, SIGNAL(activated()), _rd, SLOT(slotEditCopy())); connect(editPasteAction, SIGNAL(activated()), _rd, SLOT(slotEditPaste())); connect(editDeleteAction, SIGNAL(activated()), _rd, SLOT(slotEditDelete())); connect(sectionEdit, SIGNAL(activated()), _rd, SLOT(slotSectionEditor())); //Control Actions connect(res->itemLabel, SIGNAL(clicked()), this, SLOT(slotLabel())); connect(res->itemField, SIGNAL(clicked()), this, SLOT(slotField())); connect(res->itemText, SIGNAL(clicked()), this, SLOT(slotText())); connect(res->itemLine, SIGNAL(clicked()), this, SLOT(slotLine())); connect(res->itemBarcode, SIGNAL(clicked()), this, SLOT(slotBarcode())); connect(res->itemChart, SIGNAL(clicked()),this, SLOT(slotChart())); connect(res->itemImage, SIGNAL(clicked()), this, SLOT(slotImage())); connect(res->itemShape, SIGNAL(clicked()), this, SLOT(slotShape())); connect(res->itemCheck, SIGNAL(clicked()), this, SLOT(slotCheck())); //Raise/Lower connect(itemRaiseAction, SIGNAL(activated()), _rd, SLOT(slotRaiseSelected())); connect(itemLowerAction, SIGNAL(activated()), _rd, SLOT(slotLowerSelected())); return true; }
void K3b::VideoDVDRippingView::initActions() { d->actionCollection = new KActionCollection( this ); KAction* actionCheck = new KAction( this ); connect( actionCheck, SIGNAL(triggered()), this, SLOT(slotCheck()) ); actionCollection()->addAction( "check_tracks", actionCheck ); KAction* actionUncheck = new KAction( this ); connect( actionUncheck, SIGNAL(triggered()), this, SLOT(slotUncheck()) ); actionCollection()->addAction( "uncheck_tracks", actionUncheck ); KAction* actionStartRip = new KAction( KIcon( "tools-rip-video-dvd" ), i18n("Start Ripping"), this ); actionStartRip->setToolTip( i18n("Open the Video DVD ripping dialog") ); actionStartRip->setStatusTip(actionStartRip->toolTip()); actionStartRip->setWhatsThis( i18n("<p>Rips single titles from a video DVD " "into a compressed format such as XviD. Menu structures are completely ignored." "<p>If you intend to copy the plain Video DVD vob files from the DVD " "(including decryption) for further processing with another application, " "please use \"Show files\" button." "<p>If you intend to make a copy of the entire Video DVD including all menus " "and extras it is recommended to use the K3b Copy tool.") ); connect( actionStartRip, SIGNAL(triggered()), this, SLOT(slotStartRipping()) ); actionCollection()->addAction( "start_rip", actionStartRip ); KAction* actionSelectAll = KStandardAction::selectAll( d->view, SLOT(selectAll()), actionCollection() ); // setup the popup menu d->popupMenu = new KMenu( this ); d->popupMenu->addAction( actionCheck ); d->popupMenu->addAction( actionUncheck ); d->popupMenu->addSeparator(); d->popupMenu->addAction( actionSelectAll ); d->popupMenu->addSeparator(); d->popupMenu->addAction( actionStartRip ); connect( d->popupMenu, SIGNAL(aboutToShow()), this, SLOT(slotContextMenuAboutToShow()) ); }
tristate ReportDesignView::afterSwitchFrom ( ::ViewMode mode ) { kDebug(planDbg()) << tempData()->document; if ( tempData()->document.isEmpty() ) { _rd = new ReportDesigner ( this ); } else { if ( _rd ) { scr->takeWidget(); delete _rd; _rd = 0; } QDomDocument doc; doc.setContent ( tempData()->document ); QDomElement root = doc.documentElement(); QDomElement korep = root.firstChildElement( "koreport" ); QDomElement conn = root.firstChildElement( "connection" ); if ( !korep.isNull() ) { _rd = new ReportDesigner ( this, korep ); if (!conn.isNull()) { srcsel->setConnectionData(conn); } } else { kDebug(planDbg()) << "no koreport section"; //TODO remove...just create a blank document //Temp - allow load old style report definitions (no data) root.setTagName("koreport"); _rd = new ReportDesigner ( this, root ); } } scr->setWidget ( _rd ); //plugSharedAction ( "edit_copy", _rd, SLOT(slotEditCopy()) ); //plugSharedAction ( "edit_cut", _rd, SLOT(slotEditCut()) ); //plugSharedAction ( "edit_paste", _rd, SLOT(slotEditPaste()) ); //plugSharedAction ( "edit_delete", _rd, SLOT(slotEditDelete()) ); connect ( _rd, SIGNAL(propertySetChanged()), this, SLOT(slotDesignerPropertySetChanged()) ); connect ( _rd, SIGNAL(dirty()), this, SLOT(setDirty()) ); //Edit Actions connect ( editCutAction, SIGNAL(activated()), _rd, SLOT(slotEditCut()) ); connect ( editCopyAction, SIGNAL(activated()), _rd, SLOT(slotEditCopy()) ); connect ( editPasteAction, SIGNAL(activated()), _rd, SLOT(slotEditPaste()) ); connect ( editDeleteAction, SIGNAL(activated()), _rd, SLOT(slotEditDelete()) ); connect ( sectionEdit, SIGNAL(activated()), _rd, SLOT(slotSectionEditor()) ); //Control Actions connect ( res->itemLabel, SIGNAL(clicked()), this, SLOT(slotLabel()) ); connect ( res->itemField, SIGNAL(clicked()), this, SLOT(slotField()) ); connect ( res->itemText, SIGNAL(clicked()), this, SLOT(slotText()) ); connect ( res->itemLine, SIGNAL(clicked()), this, SLOT(slotLine()) ); connect ( res->itemBarcode, SIGNAL(clicked()), this, SLOT(slotBarcode()) ); connect ( res->itemChart, SIGNAL(clicked()),this, SLOT(slotChart()) ); connect ( res->itemImage, SIGNAL(clicked()), this, SLOT(slotImage()) ); connect ( res->itemShape, SIGNAL(clicked()), this, SLOT(slotShape()) ); connect ( res->itemCheck, SIGNAL(clicked()), this, SLOT(slotCheck()) ); //Raise/Lower connect ( itemRaiseAction, SIGNAL(activated()), _rd, SLOT(slotRaiseSelected()) ); connect ( itemLowerAction, SIGNAL(activated()), _rd, SLOT(slotLowerSelected()) ); return true; }