summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2018-03-31 10:13:12 +0200
committerArno <arno@disconnect.de>2018-03-31 10:13:12 +0200
commit3fac72595be7f86a65933cdf9928857353040c2b (patch)
tree4dd40a19cdd6f65253c30abbe8d2b59fbc0d3b92
parente76dc9ee93d5e4be08a2b37fd0f13565e5290d87 (diff)
downloadSheMov-3fac72595be7f86a65933cdf9928857353040c2b.tar.gz
SheMov-3fac72595be7f86a65933cdf9928857353040c2b.tar.bz2
SheMov-3fac72595be7f86a65933cdf9928857353040c2b.zip
Add refresh to FSWidget
-rw-r--r--fswidget.cpp8
-rw-r--r--fswidget.h1
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){
diff --git a/fswidget.h b/fswidget.h
index 0b977ff..7a6104d 100644
--- a/fswidget.h
+++ b/fswidget.h
@@ -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);