svgui  1.9
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 _MODEL_DATA_TABLE_DIALOG_H_
17 #define _MODEL_DATA_TABLE_DIALOG_H_
18 
19 #include <QMainWindow>
20 
21 class TabularModel;
22 class ModelDataTableModel;
23 class QTableView;
24 class QModelIndex;
25 class Command;
26 class QToolBar;
27 class QLineEdit;
28 
29 class ModelDataTableDialog : public QMainWindow
30 {
31  Q_OBJECT
32 
33 public:
34  ModelDataTableDialog(TabularModel *model,
35  QString title, QWidget *parent =0);
37 
38  QToolBar *getPlayToolbar() { return m_playToolbar; }
39 
40 signals:
41  void scrollToFrame(int frame);
42 
43 public slots:
44  void userScrolledToFrame(int frame);
45  void playbackScrolledToFrame(int frame);
46  void addCommand(Command *);
47 
48 protected slots:
49  void viewClicked(const QModelIndex &);
50  void viewPressed(const QModelIndex &);
51  void currentChanged(const QModelIndex &, const QModelIndex &);
52  void currentChangedThroughResort(const QModelIndex &);
53  void searchTextChanged(const QString &);
54  void searchRepeated();
55 
56  void insertRow();
57  void deleteRows();
58  void editRow();
59  void togglePlayTracking();
60 
61  void modelRemoved();
62 
63 protected:
64  void makeCurrent(int row);
65  ModelDataTableModel *m_table;
66  QToolBar *m_playToolbar;
67  QTableView *m_tableView;
68  QLineEdit *m_find;
71 };
72 
73 #endif
void playbackScrolledToFrame(int frame)
void currentChangedThroughResort(const QModelIndex &)
void scrollToFrame(int frame)
void viewPressed(const QModelIndex &)
void viewClicked(const QModelIndex &)
void userScrolledToFrame(int frame)
ModelDataTableModel * m_table
void currentChanged(const QModelIndex &, const QModelIndex &)
ModelDataTableDialog(TabularModel *model, QString title, QWidget *parent=0)
void searchTextChanged(const QString &)