CuteLogger
Fast and simple logging solution for Qt based applications
filtersdock.h
1 /*
2  * Copyright (c) 2013-2014 Meltytech, LLC
3  * Author: Dan Dennedy <dan@dennedy.org>
4  * Author: Brian Matherly <code@brianmatherly.com>
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef FILTERSDOCK_H
21 #define FILTERSDOCK_H
22 
23 #include <QDockWidget>
24 #include <QObject>
25 #include <QQuickView>
26 #include <QQuickWidget>
27 
28 class QmlFilter;
29 class QmlMetadata;
30 class MetadataModel;
31 class AttachedFiltersModel;
32 
33 class FiltersDock : public QDockWidget
34 {
35  Q_OBJECT
36 
37 public:
38  explicit FiltersDock(MetadataModel* metadataModel, AttachedFiltersModel* attachedModel, QWidget *parent = 0);
39 
40 signals:
41  void currentFilterRequested(int attachedIndex);
42  void changed();
43 
44 public slots:
45  void clearCurrentFilter();
46  void setCurrentFilter(QmlFilter* filter, QmlMetadata* meta, int index);
47  void setFadeInDuration(int duration);
48  void setFadeOutDuration(int duration);
49 
50 protected:
51  bool event(QEvent *event);
52 
53 private slots:
54  void resetQview();
55 
56 private:
57  QQuickWidget m_qview;
58 };
59 
60 #endif // FILTERSDOCK_H