Chris@392
|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
Chris@392
|
2
|
Chris@392
|
3 /*
|
Chris@392
|
4 Sonic Visualiser
|
Chris@392
|
5 An audio file viewer and annotation editor.
|
Chris@392
|
6 Centre for Digital Music, Queen Mary, University of London.
|
Chris@392
|
7 This file copyright 2008 QMUL.
|
Chris@392
|
8
|
Chris@392
|
9 This program is free software; you can redistribute it and/or
|
Chris@392
|
10 modify it under the terms of the GNU General Public License as
|
Chris@392
|
11 published by the Free Software Foundation; either version 2 of the
|
Chris@392
|
12 License, or (at your option) any later version. See the file
|
Chris@392
|
13 COPYING included with this distribution for more information.
|
Chris@392
|
14 */
|
Chris@392
|
15
|
Chris@1272
|
16 #ifndef SV_MODEL_DATA_TABLE_DIALOG_H
|
Chris@1272
|
17 #define SV_MODEL_DATA_TABLE_DIALOG_H
|
Chris@392
|
18
|
Chris@396
|
19 #include <QMainWindow>
|
Chris@392
|
20
|
Chris@908
|
21 #include "base/BaseTypes.h"
|
Chris@908
|
22
|
Chris@1479
|
23 #include "data/model/Model.h"
|
Chris@1479
|
24
|
Chris@392
|
25 class ModelDataTableModel;
|
Chris@392
|
26 class QTableView;
|
Chris@393
|
27 class QModelIndex;
|
Chris@393
|
28 class Command;
|
Chris@404
|
29 class QToolBar;
|
Chris@552
|
30 class QLineEdit;
|
Chris@392
|
31
|
Chris@396
|
32 class ModelDataTableDialog : public QMainWindow
|
Chris@392
|
33 {
|
Chris@392
|
34 Q_OBJECT
|
Chris@392
|
35
|
Chris@392
|
36 public:
|
Chris@1479
|
37 ModelDataTableDialog(ModelId tabularModelId,
|
Chris@404
|
38 QString title, QWidget *parent =0);
|
Chris@392
|
39 ~ModelDataTableDialog();
|
Chris@392
|
40
|
Chris@404
|
41 QToolBar *getPlayToolbar() { return m_playToolbar; }
|
Chris@404
|
42
|
Chris@394
|
43 signals:
|
Chris@908
|
44 void scrollToFrame(sv_frame_t frame);
|
Chris@394
|
45
|
Chris@393
|
46 public slots:
|
Chris@908
|
47 void userScrolledToFrame(sv_frame_t frame);
|
Chris@908
|
48 void playbackScrolledToFrame(sv_frame_t frame);
|
Chris@400
|
49 void addCommand(Command *);
|
Chris@393
|
50
|
Chris@393
|
51 protected slots:
|
Chris@393
|
52 void viewClicked(const QModelIndex &);
|
Chris@393
|
53 void viewPressed(const QModelIndex &);
|
Chris@400
|
54 void currentChanged(const QModelIndex &, const QModelIndex &);
|
Chris@401
|
55 void currentChangedThroughResort(const QModelIndex &);
|
Chris@552
|
56 void searchTextChanged(const QString &);
|
Chris@552
|
57 void searchRepeated();
|
Chris@399
|
58
|
Chris@399
|
59 void insertRow();
|
Chris@400
|
60 void deleteRows();
|
Chris@399
|
61 void editRow();
|
Chris@402
|
62 void togglePlayTracking();
|
Chris@393
|
63
|
Chris@428
|
64 void modelRemoved();
|
Chris@428
|
65
|
Chris@392
|
66 protected:
|
Chris@401
|
67 void makeCurrent(int row);
|
Chris@392
|
68 ModelDataTableModel *m_table;
|
Chris@404
|
69 QToolBar *m_playToolbar;
|
Chris@392
|
70 QTableView *m_tableView;
|
Chris@552
|
71 QLineEdit *m_find;
|
Chris@400
|
72 int m_currentRow;
|
Chris@401
|
73 bool m_trackPlayback;
|
Chris@392
|
74 };
|
Chris@392
|
75
|
Chris@392
|
76 #endif
|