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