annotate widgets/ModelDataTableDialog.h @ 552:2e8194a30f40 sv-v1.7.1

* Layer data editor window: fix sorting for columns in region model, add Find feature * RDF import: assign names to layers based on event types, if no suitable labels are found in the RDF * Add label to status bar showing the last text that was passed in current layer (so e.g. counting 1, 2, 3, 4 if that's what beats are labelled) * Better layout of text labels for region layers in segmentation mode when they are close together * Give text layer the same method for finding "nearest point" as region and note layers, should improve its editability
author Chris Cannam
date Thu, 22 Oct 2009 15:54:21 +0000
parents 55cdd79606ba
children e4773943c9c1
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@552 27 class QLineEdit;
Chris@392 28
Chris@396 29 class ModelDataTableDialog : public QMainWindow
Chris@392 30 {
Chris@392 31 Q_OBJECT
Chris@392 32
Chris@392 33 public:
Chris@404 34 ModelDataTableDialog(TabularModel *model,
Chris@404 35 QString title, QWidget *parent =0);
Chris@392 36 ~ModelDataTableDialog();
Chris@392 37
Chris@404 38 QToolBar *getPlayToolbar() { return m_playToolbar; }
Chris@404 39
Chris@394 40 signals:
Chris@394 41 void scrollToFrame(unsigned long frame);
Chris@394 42
Chris@393 43 public slots:
Chris@401 44 void userScrolledToFrame(unsigned long frame);
Chris@401 45 void playbackScrolledToFrame(unsigned long frame);
Chris@400 46 void addCommand(Command *);
Chris@393 47
Chris@393 48 protected slots:
Chris@393 49 void viewClicked(const QModelIndex &);
Chris@393 50 void viewPressed(const QModelIndex &);
Chris@400 51 void currentChanged(const QModelIndex &, const QModelIndex &);
Chris@401 52 void currentChangedThroughResort(const QModelIndex &);
Chris@552 53 void searchTextChanged(const QString &);
Chris@552 54 void searchRepeated();
Chris@399 55
Chris@399 56 void insertRow();
Chris@400 57 void deleteRows();
Chris@399 58 void editRow();
Chris@402 59 void togglePlayTracking();
Chris@393 60
Chris@428 61 void modelRemoved();
Chris@428 62
Chris@392 63 protected:
Chris@401 64 void makeCurrent(int row);
Chris@392 65 ModelDataTableModel *m_table;
Chris@404 66 QToolBar *m_playToolbar;
Chris@392 67 QTableView *m_tableView;
Chris@552 68 QLineEdit *m_find;
Chris@400 69 int m_currentRow;
Chris@401 70 bool m_trackPlayback;
Chris@392 71 };
Chris@392 72
Chris@392 73 #endif