Debian Codegraph @

src/collectiontree.h

raw symbols SCIP
1 /*
2 Copyright (C) 2005-2014 Mario Stephan <[email protected]>
3
4 This library is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as published
6 by the Free Software Foundation; either version 2.1 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18 #ifndef COLLVIEW_H
19 #define COLLVIEW_H
20
21 #include <QTreeWidget>
22 #include "collectiondb.h"
23 #include "collectiontreeitem.h"
24 #include "track.h"
25
26 class QMouseEvent;
27
28 class CollectionTree : public QTreeWidget
29 {
30 Q_OBJECT
31 public:
32 explicit CollectionTree(QWidget *parent = 0);
33 ~CollectionTree();
34
35 QString filter();
36 enum modeType { MODENONE, MODEYEAR, MODEGENRE };
37 modeType treeMode;
38
39 Q_SIGNALS:
40 void selectionChanged(QList<Track*>);
41 void wantLoad(QList<Track*>, QString);
42 void rescan();
43
44 public slots:
45 void on_currentItemChanged( QTreeWidgetItem* item );
46 void on_itemExpanded( QTreeWidgetItem* item );
47 void showContextMenu(QTreeWidgetItem *, int );
48 void triggerRandomSelection();
49 void asynchronTriggerRandomSelection();
50 void setFilter( QString filter );
51 void createTrunk();
52 void onRescanTriggered();
53 void onLoad1Triggered();
54 void onLoad2Triggered();
55
56
57 private:
58 class CollectionTreePrivate * p;
59
60 void mousePressEvent(QMouseEvent *event);
61 void mouseMoveEvent(QMouseEvent *event);
62 void resizeEvent(QResizeEvent *);
63 void performDrag();
64 QPoint startPos;
65 bool openContext;
66 bool m_dragLocked;
67 void showTrackInfo( Track* mb );
68 void asynchronCurrentItemChanged( QTreeWidgetItem* item );
69
70 };
71
72 #endif // COLLVIEW_H