Chris@392: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@392: Chris@392: /* Chris@392: Sonic Visualiser Chris@392: An audio file viewer and annotation editor. Chris@392: Centre for Digital Music, Queen Mary, University of London. Chris@392: This file copyright 2008 QMUL. Chris@392: Chris@392: This program is free software; you can redistribute it and/or Chris@392: modify it under the terms of the GNU General Public License as Chris@392: published by the Free Software Foundation; either version 2 of the Chris@392: License, or (at your option) any later version. See the file Chris@392: COPYING included with this distribution for more information. Chris@392: */ Chris@392: Chris@1272: #ifndef SV_MODEL_DATA_TABLE_DIALOG_H Chris@1272: #define SV_MODEL_DATA_TABLE_DIALOG_H Chris@392: Chris@396: #include Chris@392: Chris@908: #include "base/BaseTypes.h" Chris@908: Chris@395: class TabularModel; Chris@392: class ModelDataTableModel; Chris@392: class QTableView; Chris@393: class QModelIndex; Chris@393: class Command; Chris@404: class QToolBar; Chris@552: class QLineEdit; Chris@392: Chris@396: class ModelDataTableDialog : public QMainWindow Chris@392: { Chris@392: Q_OBJECT Chris@392: Chris@392: public: Chris@404: ModelDataTableDialog(TabularModel *model, Chris@404: QString title, QWidget *parent =0); Chris@392: ~ModelDataTableDialog(); Chris@392: Chris@404: QToolBar *getPlayToolbar() { return m_playToolbar; } Chris@404: Chris@394: signals: Chris@908: void scrollToFrame(sv_frame_t frame); Chris@394: Chris@393: public slots: Chris@908: void userScrolledToFrame(sv_frame_t frame); Chris@908: void playbackScrolledToFrame(sv_frame_t frame); Chris@400: void addCommand(Command *); Chris@393: Chris@393: protected slots: Chris@393: void viewClicked(const QModelIndex &); Chris@393: void viewPressed(const QModelIndex &); Chris@400: void currentChanged(const QModelIndex &, const QModelIndex &); Chris@401: void currentChangedThroughResort(const QModelIndex &); Chris@552: void searchTextChanged(const QString &); Chris@552: void searchRepeated(); Chris@399: Chris@399: void insertRow(); Chris@400: void deleteRows(); Chris@399: void editRow(); Chris@402: void togglePlayTracking(); Chris@393: Chris@428: void modelRemoved(); Chris@428: Chris@392: protected: Chris@401: void makeCurrent(int row); Chris@392: ModelDataTableModel *m_table; Chris@404: QToolBar *m_playToolbar; Chris@392: QTableView *m_tableView; Chris@552: QLineEdit *m_find; Chris@400: int m_currentRow; Chris@401: bool m_trackPlayback; Chris@392: }; Chris@392: Chris@392: #endif