blob: 21e04352c4b6b88b77002147a6008e6a57cfbb53 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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);
}
|