diff options
-rw-r--r-- | fswidget.cpp | 8 | ||||
-rw-r--r-- | fswidget.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/fswidget.cpp b/fswidget.cpp index ffc001a..1932c10 100644 --- a/fswidget.cpp +++ b/fswidget.cpp @@ -38,6 +38,10 @@ void FSWidget::setupWidget(){ QAction *forwardA = new QAction(buttplugRight, tr("Next dir"), this); connect(forwardA, &QAction::triggered, [=] { advanceDir(1); }); toolbar->addAction(forwardA); + QAction *refreshA = new QAction(QIcon(":/refresh.png"), tr("Refresh"), this); + connect(refreshA, &QAction::triggered, this, &FSWidget::refresh); + toolbar->addSeparator(); + toolbar->addAction(refreshA); QIcon plusIcon = Helper::icon(QColor(255,85,255), '+'); QIcon minusIcon = Helper::icon(QColor(255,85,255), '-'); @@ -159,6 +163,10 @@ void FSWidget::insertItem(QComboBox *cb, const QString &text){ cb->insertItem(idx, text); } +void FSWidget::refresh(){ + gatherData(mDirCB->currentText()); +} + void FSWidget::removeItem(QComboBox *cb){ int toRemove = cb->findText(cb->currentText()); if(toRemove != -1){ @@ -18,6 +18,7 @@ class FSWidget : public QWidget { public slots: void readSettings(); void writeSettings(); + void refresh(); private slots: void insertItem(QComboBox *cb, const QString &text); |