svgui  1.9
ModelDataTableDialog.h
Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
00002 
00003 /*
00004     Sonic Visualiser
00005     An audio file viewer and annotation editor.
00006     Centre for Digital Music, Queen Mary, University of London.
00007     This file copyright 2008 QMUL.
00008     
00009     This program is free software; you can redistribute it and/or
00010     modify it under the terms of the GNU General Public License as
00011     published by the Free Software Foundation; either version 2 of the
00012     License, or (at your option) any later version.  See the file
00013     COPYING included with this distribution for more information.
00014 */
00015 
00016 #ifndef _MODEL_DATA_TABLE_DIALOG_H_
00017 #define _MODEL_DATA_TABLE_DIALOG_H_
00018 
00019 #include <QMainWindow>
00020 
00021 class TabularModel;
00022 class ModelDataTableModel;
00023 class QTableView;
00024 class QModelIndex;
00025 class Command;
00026 class QToolBar;
00027 class QLineEdit;
00028 
00029 class ModelDataTableDialog : public QMainWindow
00030 {
00031     Q_OBJECT
00032     
00033 public:
00034     ModelDataTableDialog(TabularModel *model,
00035                          QString title, QWidget *parent =0);
00036     ~ModelDataTableDialog();
00037 
00038     QToolBar *getPlayToolbar() { return m_playToolbar; }
00039 
00040 signals:
00041     void scrollToFrame(int frame);
00042 
00043 public slots:
00044     void userScrolledToFrame(int frame);
00045     void playbackScrolledToFrame(int frame);
00046     void addCommand(Command *);
00047 
00048 protected slots:
00049     void viewClicked(const QModelIndex &);
00050     void viewPressed(const QModelIndex &);
00051     void currentChanged(const QModelIndex &, const QModelIndex &);
00052     void currentChangedThroughResort(const QModelIndex &);
00053     void searchTextChanged(const QString &);
00054     void searchRepeated();
00055     
00056     void insertRow();
00057     void deleteRows();
00058     void editRow();
00059     void togglePlayTracking();
00060 
00061     void modelRemoved();
00062 
00063 protected:
00064     void makeCurrent(int row);
00065     ModelDataTableModel *m_table;
00066     QToolBar *m_playToolbar;
00067     QTableView *m_tableView;
00068     QLineEdit *m_find;
00069     int m_currentRow;
00070     bool m_trackPlayback;
00071 };
00072 
00073 #endif