X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;ds=sidebyside;f=application%2Fstationlistview.h;h=a595447a9b47641ed9d375ac32df44e1b77dcc66;hb=43c840ec9c77fee3ba4e16e76873cf301afaf7a5;hp=bce0d9f17d49cb48b9c9003aa2f76d9085cbad1f;hpb=8ae28a9634c3a9ebbf4b87fd1176465a06f09dd5;p=quandoparte diff --git a/application/stationlistview.h b/application/stationlistview.h index bce0d9f..a595447 100644 --- a/application/stationlistview.h +++ b/application/stationlistview.h @@ -1,6 +1,29 @@ #ifndef STATIONLISTVIEW_H #define STATIONLISTVIEW_H +/* + +Copyright (C) 2011 Luciano Montanaro + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +Boston, MA 02110-1301, USA. + +*/ + +#include "stationlistproxymodel.h" + #include #include @@ -14,29 +37,41 @@ class QSortFilterProxyModel; class KeyPressForwarder; class StationView; +class StationListModel; +class StationListProxyModel; + +QTM_USE_NAMESPACE class StationListView : public QMainWindow { Q_OBJECT - public: - explicit StationListView(QWidget *parent = 0); + explicit StationListView(StationListModel *model, QWidget *parent = 0); ~StationListView(); + void setSortingMode(StationListProxyModel::SortingMode mode); + StationListProxyModel::SortingMode sortingMode(void); + signals: void stationSelected(const QString &); + void aboutTriggered(void); + void settingsChangeRequested(void); + void sortingModeChanged(StationListProxyModel::SortingMode mode); private slots: - void showSettings(void); void showStation(const QModelIndex &index); void handleFilterChanges(const QString &filter); + void handleSortingChange(QAction *action); + + void handlefilterClearClick(); -private: + private: Ui::StationListView *ui; QActionGroup *viewSelectionGroup; - QStringListModel *stationListModel; - QSortFilterProxyModel *filterModel; + StationListModel *stationListModel; + StationListProxyModel *filterModel; KeyPressForwarder *keyPressForwarder; + StationListProxyModel::SortingMode m_sortingMode; }; #endif // STATIONLISTVIEW_H