1 #ifndef STATIONLISTVIEW_H
2 #define STATIONLISTVIEW_H
6 Copyright (C) 2011 Luciano Montanaro <mikelima@cirulla.net>
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; see the file COPYING. If not, write to
20 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA.
25 #include "stationlistproxymodel.h"
27 #include <QMainWindow>
28 #include <QModelIndex>
31 class StationListView;
35 class QStringListModel;
36 class QSortFilterProxyModel;
37 class KeyPressForwarder;
40 class StationListModel;
41 class StationListProxyModel;
45 class StationListView : public QMainWindow
49 explicit StationListView(StationListModel *model, QWidget *parent = 0);
52 void setSortingMode(StationListProxyModel::SortingMode mode);
53 StationListProxyModel::SortingMode sortingMode(void);
56 void stationSelected(const QString &);
57 void aboutTriggered(void);
58 void settingsChangeRequested(void);
59 void sortingModeChanged(StationListProxyModel::SortingMode mode);
62 void showStation(const QModelIndex &index);
63 void handleFilterChanges(const QString &filter);
64 void handleSortingChange(QAction *action);
66 void handlefilterClearClick();
69 Ui::StationListView *ui;
70 QActionGroup *viewSelectionGroup;
71 StationListModel *stationListModel;
72 StationListProxyModel *filterModel;
73 KeyPressForwarder *keyPressForwarder;
74 StationListProxyModel::SortingMode m_sortingMode;
77 #endif // STATIONLISTVIEW_H