diff options
author | Arno <arno@disconnect.de> | 2016-09-05 02:57:54 +0200 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2016-09-05 02:57:54 +0200 |
commit | 2e65f581c67d75a2355de4c3906c0d862e0a9ab0 (patch) | |
tree | c13885aedde18c80155e41771aafbade6079efc3 /torrentdisplay.cpp | |
parent | 31847fb5125a60d8f54853f96205836790271ca3 (diff) | |
download | ShemovCleaner-2e65f581c67d75a2355de4c3906c0d862e0a9ab0.tar.gz ShemovCleaner-2e65f581c67d75a2355de4c3906c0d862e0a9ab0.tar.bz2 ShemovCleaner-2e65f581c67d75a2355de4c3906c0d862e0a9ab0.zip |
Make actions local
Define actions in their respective Widgets instead of MainWindow and fix
the menus and toolbars accordingly.
Diffstat (limited to 'torrentdisplay.cpp')
-rw-r--r-- | torrentdisplay.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/torrentdisplay.cpp b/torrentdisplay.cpp index 3a1664b..58df338 100644 --- a/torrentdisplay.cpp +++ b/torrentdisplay.cpp @@ -13,6 +13,7 @@ #include <QApplication> #include <QMenu> #include <QContextMenuEvent> +#include <QAction> #include "torrentdisplay.h" @@ -81,6 +82,12 @@ TorrentDisplay::TorrentDisplay(QWidget *parent, Qt::WindowFlags f) : QDialog(par mainLayout->addLayout(buttonLayout); setLayout(mainLayout); setWindowTitle(tr("Torrent Info")); + + //actions + QAction *copyFnToClip = new QAction(QIcon(":/edit-copy.png"), tr("Filename to Clip"), this); + copyFnToClip->setShortcut(tr("CTRL+C")); + connect(copyFnToClip, SIGNAL(triggered()), this, SLOT(copyToClipboard())); + addActions(QList<QAction*>() << copyFnToClip); } void TorrentDisplay::setData(const QList<QVariant> data, const QString &filename) { |