本文整理汇总了C++中KShortcut函数的典型用法代码示例。如果您正苦于以下问题:C++ KShortcut函数的具体用法?C++ KShortcut怎么用?C++ KShortcut使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了KShortcut函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: KAction
void WicdApplet::setupActions()
{
KAction* preferencesAction = new KAction(KIcon("preferences-system-network"), i18n("Wicd Configuration"), this);
preferencesAction->setShortcuts(KShortcut("Ctrl+P"));
addAction("configure_wicd", preferencesAction);
connect(preferencesAction, SIGNAL(triggered()), this, SLOT(showPreferences()));
KAction* connectInfoAction = new KAction(KIcon("help-about"), i18n("Connection information"), this);
addAction("connection_info", connectInfoAction);
connect(connectInfoAction, SIGNAL(triggered()), this, SLOT(connectionInfoRequested()));
KAction* createadhocAction = new KAction(KIcon("list-add"), i18n("Create an ad-hoc network"), this);
createadhocAction->setShortcuts(KShortcut("Ctrl+A"));
addAction("createadhoc", createadhocAction);
connect(createadhocAction, SIGNAL(triggered()), this, SLOT(createAdhocDialog()));
KAction* findnetworkAction = new KAction(KIcon("edit-find"), i18n("Find a hidden network"), this);
findnetworkAction->setShortcuts(KShortcut("Ctrl+F"));
addAction("findnetwork", findnetworkAction);
connect(findnetworkAction, SIGNAL(triggered()), this, SLOT(findHiddenDialog()));
KAction* rfkillAction = new KAction(i18n("RfKill"), this);
rfkillAction->setShortcuts(KShortcut("Ctrl+K"));
addAction("rfkill", rfkillAction);
connect(rfkillAction, SIGNAL(triggered()), this, SLOT(rfkill()));
KAction* reloadAction = new KAction(KIcon("view-refresh"), i18n("Reload"), this);
reloadAction->setShortcuts(KShortcut("Ctrl+R"));
addAction("reload", reloadAction);
connect(reloadAction, SIGNAL(triggered()), this, SLOT(scan()));
}
示例2: Q_UNUSED
void KGlobalShortcutTest::setupTest(QString id)
{
if (m_actionA) {
m_actionA->forgetGlobalShortcut();
delete m_actionA;
}
if (m_actionB) {
m_actionB->forgetGlobalShortcut();
delete m_actionB;
}
// Ensure that the previous test did cleanup correctly
KGlobalAccel *kga = KGlobalAccel::self();
Q_UNUSED(kga);
m_actionA = new KAction("Text For Action A", this);
m_actionA->setObjectName("Action A:" + id);
m_actionA->setGlobalShortcut(
KShortcut(sequenceA, sequenceB),
KAction::ActiveShortcut|KAction::DefaultShortcut,
KAction::NoAutoloading);
m_actionB = new KAction("Text For Action B", this);
m_actionB->setObjectName("Action B:" + id);
m_actionB->setGlobalShortcut(
KShortcut(),
KAction::ActiveShortcut|KAction::DefaultShortcut,
KAction::NoAutoloading);
}
示例3: file
/** Initialize the accelerator @p id by checking if it is overridden
in the configuration file (and if it isn't, use the default).
On X11, if QApplication was initialized with GUI disabled,
the default will always be used.
*/
static void initialize(StandardShortcut id)
{
KStandardShortcutInfo *info = guardedStandardShortcutInfo(id);
// All three are needed.
if (info->id!=AccelNone) {
Q_ASSERT(info->description);
Q_ASSERT(info->translation_context);
Q_ASSERT(info->name);
}
KConfigGroup cg(KGlobal::config(), "Shortcuts");
#ifdef Q_WS_X11
// Code within this block breaks if we aren't running in GUI mode.
if(QX11Info::display() && cg.hasKey(info->name))
#else
if(cg.hasKey(info->name))
#endif
{
QString s = cg.readEntry(info->name);
if (s != "none")
info->cut = KShortcut(s);
else
info->cut = KShortcut();
} else {
info->cut = hardcodedDefaultShortcut(id);
}
info->isInitialized = true;
}
示例4: Plugin
KGet_plug_in::KGet_plug_in( QObject* parent, const char* name )
: Plugin( parent, name )
{
QPixmap pix = KGlobal::iconLoader()->loadIcon("kget",
KIcon::MainToolbar);
KActionMenu *menu = new KActionMenu( i18n("Download Manager"), pix,
actionCollection(), "kget_menu" );
menu->setDelayed( false );
connect( menu->popupMenu(), SIGNAL( aboutToShow() ), SLOT( showPopup() ));
m_paToggleDropTarget=new KToggleAction(i18n("Show Drop Target"),
KShortcut(),
this, SLOT(slotShowDrop()),
actionCollection(), "show_drop" );
menu->insert( m_paToggleDropTarget );
KAction *action = new KAction(i18n("List All Links"), KShortcut(),
this, SLOT( slotShowLinks() ),
actionCollection(), "show_links");
menu->insert( action );
p_dcopServer= new DCOPClient();
p_dcopServer->attach ();
}
示例5: KCModule
LookingGlassEffectConfig::LookingGlassEffectConfig(QWidget* parent, const QVariantList& args) :
KCModule(EffectFactory::componentData(), parent, args)
{
m_ui = new LookingGlassEffectConfigForm(this);
QVBoxLayout* layout = new QVBoxLayout(this);
layout->addWidget(m_ui);
connect(m_ui->editor, SIGNAL(keyChange()), this, SLOT(changed()));
connect(m_ui->radiusSpin, SIGNAL(valueChanged(int)), this, SLOT(changed()));
// Shortcut config. The shortcut belongs to the component "kwin"!
m_actionCollection = new KActionCollection(this, KComponentData("kwin"));
m_actionCollection->setConfigGroup("LookingGlass");
m_actionCollection->setConfigGlobal(true);
KAction* a;
a = static_cast< KAction* >(m_actionCollection->addAction(KStandardAction::ZoomIn));
a->setProperty("isConfigurationAction", true);
a->setGlobalShortcut(KShortcut(Qt::META + Qt::Key_Plus));
a = static_cast< KAction* >(m_actionCollection->addAction(KStandardAction::ZoomOut));
a->setProperty("isConfigurationAction", true);
a->setGlobalShortcut(KShortcut(Qt::META + Qt::Key_Minus));
a = static_cast< KAction* >(m_actionCollection->addAction(KStandardAction::ActualSize));
a->setProperty("isConfigurationAction", true);
a->setGlobalShortcut(KShortcut(Qt::META + Qt::Key_0));
m_ui->editor->addCollection(m_actionCollection);
}
示例6: KToolBarPopupAction
void ActionManagerImpl::initFrameManager(FrameManager* frameManager)
{
if (d->frameManager)
return;
d->frameManager = frameManager;
bool isRTL = QApplication::isRightToLeft();
KToolBarPopupAction* forward = new KToolBarPopupAction(KIcon(isRTL ? "go-previous" : "go-next"), i18nc("Go forward in browser history", "Forward"), this);
d->actionCollection->addAction("browser_forward", forward);
forward->setShortcuts(KShortcut(isRTL ? "Alt+Left" : "Alt+Right"));
connect(forward, SIGNAL(triggered()), frameManager, SLOT(slotBrowserForward()));
connect(forward->menu(), SIGNAL(aboutToShow()), frameManager, SLOT(slotBrowserForwardAboutToShow()));
KToolBarPopupAction* back = new KToolBarPopupAction(KIcon(isRTL ? "go-next" : "go-previous"), i18nc("Go back in browser history", "Back"), this);
d->actionCollection->addAction("browser_back", back);
back->setShortcuts(KShortcut(isRTL ? "Alt+Right" : "Alt+Left"));
connect(back, SIGNAL(triggered()), frameManager, SLOT(slotBrowserBack()));
connect(back->menu(), SIGNAL(aboutToShow()), frameManager, SLOT(slotBrowserBackAboutToShow()));
KAction *action = d->actionCollection->addAction("browser_reload");
action->setIcon(KIcon("view-refresh"));
action->setText(i18nc("Reload current page", "Reload"));
connect(action, SIGNAL(triggered(bool)), frameManager, SLOT(slotBrowserReload()));
action = d->actionCollection->addAction("browser_stop");
action->setIcon(KIcon("process-stop"));
action->setText(i18n("Stop"));
connect(action, SIGNAL(triggered(bool)), frameManager, SLOT(slotBrowserStop()));
}
示例7: KCModule
MouseMarkEffectConfig::MouseMarkEffectConfig(QWidget* parent, const QVariantList& args) :
KCModule(EffectFactory::componentData(), parent, args)
{
m_ui = new MouseMarkEffectConfigForm(this);
QVBoxLayout* layout = new QVBoxLayout(this);
layout->addWidget(m_ui);
connect(m_ui->editor, SIGNAL(keyChange()), this, SLOT(changed()));
connect(m_ui->spinWidth, SIGNAL(valueChanged(int)), this, SLOT(changed()));
connect(m_ui->comboColors, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
// Shortcut config. The shortcut belongs to the component "kwin"!
m_actionCollection = new KActionCollection( this, KComponentData("kwin") );
KAction* a = static_cast< KAction* >( m_actionCollection->addAction( "ClearMouseMarks" ));
a->setText( i18n( "Clear Mouse Marks" ));
a->setProperty("isConfigurationAction", true);
a->setGlobalShortcut( KShortcut( Qt::SHIFT + Qt::META + Qt::Key_F11 ));
a = static_cast< KAction* >( m_actionCollection->addAction( "ClearLastMouseMark" ));
a->setText( i18n( "Clear Last Mouse Mark" ));
a->setProperty("isConfigurationAction", true);
a->setGlobalShortcut( KShortcut( Qt::SHIFT + Qt::META + Qt::Key_F12 ));
m_ui->editor->addCollection(m_actionCollection);
load();
}
示例8: KCModule
MouseMarkEffectConfig::MouseMarkEffectConfig(QWidget* parent, const QVariantList& args) :
KCModule(EffectFactory::componentData(), parent, args)
{
m_ui = new MouseMarkEffectConfigForm(this);
m_ui->kcfg_LineWidth->setSuffix(ki18np(" pixel", " pixels"));
QVBoxLayout* layout = new QVBoxLayout(this);
layout->addWidget(m_ui);
addConfig(MouseMarkConfig::self(), m_ui);
// Shortcut config. The shortcut belongs to the component "kwin"!
m_actionCollection = new KActionCollection(this, KComponentData("kwin"));
KAction* a = static_cast< KAction* >(m_actionCollection->addAction("ClearMouseMarks"));
a->setText(i18n("Clear Mouse Marks"));
a->setProperty("isConfigurationAction", true);
a->setGlobalShortcut(KShortcut(Qt::SHIFT + Qt::META + Qt::Key_F11));
a = static_cast< KAction* >(m_actionCollection->addAction("ClearLastMouseMark"));
a->setText(i18n("Clear Last Mouse Mark"));
a->setProperty("isConfigurationAction", true);
a->setGlobalShortcut(KShortcut(Qt::SHIFT + Qt::META + Qt::Key_F12));
m_ui->editor->addCollection(m_actionCollection);
load();
}
示例9: setupTest
void KGlobalShortcutTest::testSaveRestore()
{
setupTest("testSaveRestore");
//It /would be nice/ to test persistent storage. That is not so easy...
KShortcut cutA = m_actionA->globalShortcut();
// Delete the action
delete m_actionA;
// Recreate it
m_actionA = new KAction("Text For Action A", this);
m_actionA->setObjectName("Action A:testSaveRestore");
// Now it's empty
QVERIFY(m_actionA->globalShortcut().isEmpty());
m_actionA->setGlobalShortcut(KShortcut());
// Now it's restored
QCOMPARE(m_actionA->globalShortcut(), cutA);
// And again
delete m_actionA;
m_actionA = new KAction("Text For Action A", this);
m_actionA->setObjectName("Action A:testSaveRestore");
m_actionA->setGlobalShortcut(KShortcut(QKeySequence(), cutA.primary()));
QCOMPARE(m_actionA->globalShortcut(), cutA);
}
示例10: actionCollection
void ActionManagerImpl::initTabWidget(TabWidget* tabWidget)
{
if (d->tabWidget)
return;
else
d->tabWidget = tabWidget;
KActionCollection *coll = actionCollection();
KAction *action = coll->addAction("select_next_tab");
action->setText(i18n("Select Next Tab"));
connect(action, SIGNAL(triggered(bool)), d->tabWidget, SLOT(slotNextTab()));
action->setShortcuts(KShortcut( "Ctrl+Period" ));
action = coll->addAction("select_previous_tab");
action->setText(i18n("Select Previous Tab"));
connect(action, SIGNAL(triggered(bool)), d->tabWidget, SLOT(slotPreviousTab()));
action->setShortcuts(KShortcut( "Ctrl+Comma" ));
action = coll->addAction("tab_detach");
action->setIcon(KIcon("tab-detach"));
action->setText(i18n("Detach Tab"));
connect(action, SIGNAL(triggered(bool)), d->tabWidget, SLOT(slotDetachTab()));
action->setShortcut(QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_B));
action = coll->addAction("tab_copylinkaddress");
action->setText(i18n("Copy Link Address"));
connect(action, SIGNAL(triggered(bool)), d->tabWidget, SLOT(slotCopyLinkAddress()));
action = coll->addAction("tab_remove");
action->setIcon(KIcon("tab-close"));
action->setText(i18n("Close Tab"));
connect(action, SIGNAL(triggered(bool)), d->tabWidget, SLOT(slotCloseTab()));
action->setShortcuts(KStandardShortcut::close());
action = coll->addAction("inc_font_sizes");
action->setIcon(KIcon("format-font-size-more"));
action->setText(i18n("Enlarge Font"));
connect(action, SIGNAL(triggered(bool)), d->tabWidget, SLOT(slotFrameZoomIn()));
action->setShortcut( QKeySequence::ZoomIn );
action = coll->addAction("dec_font_sizes");
action->setIcon(KIcon("format-font-size-less"));
action->setText(i18n("Shrink Font"));
connect(action, SIGNAL(triggered(bool)), d->tabWidget, SLOT(slotFrameZoomOut()));
action->setShortcut( QKeySequence::ZoomOut );
QString actionname;
for (int i=1;i<10;i++) {
actionname.sprintf("activate_tab_%02d", i);
action = new KAction( i18n("Activate Tab %1", i),this );
action->setShortcut( QKeySequence( QString::fromLatin1( "Alt+%1" ).arg( i ) ) );
coll->addAction( actionname, action );
connect( action, SIGNAL(triggered(bool)), d->tabWidget, SLOT(slotActivateTab()) );
}
}
示例11: KAction
void KSlovar::registerButtons()
{
m_newDictionary = new KAction(i18n("&New dictionary"), "filenew", KShortcut(KKey("CTRL+n")), this, SLOT(slotNewDictionary()), actionCollection(), "newDictionary");
m_openDictionary = KStdAction::open(this, SLOT(slotFileOpen()), actionCollection());
m_quit = KStdAction::quit(kapp, SLOT(quit()), actionCollection());
m_back=KStdAction::back(this, SLOT(slotPrevPhrase()), actionCollection());
m_forward=KStdAction::forward(this, SLOT(slotNextPhrase()), actionCollection());
m_home=KStdAction::home(this, SLOT(slotHome()), actionCollection());
m_editDictionary = new KAction(i18n("&Edit dictionary"), "edit", KShortcut(KKey("CTRL+e")), this, SLOT(slotEditDictionary()), actionCollection(), "editDictionary");
m_close=KStdAction::close(this, SLOT(slotClose()), actionCollection());
m_find = KStdAction::find(this, SLOT(slotFind()), actionCollection());
m_findNext = KStdAction::findNext(this, SLOT(slotFindNext()), actionCollection());
m_literalSearch = new KToggleAction(i18n("&Literal search"), "filter", KShortcut(KKey("CTRL+l")), this, SLOT(slotToggleLiteral()), actionCollection(), "literalSearch");
m_backSearch = new KToggleAction(i18n("Ba&ck search"), "previous", KShortcut(KKey("CTRL+b")), this, SLOT(slotToggleBack()), actionCollection(), "backSearch");
m_print=KStdAction::print(this, SLOT(slotPrint()), actionCollection());
m_selectAll=KStdAction::selectAll(this, SLOT(slotSelectAll()), actionCollection());
m_addPhrase=new KAction(i18n("&Add phrase"), "filenew", KShortcut(KKey("CTRL+a")), this, SLOT(slotAddPhrase()), actionCollection(), "addPhrase");
m_editPhrase=new KAction(i18n("Edi&t phrase"), "edit", KShortcut(KKey("CTRL+t")), this, SLOT(slotEditPhrase()), actionCollection(), "editPhrase");
m_removePhrase=new KAction(i18n("&Remove phrase"), "editdelete", KShortcut(KKey("Delete")), this, SLOT(slotRemovePhrase()), actionCollection(), "removePhrase");
m_listPopup=new QPopupMenu;
m_addPhrase->plug(m_listPopup);
m_editPhrase->plug(m_listPopup);
m_removePhrase->plug(m_listPopup);
m_config = KStdAction::preferences(this, SLOT(slotConfigure()), actionCollection());
m_conversion = new KAction(i18n("Edit &conversion table"), "conversion", this, SLOT(slotConversionTable()), actionCollection(), "editConversion");
m_update = new KAction(i18n("Update &languages"), "ktalkd", KShortcut(KKey("")), this, SLOT(slotDownloadLanguage()), actionCollection(), "updateLanguages");
m_wizard = new KAction(i18n("Run &First-time wizard"), "wizard", KShortcut(KKey("")), this, SLOT(slotFirstRunWizard()), actionCollection(), "firstRunWizard");
}
示例12: setPreferredToolBoxPlugin
void DesktopCorona::init()
{
setPreferredToolBoxPlugin(Plasma::Containment::DesktopContainment, "org.kde.desktoptoolbox");
setPreferredToolBoxPlugin(Plasma::Containment::CustomContainment, "org.kde.desktoptoolbox");
setPreferredToolBoxPlugin(Plasma::Containment::PanelContainment, "org.kde.paneltoolbox");
setPreferredToolBoxPlugin(Plasma::Containment::CustomPanelContainment, "org.kde.paneltoolbox");
kDebug() << "!!{} STARTUP TIME" << QTime().msecsTo(QTime::currentTime()) << "DesktopCorona init start" << "(line:" << __LINE__ << ")";
Kephal::Screens *screens = Kephal::Screens::self();
connect(screens, SIGNAL(screenAdded(Kephal::Screen*)), SLOT(screenAdded(Kephal::Screen*)));
connect(KWindowSystem::self(), SIGNAL(workAreaChanged()), this, SIGNAL(availableScreenRegionChanged()));
Plasma::ContainmentActionsPluginsConfig desktopPlugins;
desktopPlugins.addPlugin(Qt::NoModifier, Qt::Vertical, "switchdesktop");
desktopPlugins.addPlugin(Qt::NoModifier, Qt::MidButton, "paste");
desktopPlugins.addPlugin(Qt::NoModifier, Qt::RightButton, "contextmenu");
Plasma::ContainmentActionsPluginsConfig panelPlugins;
panelPlugins.addPlugin(Qt::NoModifier, Qt::RightButton, "contextmenu");
setContainmentActionsDefaults(Plasma::Containment::DesktopContainment, desktopPlugins);
setContainmentActionsDefaults(Plasma::Containment::CustomContainment, desktopPlugins);
setContainmentActionsDefaults(Plasma::Containment::PanelContainment, panelPlugins);
setContainmentActionsDefaults(Plasma::Containment::CustomPanelContainment, panelPlugins);
checkAddPanelAction();
//why do these actions belong to plasmaapp?
//because it makes the keyboard shortcuts work.
KAction *action = new KAction(PlasmaApp::self());
action->setText(i18n("Next Activity"));
action->setObjectName( QLatin1String("Next Activity" )); // NO I18N
action->setGlobalShortcut(KShortcut(Qt::META + Qt::Key_Tab));
connect(action, SIGNAL(triggered()), this, SLOT(activateNextActivity()));
action = new KAction(PlasmaApp::self());
action->setText(i18n("Previous Activity"));
action->setObjectName( QLatin1String("Previous Activity" )); // NO I18N
action->setGlobalShortcut(KShortcut(Qt::META + Qt::SHIFT + Qt::Key_Tab));
connect(action, SIGNAL(triggered()), this, SLOT(activatePreviousActivity()));
connect(this, SIGNAL(immutabilityChanged(Plasma::ImmutabilityType)),
this, SLOT(updateImmutability(Plasma::ImmutabilityType)));
connect(KSycoca::self(), SIGNAL(databaseChanged(QStringList)), this, SLOT(checkAddPanelAction(QStringList)));
connect(m_activityController, SIGNAL(currentActivityChanged(QString)), this, SLOT(currentActivityChanged(QString)));
connect(m_activityController, SIGNAL(activityAdded(QString)), this, SLOT(activityAdded(QString)));
connect(m_activityController, SIGNAL(activityRemoved(QString)), this, SLOT(activityRemoved(QString)));
mapAnimation(Plasma::Animator::AppearAnimation, Plasma::Animator::ZoomAnimation);
mapAnimation(Plasma::Animator::DisappearAnimation, Plasma::Animator::ZoomAnimation);
kDebug() << "!!{} STARTUP TIME" << QTime().msecsTo(QTime::currentTime()) << "DesktopCorona init end" << "(line:" << __LINE__ << ")";
}
示例13: Q_ASSERT
KShortcut KAction::shortcut(ShortcutTypes type) const
{
Q_ASSERT(type);
if (type == DefaultShortcut) {
QList<QKeySequence> shortcuts = property("defaultShortcuts").value<QList<QKeySequence> >();
return KShortcut(shortcuts);
}
QKeySequence primary = shortcuts().value(0);
QKeySequence secondary = shortcuts().value(1);
return KShortcut(primary, secondary);
}
示例14: KShortcut
void KCompletionBase::useGlobalKeyBindings()
{
if ( d->m_delegate ) {
d->m_delegate->useGlobalKeyBindings();
return;
}
d->m_keyMap.clear();
d->m_keyMap.insert( TextCompletion, KShortcut() );
d->m_keyMap.insert( PrevCompletionMatch, KShortcut() );
d->m_keyMap.insert( NextCompletionMatch, KShortcut() );
d->m_keyMap.insert( SubstringCompletion, KShortcut() );
}
示例15: actionCollection
void GUI::setupActions()
{
KActionCollection* ac = actionCollection();
KAction* new_action = KStandardAction::openNew(this, SLOT(createTorrent()), ac);
new_action->setToolTip(i18n("Create a new torrent"));
KAction* open_action = KStandardAction::open(this, SLOT(openTorrent()), ac);
open_action->setToolTip(i18n("Open a torrent"));
paste_action = KStandardAction::paste(this, SLOT(paste()), ac);
open_silently_action = new KAction(KIcon(open_action->icon()), i18n("Open Silently"), this);
open_silently_action->setToolTip(i18n("Open a torrent without asking any questions"));
connect(open_silently_action, SIGNAL(triggered()), this, SLOT(openTorrentSilently()));
ac->addAction("file_open_silently", open_silently_action);
KStandardAction::quit(this, SLOT(quit()), ac);
show_status_bar_action = KStandardAction::showStatusbar(this, SLOT(showStatusBar()), ac);
show_status_bar_action->setIcon(KIcon("kt-show-statusbar"));
show_menu_bar_action = KStandardAction::showMenubar(this, SLOT(showMenuBar()), ac);
KStandardAction::preferences(this, SLOT(showPrefDialog()), ac);
KStandardAction::keyBindings(this, SLOT(configureKeys()), ac);
KStandardAction::configureToolbars(this, SLOT(configureToolbars()), ac);
KStandardAction::configureNotifications(this, SLOT(configureNotifications()), ac);
paste_url_action = new KAction(KIcon("document-open-remote"), i18n("Open URL"), this);
paste_url_action->setToolTip(i18n("Open a URL which points to a torrent, magnet links are supported"));
paste_url_action->setShortcut(KShortcut(Qt::CTRL + Qt::Key_P));
connect(paste_url_action, SIGNAL(triggered()), this, SLOT(pasteURL()));
ac->addAction("paste_url", paste_url_action);
ipfilter_action = new KAction(KIcon("view-filter"), i18n("IP Filter"), this);
ipfilter_action->setToolTip(i18n("Show the list of blocked IP addresses"));
ipfilter_action->setShortcut(KShortcut(Qt::CTRL + Qt::Key_I));
connect(ipfilter_action, SIGNAL(triggered()), this, SLOT(showIPFilter()));
ac->addAction("ipfilter_action", ipfilter_action);
import_action = new KAction(KIcon("document-import"), i18n("Import Torrent"), this);
import_action->setToolTip(i18n("Import a torrent"));
import_action->setShortcut(KShortcut(Qt::SHIFT + Qt::Key_I));
connect(import_action, SIGNAL(triggered()), this, SLOT(import()));
ac->addAction("import", import_action);
show_kt_action = new KAction(KIcon("kt-show-hide"), i18n("Show/Hide KTorrent"), this);
connect(show_kt_action, SIGNAL(triggered()), this, SLOT(showOrHide()));
ac->addAction("show_kt", show_kt_action);
show_kt_action->setGlobalShortcut(KShortcut(Qt::ALT + Qt::SHIFT + Qt::Key_T));
setStandardToolBarMenuEnabled(true);
}