From 2213d00d25b6b3127e33a0df63cae54d29748d06 Mon Sep 17 00:00:00 2001 From: Arno Date: Tue, 3 Apr 2018 06:25:48 +0200 Subject: FSWidget: add configure action --- fswidget.cpp | 4 ++++ fswidget.h | 1 + shemov.cpp | 2 ++ 3 files changed, 7 insertions(+) diff --git a/fswidget.cpp b/fswidget.cpp index cdeb839..117193e 100644 --- a/fswidget.cpp +++ b/fswidget.cpp @@ -75,6 +75,10 @@ void FSWidget::setupWidget(){ QAction *previewA = new QAction(QIcon(":/snapshot.png"), tr("Preview..."), this); connect(previewA, &QAction::triggered, this, &FSWidget::preview); toolbar->addAction(previewA); + QAction *configA = new QAction(QIcon(":/chastity_belt.png"), tr("Configure"), this); + connect(configA, &QAction::triggered, this, &FSWidget::needConfig); + toolbar->addSeparator(); + toolbar->addAction(configA); QAction *playSelectedA = new QAction(QIcon(":/spreadingpants.png"), tr("Play selected"), this); connect(playSelectedA, &QAction::triggered, [=] { playSelected(1, QString()); }); playSelectedA->setShortcut(Qt::Key_Return); diff --git a/fswidget.h b/fswidget.h index 9ff4fd2..351dc3f 100644 --- a/fswidget.h +++ b/fswidget.h @@ -49,6 +49,7 @@ class FSWidget : public QWidget { void message(QString msg); void selectionChanged(int count, qint64 size, qint64 duration); void needRefreshFs(); + void needConfig(); private: void setupWidget(); diff --git a/shemov.cpp b/shemov.cpp index 539a90a..50a0c17 100644 --- a/shemov.cpp +++ b/shemov.cpp @@ -71,6 +71,7 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla setDuration(duration, false); }); connect(mFileWidget, &FSWidget::needRefreshFs, this, &SheMov::setFsFree); + connect(mFileWidget, &FSWidget::needConfig, this, &SheMov::configure); //experimental splash.showMessage(tr("Creating Movie archive..."), Qt::AlignHCenter, Qt::yellow); @@ -149,6 +150,7 @@ SheMov::SheMov(QWidget *parent, Qt::WindowFlags flags) : QMainWindow(parent, fla connect(this, &SheMov::configChanged, mFSWidget->fileView(), &FileView::readConfig); connect(this, &SheMov::configChanged, picViewer, &PictureViewer2::readSettings); connect(this, &SheMov::configChanged, c->archiveTreeModel(), &ArchiveModel::readConfig); + connect(this, &SheMov::configChanged, mFileWidget, &FSWidget::readSettings); connect(mFSWidget, &FilesystemWidget::mounted, this, &SheMov::checkMount); QWidget *centralWidget = new QWidget; -- cgit v1.2.3-70-g09d2