annotate widgets/ModelDataTableDialog.h @ 404:4075bf03faef

* Add playback controls to data edit dialog * Make data edit dialog close properly when layer is removed from view * More fixes to playback tracking & selection model in data edit dialog * Remove edit button from data edit dialog for now
author Chris Cannam
date Wed, 18 Jun 2008 15:53:23 +0000
parents 66e01a6c9554
children 55cdd79606ba
rev   line source
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@392 16 #ifndef _MODEL_DATA_TABLE_DIALOG_H_
Chris@392 17 #define _MODEL_DATA_TABLE_DIALOG_H_
Chris@392 18
Chris@396 19 #include <QMainWindow>
Chris@392 20
Chris@395 21 class TabularModel;
Chris@392 22 class ModelDataTableModel;
Chris@392 23 class QTableView;
Chris@393 24 class QModelIndex;
Chris@393 25 class Command;
Chris@404 26 class QToolBar;
Chris@392 27
Chris@396 28 class ModelDataTableDialog : public QMainWindow
Chris@392 29 {
Chris@392 30 Q_OBJECT
Chris@392 31
Chris@392 32 public:
Chris@404 33 ModelDataTableDialog(TabularModel *model,
Chris@404 34 QString title, QWidget *parent =0);
Chris@392 35 ~ModelDataTableDialog();
Chris@392 36
Chris@404 37 QToolBar *getPlayToolbar() { return m_playToolbar; }
Chris@404 38
Chris@394 39 signals:
Chris@394 40 void scrollToFrame(unsigned long frame);
Chris@394 41
Chris@393 42 public slots:
Chris@401 43 void userScrolledToFrame(unsigned long frame);
Chris@401 44 void playbackScrolledToFrame(unsigned long frame);
Chris@400 45 void addCommand(Command *);
Chris@393 46
Chris@393 47 protected slots:
Chris@393 48 void viewClicked(const QModelIndex &);
Chris@393 49 void viewPressed(const QModelIndex &);
Chris@400 50 void currentChanged(const QModelIndex &, const QModelIndex &);
Chris@401 51 void currentChangedThroughResort(const QModelIndex &);
Chris@399 52
Chris@399 53 void insertRow();
Chris@400 54 void deleteRows();
Chris@399 55 void editRow();
Chris@402 56 void togglePlayTracking();
Chris@393 57
Chris@392 58 protected:
Chris@401 59 void makeCurrent(int row);
Chris@392 60 ModelDataTableModel *m_table;
Chris@404 61 QToolBar *m_playToolbar;
Chris@392 62 QTableView *m_tableView;
Chris@400 63 int m_currentRow;
Chris@401 64 bool m_trackPlayback;
Chris@392 65 };
Chris@392 66
Chris@392 67 #endif