|
|
@ -124,6 +124,8 @@ PropertiesWidget::PropertiesWidget(QWidget *parent, MainWindow* main_window, Tra |
|
|
|
editHotkeyWeb = new QShortcut(QKeySequence("F2"), listWebSeeds, 0, 0, Qt::WidgetShortcut); |
|
|
|
editHotkeyWeb = new QShortcut(QKeySequence("F2"), listWebSeeds, 0, 0, Qt::WidgetShortcut); |
|
|
|
connect(editHotkeyWeb, SIGNAL(activated()), SLOT(editWebSeed())); |
|
|
|
connect(editHotkeyWeb, SIGNAL(activated()), SLOT(editWebSeed())); |
|
|
|
connect(listWebSeeds, SIGNAL(doubleClicked(QModelIndex)), SLOT(editWebSeed())); |
|
|
|
connect(listWebSeeds, SIGNAL(doubleClicked(QModelIndex)), SLOT(editWebSeed())); |
|
|
|
|
|
|
|
deleteHotkeyWeb = new QShortcut(QKeySequence(QKeySequence::Delete), listWebSeeds, 0, 0, Qt::WidgetShortcut); |
|
|
|
|
|
|
|
connect(deleteHotkeyWeb, SIGNAL(activated()), SLOT(deleteSelectedUrlSeeds())); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
PropertiesWidget::~PropertiesWidget() { |
|
|
|
PropertiesWidget::~PropertiesWidget() { |
|
|
@ -138,6 +140,7 @@ PropertiesWidget::~PropertiesWidget() { |
|
|
|
delete m_tabBar; |
|
|
|
delete m_tabBar; |
|
|
|
delete editHotkeyFile; |
|
|
|
delete editHotkeyFile; |
|
|
|
delete editHotkeyWeb; |
|
|
|
delete editHotkeyWeb; |
|
|
|
|
|
|
|
delete deleteHotkeyWeb; |
|
|
|
qDebug() << Q_FUNC_INFO << "EXIT"; |
|
|
|
qDebug() << Q_FUNC_INFO << "EXIT"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -663,6 +666,8 @@ void PropertiesWidget::askWebSeed() { |
|
|
|
|
|
|
|
|
|
|
|
void PropertiesWidget::deleteSelectedUrlSeeds() { |
|
|
|
void PropertiesWidget::deleteSelectedUrlSeeds() { |
|
|
|
const QList<QListWidgetItem *> selectedItems = listWebSeeds->selectedItems(); |
|
|
|
const QList<QListWidgetItem *> selectedItems = listWebSeeds->selectedItems(); |
|
|
|
|
|
|
|
if (selectedItems.isEmpty()) |
|
|
|
|
|
|
|
return; |
|
|
|
bool change = false; |
|
|
|
bool change = false; |
|
|
|
foreach (const QListWidgetItem *item, selectedItems) { |
|
|
|
foreach (const QListWidgetItem *item, selectedItems) { |
|
|
|
QString url_seed = item->text(); |
|
|
|
QString url_seed = item->text(); |
|
|
@ -691,7 +696,7 @@ void PropertiesWidget::copySelectedWebSeedsToClipboard() const { |
|
|
|
|
|
|
|
|
|
|
|
void PropertiesWidget::editWebSeed() { |
|
|
|
void PropertiesWidget::editWebSeed() { |
|
|
|
const QList<QListWidgetItem *> selected_items = listWebSeeds->selectedItems(); |
|
|
|
const QList<QListWidgetItem *> selected_items = listWebSeeds->selectedItems(); |
|
|
|
if (selected_items.isEmpty()) |
|
|
|
if (selected_items.size() != 1) |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
const QListWidgetItem *selected_item = selected_items.last(); |
|
|
|
const QListWidgetItem *selected_item = selected_items.last(); |
|
|
|