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 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()) ); }