CuteLogger
Fast and simple logging solution for Qt based applications
meltedserverdock.h
1 /*
2  * Copyright (c) 2012-2013 Meltytech, LLC
3  * Author: Dan Dennedy <dan@dennedy.org>
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #ifndef MVCPCONSOLEDOCK_H
20 #define MVCPCONSOLEDOCK_H
21 
22 #include <QDockWidget>
23 #include <QModelIndex>
24 #include <mvcp_remote.h>
25 #include "mvcpthread.h"
26 
27 class QConsole;
28 
29 namespace Ui {
30  class MeltedServerDock;
31 }
32 
33 class MeltedServerDock : public QDockWidget
34 {
35  Q_OBJECT
36 
37 public:
38  explicit MeltedServerDock(QWidget *parent = 0);
39  ~MeltedServerDock();
40  QAbstractItemModel* unitsModel() const;
41  QAbstractItemModel* clipsModel() const;
42  QAction* actionFastForward() const;
43  QAction* actionPause() const;
44  QAction* actionPlay() const;
45  QAction* actionRewind() const;
46  QAction* actionStop() const;
47 
48 signals:
49  void connected(MvcpThread*);
50  void connected(QString address, quint16 port);
51  void disconnected();
52  void unitActivated(quint8);
53  void unitOpened(quint8);
54  void append(QString clip, int in = -1, int out = -1);
55  void insert(QString clip, int row, int in = -1, int out = -1);
56  void positionUpdated(int position, double fps, int in, int out, int length, bool isPlaying);
57  void openLocal(QString resource);
58 
59 public slots:
60  void onAppendRequested();
61  void onInsertRequested(int row);
62 
63 private slots:
64  void on_lineEdit_returnPressed();
65  void onCommandExecuted(QString);
66  void on_connectButton_toggled(bool checked);
67  void on_unitsTableView_clicked(const QModelIndex &index);
68  void on_unitsTableView_doubleClicked(const QModelIndex &index);
69  void on_consoleButton_clicked(bool checked);
70  void onPositionUpdated(quint8 unit, int position, double fps, int in, int out, int length, bool isPlaying);
71 
72  void on_unitsTableView_customContextMenuRequested(const QPoint &pos);
73 
74  void on_actionMapClipsRoot_triggered();
75 
76  void on_menuButton_clicked();
77 
78  void on_treeView_doubleClicked(const QModelIndex &index);
79 
80 private:
81  Ui::MeltedServerDock *ui;
82  QConsole* m_console;
83  mvcp_parser m_parser;
84  MvcpThread* m_mvcp;
85  QString m_mappedClipsRoot;
86 };
87 
88 #endif // MVCPCONSOLEDOCK_H
Definition: addencodepresetdialog.h:24
Definition: mvcp_parser.h:52
Definition: qconsole.h:101