mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-27 06:54:20 +00:00
add hotkeys for Trackerlist Peerlist etc.
This commit is contained in:
parent
0fdd3e23ff
commit
c87cdaea23
@ -44,29 +44,34 @@ PropTabBar::PropTabBar(QWidget *parent) :
|
|||||||
m_btnGroup = new QButtonGroup(this);
|
m_btnGroup = new QButtonGroup(this);
|
||||||
// General tab
|
// General tab
|
||||||
QPushButton *main_infos_button = new QPushButton(GuiIconProvider::instance()->getIcon("document-properties"), tr("General"), parent);
|
QPushButton *main_infos_button = new QPushButton(GuiIconProvider::instance()->getIcon("document-properties"), tr("General"), parent);
|
||||||
main_infos_button->setShortcut(QKeySequence(QString::fromUtf8("Alt+P")));
|
main_infos_button->setShortcut(QKeySequence(Qt::ALT + Qt::Key_G));
|
||||||
addWidget(main_infos_button);
|
addWidget(main_infos_button);
|
||||||
m_btnGroup->addButton(main_infos_button, MAIN_TAB);
|
m_btnGroup->addButton(main_infos_button, MAIN_TAB);
|
||||||
// Trackers tab
|
// Trackers tab
|
||||||
QPushButton *trackers_button = new QPushButton(GuiIconProvider::instance()->getIcon("network-server"), tr("Trackers"), parent);
|
QPushButton *trackers_button = new QPushButton(GuiIconProvider::instance()->getIcon("network-server"), tr("Trackers"), parent);
|
||||||
|
trackers_button->setShortcut(QKeySequence(Qt::ALT + Qt::Key_C));
|
||||||
addWidget(trackers_button);
|
addWidget(trackers_button);
|
||||||
m_btnGroup->addButton(trackers_button, TRACKERS_TAB);
|
m_btnGroup->addButton(trackers_button, TRACKERS_TAB);
|
||||||
// Peers tab
|
// Peers tab
|
||||||
QPushButton *peers_button = new QPushButton(GuiIconProvider::instance()->getIcon("edit-find-user"), tr("Peers"), parent);
|
QPushButton *peers_button = new QPushButton(GuiIconProvider::instance()->getIcon("edit-find-user"), tr("Peers"), parent);
|
||||||
|
peers_button->setShortcut(QKeySequence(Qt::ALT + Qt::Key_R));
|
||||||
addWidget(peers_button);
|
addWidget(peers_button);
|
||||||
m_btnGroup->addButton(peers_button, PEERS_TAB);
|
m_btnGroup->addButton(peers_button, PEERS_TAB);
|
||||||
// URL seeds tab
|
// URL seeds tab
|
||||||
QPushButton *urlseeds_button = new QPushButton(GuiIconProvider::instance()->getIcon("network-server"), tr("HTTP Sources"), parent);
|
QPushButton *urlseeds_button = new QPushButton(GuiIconProvider::instance()->getIcon("network-server"), tr("HTTP Sources"), parent);
|
||||||
|
urlseeds_button->setShortcut(QKeySequence(Qt::ALT + Qt::Key_B));
|
||||||
addWidget(urlseeds_button);
|
addWidget(urlseeds_button);
|
||||||
m_btnGroup->addButton(urlseeds_button, URLSEEDS_TAB);
|
m_btnGroup->addButton(urlseeds_button, URLSEEDS_TAB);
|
||||||
// Files tab
|
// Files tab
|
||||||
QPushButton *files_button = new QPushButton(GuiIconProvider::instance()->getIcon("inode-directory"), tr("Content"), parent);
|
QPushButton *files_button = new QPushButton(GuiIconProvider::instance()->getIcon("inode-directory"), tr("Content"), parent);
|
||||||
|
files_button->setShortcut(QKeySequence(Qt::ALT + Qt::Key_Z));
|
||||||
addWidget(files_button);
|
addWidget(files_button);
|
||||||
m_btnGroup->addButton(files_button, FILES_TAB);
|
m_btnGroup->addButton(files_button, FILES_TAB);
|
||||||
// Spacer
|
// Spacer
|
||||||
addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Fixed));
|
addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Fixed));
|
||||||
// Speed tab
|
// Speed tab
|
||||||
QPushButton *speed_button = new QPushButton(GuiIconProvider::instance()->getIcon("office-chart-line"), tr("Speed"), parent);
|
QPushButton *speed_button = new QPushButton(GuiIconProvider::instance()->getIcon("office-chart-line"), tr("Speed"), parent);
|
||||||
|
speed_button->setShortcut(QKeySequence(Qt::ALT + Qt::Key_D));
|
||||||
addWidget(speed_button);
|
addWidget(speed_button);
|
||||||
m_btnGroup->addButton(speed_button, SPEED_TAB);
|
m_btnGroup->addButton(speed_button, SPEED_TAB);
|
||||||
// SIGNAL/SLOT
|
// SIGNAL/SLOT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user