mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-30 15:41:53 +03:00
change all existing shortcuts to use Qt::Keys
This commit is contained in:
parent
c87cdaea23
commit
2bb2d3fc89
8 changed files with 34 additions and 34 deletions
|
@ -117,7 +117,7 @@ AddNewTorrentDialog::AddNewTorrentDialog(QWidget *parent)
|
|||
// Signal / slots
|
||||
connect(ui->adv_button, SIGNAL(clicked(bool)), SLOT(showAdvancedSettings(bool)));
|
||||
connect(ui->doNotDeleteTorrentCheckBox, SIGNAL(clicked(bool)), SLOT(doNotDeleteTorrentClicked(bool)));
|
||||
editHotkey = new QShortcut(QKeySequence("F2"), ui->contentTreeView, 0, 0, Qt::WidgetShortcut);
|
||||
editHotkey = new QShortcut(Qt::Key_F2, ui->contentTreeView, 0, 0, Qt::WidgetShortcut);
|
||||
connect(editHotkey, SIGNAL(activated()), SLOT(renameSelectedFile()));
|
||||
connect(ui->contentTreeView, SIGNAL(doubleClicked(QModelIndex)), SLOT(renameSelectedFile()));
|
||||
|
||||
|
|
|
@ -758,33 +758,33 @@ void MainWindow::createKeyboardShortcuts()
|
|||
{
|
||||
m_ui->actionCreateTorrent->setShortcut(QKeySequence::New);
|
||||
m_ui->actionOpen->setShortcut(QKeySequence::Open);
|
||||
m_ui->actionDownloadFromURL->setShortcut(QKeySequence("Ctrl+Shift+O"));
|
||||
m_ui->actionExit->setShortcut(QKeySequence("Ctrl+Q"));
|
||||
m_ui->actionDownloadFromURL->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_O);
|
||||
m_ui->actionExit->setShortcut(Qt::CTRL + Qt::Key_Q);
|
||||
|
||||
QShortcut *switchTransferShortcut = new QShortcut(QKeySequence("Alt+1"), this);
|
||||
QShortcut *switchTransferShortcut = new QShortcut(Qt::ALT + Qt::Key_1, this);
|
||||
connect(switchTransferShortcut, SIGNAL(activated()), this, SLOT(displayTransferTab()));
|
||||
QShortcut *switchSearchShortcut = new QShortcut(QKeySequence("Alt+2"), this);
|
||||
QShortcut *switchSearchShortcut = new QShortcut(Qt::ALT + Qt::Key_2, this);
|
||||
connect(switchSearchShortcut, SIGNAL(activated()), this, SLOT(displaySearchTab()));
|
||||
QShortcut *switchRSSShortcut = new QShortcut(QKeySequence("Alt+3"), this);
|
||||
QShortcut *switchRSSShortcut = new QShortcut(Qt::ALT + Qt::Key_3, this);
|
||||
connect(switchRSSShortcut, SIGNAL(activated()), this, SLOT(displayRSSTab()));
|
||||
QShortcut *switchExecutionLogShortcut = new QShortcut(QKeySequence(Qt::ALT + Qt::Key_4), this);
|
||||
QShortcut *switchExecutionLogShortcut = new QShortcut(Qt::ALT + Qt::Key_4, this);
|
||||
connect(switchExecutionLogShortcut, SIGNAL(activated()), this, SLOT(displayExecutionLogTab()));
|
||||
|
||||
QShortcut *switchSearchFilterShortcut = new QShortcut(QKeySequence::Find, this);
|
||||
connect(switchSearchFilterShortcut, SIGNAL(activated()), this, SLOT(focusSearchFilter()));
|
||||
|
||||
m_ui->actionDocumentation->setShortcut(QKeySequence::HelpContents);
|
||||
m_ui->actionOptions->setShortcut(QKeySequence("Alt+O"));
|
||||
m_ui->actionStart->setShortcut(QKeySequence("Ctrl+S"));
|
||||
m_ui->actionStartAll->setShortcut(QKeySequence("Ctrl+Shift+S"));
|
||||
m_ui->actionPause->setShortcut(QKeySequence("Ctrl+P"));
|
||||
m_ui->actionPauseAll->setShortcut(QKeySequence("Ctrl+Shift+P"));
|
||||
m_ui->actionBottomPriority->setShortcut(QKeySequence("Ctrl+Shift+-"));
|
||||
m_ui->actionDecreasePriority->setShortcut(QKeySequence("Ctrl+-"));
|
||||
m_ui->actionIncreasePriority->setShortcut(QKeySequence("Ctrl++"));
|
||||
m_ui->actionTopPriority->setShortcut(QKeySequence("Ctrl+Shift++"));
|
||||
m_ui->actionOptions->setShortcut(Qt::ALT + Qt::Key_O);
|
||||
m_ui->actionStart->setShortcut(Qt::CTRL + Qt::Key_S);
|
||||
m_ui->actionStartAll->setShortcut(Qt::CTRL + Qt::SHIFT +Qt::Key_S);
|
||||
m_ui->actionPause->setShortcut(Qt::CTRL + Qt::Key_P);
|
||||
m_ui->actionPauseAll->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_P);
|
||||
m_ui->actionBottomPriority->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_Minus);
|
||||
m_ui->actionDecreasePriority->setShortcut(Qt::CTRL + Qt::Key_Minus);
|
||||
m_ui->actionIncreasePriority->setShortcut(Qt::CTRL + Qt::Key_Plus);
|
||||
m_ui->actionTopPriority->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_Plus);
|
||||
#ifdef Q_OS_MAC
|
||||
m_ui->actionMinimize->setShortcut(QKeySequence("Ctrl+M"));
|
||||
m_ui->actionMinimize->setShortcut(Qt::CTRL + Qt::Key_M);
|
||||
addAction(m_ui->actionMinimize);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -159,14 +159,14 @@ PropertiesWidget::PropertiesWidget(QWidget *parent, MainWindow *main_window, Tra
|
|||
refreshTimer = new QTimer(this);
|
||||
connect(refreshTimer, SIGNAL(timeout()), this, SLOT(loadDynamicData()));
|
||||
refreshTimer->start(3000); // 3sec
|
||||
editHotkeyFile = new QShortcut(QKeySequence("F2"), filesList, 0, 0, Qt::WidgetShortcut);
|
||||
editHotkeyFile = new QShortcut(Qt::Key_F2, filesList, 0, 0, Qt::WidgetShortcut);
|
||||
connect(editHotkeyFile, SIGNAL(activated()), SLOT(renameSelectedFile()));
|
||||
editHotkeyWeb = new QShortcut(QKeySequence("F2"), listWebSeeds, 0, 0, Qt::WidgetShortcut);
|
||||
editHotkeyWeb = new QShortcut(Qt::Key_F2, listWebSeeds, 0, 0, Qt::WidgetShortcut);
|
||||
connect(editHotkeyWeb, SIGNAL(activated()), SLOT(editWebSeed()));
|
||||
connect(listWebSeeds, SIGNAL(doubleClicked(QModelIndex)), SLOT(editWebSeed()));
|
||||
deleteHotkeyWeb = new QShortcut(QKeySequence::Delete, listWebSeeds, 0, 0, Qt::WidgetShortcut);
|
||||
connect(deleteHotkeyWeb, SIGNAL(activated()), SLOT(deleteSelectedUrlSeeds()));
|
||||
openHotkeyFile = new QShortcut(QKeySequence("Return"), filesList, 0, 0, Qt::WidgetShortcut);
|
||||
openHotkeyFile = new QShortcut(Qt::Key_Return, filesList, 0, 0, Qt::WidgetShortcut);
|
||||
connect(openHotkeyFile, SIGNAL(activated()), SLOT(openSelectedFile()));
|
||||
}
|
||||
|
||||
|
|
|
@ -44,34 +44,34 @@ PropTabBar::PropTabBar(QWidget *parent) :
|
|||
m_btnGroup = new QButtonGroup(this);
|
||||
// General tab
|
||||
QPushButton *main_infos_button = new QPushButton(GuiIconProvider::instance()->getIcon("document-properties"), tr("General"), parent);
|
||||
main_infos_button->setShortcut(QKeySequence(Qt::ALT + Qt::Key_G));
|
||||
main_infos_button->setShortcut(Qt::ALT + Qt::Key_G);
|
||||
addWidget(main_infos_button);
|
||||
m_btnGroup->addButton(main_infos_button, MAIN_TAB);
|
||||
// Trackers tab
|
||||
QPushButton *trackers_button = new QPushButton(GuiIconProvider::instance()->getIcon("network-server"), tr("Trackers"), parent);
|
||||
trackers_button->setShortcut(QKeySequence(Qt::ALT + Qt::Key_C));
|
||||
trackers_button->setShortcut(Qt::ALT + Qt::Key_C);
|
||||
addWidget(trackers_button);
|
||||
m_btnGroup->addButton(trackers_button, TRACKERS_TAB);
|
||||
// Peers tab
|
||||
QPushButton *peers_button = new QPushButton(GuiIconProvider::instance()->getIcon("edit-find-user"), tr("Peers"), parent);
|
||||
peers_button->setShortcut(QKeySequence(Qt::ALT + Qt::Key_R));
|
||||
peers_button->setShortcut(Qt::ALT + Qt::Key_R);
|
||||
addWidget(peers_button);
|
||||
m_btnGroup->addButton(peers_button, PEERS_TAB);
|
||||
// URL seeds tab
|
||||
QPushButton *urlseeds_button = new QPushButton(GuiIconProvider::instance()->getIcon("network-server"), tr("HTTP Sources"), parent);
|
||||
urlseeds_button->setShortcut(QKeySequence(Qt::ALT + Qt::Key_B));
|
||||
urlseeds_button->setShortcut(Qt::ALT + Qt::Key_B);
|
||||
addWidget(urlseeds_button);
|
||||
m_btnGroup->addButton(urlseeds_button, URLSEEDS_TAB);
|
||||
// Files tab
|
||||
QPushButton *files_button = new QPushButton(GuiIconProvider::instance()->getIcon("inode-directory"), tr("Content"), parent);
|
||||
files_button->setShortcut(QKeySequence(Qt::ALT + Qt::Key_Z));
|
||||
files_button->setShortcut(Qt::ALT + Qt::Key_Z);
|
||||
addWidget(files_button);
|
||||
m_btnGroup->addButton(files_button, FILES_TAB);
|
||||
// Spacer
|
||||
addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Fixed));
|
||||
// Speed tab
|
||||
QPushButton *speed_button = new QPushButton(GuiIconProvider::instance()->getIcon("office-chart-line"), tr("Speed"), parent);
|
||||
speed_button->setShortcut(QKeySequence(Qt::ALT + Qt::Key_D));
|
||||
speed_button->setShortcut(Qt::ALT + Qt::Key_D);
|
||||
addWidget(speed_button);
|
||||
m_btnGroup->addButton(speed_button, SPEED_TAB);
|
||||
// SIGNAL/SLOT
|
||||
|
|
|
@ -83,9 +83,9 @@ TrackerList::TrackerList(PropertiesWidget *properties): QTreeWidget(), propertie
|
|||
lsd_item = new QTreeWidgetItem(QStringList() << "" << "** [LSD] **" << "" << "" << "0" << "0" << "0");
|
||||
insertTopLevelItem(2, lsd_item);
|
||||
setRowColor(2, QColor("grey"));
|
||||
editHotkey = new QShortcut(QKeySequence("F2"), this, SLOT(editSelectedTracker()), 0, Qt::WidgetShortcut);
|
||||
editHotkey = new QShortcut(Qt::Key_F2, this, SLOT(editSelectedTracker()), 0, Qt::WidgetShortcut);
|
||||
connect(this, SIGNAL(doubleClicked(QModelIndex)), SLOT(editSelectedTracker()));
|
||||
deleteHotkey = new QShortcut(QKeySequence(QKeySequence::Delete), this, SLOT(deleteSelectedTrackers()), 0, Qt::WidgetShortcut);
|
||||
deleteHotkey = new QShortcut(QKeySequence::Delete, this, SLOT(deleteSelectedTrackers()), 0, Qt::WidgetShortcut);
|
||||
copyHotkey = new QShortcut(QKeySequence::Copy, this, SLOT(copyTrackerUrl()), 0, Qt::WidgetShortcut);
|
||||
|
||||
#ifdef QBT_USES_QT5
|
||||
|
|
|
@ -114,7 +114,7 @@ AutomatedRssDownloader::AutomatedRssDownloader(const QWeakPointer<Rss::Manager>
|
|||
Q_ASSERT(ok);
|
||||
ok = connect(ui->lineEFilter, SIGNAL(textEdited(QString)), SLOT(updateMatchingArticles()));
|
||||
Q_ASSERT(ok);
|
||||
editHotkey = new QShortcut(QKeySequence("F2"), ui->listRules, 0, 0, Qt::WidgetShortcut);
|
||||
editHotkey = new QShortcut(Qt::Key_F2, ui->listRules, 0, 0, Qt::WidgetShortcut);
|
||||
ok = connect(editHotkey, SIGNAL(activated()), SLOT(renameSelectedRule()));
|
||||
Q_ASSERT(ok);
|
||||
ok = connect(ui->listRules, SIGNAL(doubleClicked(QModelIndex)), SLOT(renameSelectedRule()));
|
||||
|
|
|
@ -706,7 +706,7 @@ RSSImp::RSSImp(QWidget *parent)
|
|||
|
||||
m_feedList = new FeedListWidget(splitterSide, m_rssManager);
|
||||
splitterSide->insertWidget(0, m_feedList);
|
||||
editHotkey = new QShortcut(QKeySequence("F2"), m_feedList, 0, 0, Qt::WidgetShortcut);
|
||||
editHotkey = new QShortcut(Qt::Key_F2, m_feedList, 0, 0, Qt::WidgetShortcut);
|
||||
connect(editHotkey, SIGNAL(activated()), SLOT(renameSelectedRssFile()));
|
||||
connect(m_feedList, SIGNAL(doubleClicked(QModelIndex)), SLOT(renameSelectedRssFile()));
|
||||
deleteHotkey = new QShortcut(QKeySequence::Delete, m_feedList, 0, 0, Qt::WidgetShortcut);
|
||||
|
|
|
@ -155,11 +155,11 @@ TransferListWidget::TransferListWidget(QWidget *parent, MainWindow *main_window)
|
|||
connect(header(), SIGNAL(sectionResized(int, int, int)), this, SLOT(saveSettings()));
|
||||
connect(header(), SIGNAL(sortIndicatorChanged(int, Qt::SortOrder)), this, SLOT(saveSettings()));
|
||||
|
||||
editHotkey = new QShortcut(QKeySequence("F2"), this, SLOT(renameSelectedTorrent()), 0, Qt::WidgetShortcut);
|
||||
editHotkey = new QShortcut(Qt::Key_F2, this, SLOT(renameSelectedTorrent()), 0, Qt::WidgetShortcut);
|
||||
deleteHotkey = new QShortcut(QKeySequence::Delete, this, SLOT(softDeleteSelectedTorrents()), 0, Qt::WidgetShortcut);
|
||||
permDeleteHotkey = new QShortcut(QKeySequence("Shift+Delete"), this, SLOT(permDeleteSelectedTorrents()), 0, Qt::WidgetShortcut);
|
||||
doubleClickHotkey = new QShortcut(QKeySequence(Qt::Key_Return), this, SLOT(torrentDoubleClicked()), 0, Qt::WidgetShortcut);
|
||||
recheckHotkey = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_R), this, SLOT(recheckSelectedTorrents()), 0, Qt::WidgetShortcut);
|
||||
permDeleteHotkey = new QShortcut(Qt::SHIFT + Qt::Key_Delete, this, SLOT(permDeleteSelectedTorrents()), 0, Qt::WidgetShortcut);
|
||||
doubleClickHotkey = new QShortcut(Qt::Key_Return, this, SLOT(torrentDoubleClicked()), 0, Qt::WidgetShortcut);
|
||||
recheckHotkey = new QShortcut(Qt::CTRL + Qt::Key_R, this, SLOT(recheckSelectedTorrents()), 0, Qt::WidgetShortcut);
|
||||
|
||||
#ifdef QBT_USES_QT5
|
||||
// This hack fixes reordering of first column with Qt5.
|
||||
|
|
Loading…
Reference in a new issue