summaryrefslogtreecommitdiffstats
path: root/fswidget.cpp
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2018-03-30 18:18:06 +0200
committerArno <arno@disconnect.de>2018-03-30 18:18:06 +0200
commit8e685d4ab524da43bae639274e12221fc28fc847 (patch)
treef1a937cc2fba101d5302c4f9c6819ca84b740ab5 /fswidget.cpp
parente932aafaa203f70c9be29879fc17bde9d2ac53c2 (diff)
downloadSheMov-8e685d4ab524da43bae639274e12221fc28fc847.tar.gz
SheMov-8e685d4ab524da43bae639274e12221fc28fc847.tar.bz2
SheMov-8e685d4ab524da43bae639274e12221fc28fc847.zip
Basic layout for new FSWidget
Just the layout, does absolutely nothing yet.
Diffstat (limited to 'fswidget.cpp')
-rw-r--r--fswidget.cpp63
1 files changed, 63 insertions, 0 deletions
diff --git a/fswidget.cpp b/fswidget.cpp
new file mode 100644
index 0000000..21e0435
--- /dev/null
+++ b/fswidget.cpp
@@ -0,0 +1,63 @@
+#include <QToolBar>
+#include <QLabel>
+#include <QComboBox>
+#include <QHBoxLayout>
+#include <QVBoxLayout>
+#include <QTreeView>
+
+#include "fswidget.h"
+
+FSWidget::FSWidget(QWidget *parent) : QWidget(parent) {
+ setupWidget();
+}
+
+void FSWidget::setupWidget(){
+ QToolBar *toolbar = new QToolBar;
+ QPixmap buttplug(":/butt_plug.png");
+ QMatrix rotatematrix;
+ rotatematrix.rotate(90);
+ QIcon buttplugRight(buttplug.transformed(rotatematrix));
+ rotatematrix.rotate(-180);
+ QIcon buttplugLeft(buttplug.transformed(rotatematrix));
+ QAction *backA = new QAction(buttplugLeft, tr("Prev. dir"), this);
+ toolbar->addAction(backA);
+ QAction *forwardA = new QAction(buttplugRight, tr("Next dir"), this);
+ toolbar->addAction(forwardA);
+
+ QLabel *dirL = new QLabel(tr("Dir"));
+ mDirCB = new QComboBox;
+ QAction *addDirA = new QAction(QIcon(":/gaping_ass.png"), tr("Add dir..."), this);
+ QAction *removeDirA = new QAction(QIcon(":/hourglass_figure.png"), tr("Remove dir."), this);
+ QToolBar *dirTB = new QToolBar;
+ dirTB->addAction(addDirA);
+ dirTB->addAction(removeDirA);
+
+ QLabel *filterL = new QLabel(tr("Filter"));
+ mFilterCB = new QComboBox;
+ QAction *addFilterA = new QAction(QIcon(":/gaping_ass.png"), tr("Add filter..."), this);
+ QAction *removeFilterA = new QAction(QIcon(":/hourglass_figure.png"), tr("Remove filter"), this);
+ QToolBar *filterTB = new QToolBar;
+ filterTB->addAction(addFilterA);
+ filterTB->addAction(removeFilterA);
+
+ QHBoxLayout *topWL = new QHBoxLayout;
+ topWL->addWidget(dirL);
+ topWL->addWidget(mDirCB);
+ topWL->addWidget(dirTB);
+ topWL->addWidget(filterL);
+ topWL->addWidget(mFilterCB);
+ topWL->addWidget(filterTB);
+ topWL->addWidget(toolbar);
+ topWL->addStretch();
+
+ mFileView = new QTreeView;
+ mFileView->setSortingEnabled(true);
+ mFileView->setUniformRowHeights(true);
+ mFileView->setSelectionBehavior(QAbstractItemView::SelectRows);
+ mFileView->setSelectionMode(QAbstractItemView::ExtendedSelection);
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addLayout(topWL);
+ mainLayout->addWidget(mFileView);
+ setLayout(mainLayout);
+}