stationselector.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           StationSelector.h  -  description
00003                              -------------------
00004     begin                : Son Aug 3 2003
00005     copyright            : (C) 2003 by Martin Witte
00006     email                : witte@kawo1.rwth-aachen.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef KRADIO_STATIONSELECTOR_H
00019 #define KRADIO_STATIONSELECTOR_H
00020 
00021 #ifdef HAVE_CONFIG_H
00022 #include <config.h>
00023 #endif
00024 
00025 #include <qstringlist.h>
00026 
00027 #include "radio_interfaces.h"
00028 #include "stationselection_interfaces.h"
00029 #include "stationlist.h"
00030 
00031 #include <stationselector-ui.h>
00032 #include "radiostation-listview.h"
00033 
00034 
00035 class RadioStationListView;
00036 
00037 class StationSelector : public StationSelectorUI,
00038                         public IRadioClient,
00039                         public IStationSelectionClient
00040 {
00041 Q_OBJECT
00042 public :
00043     StationSelector (QWidget *parent);
00044     ~StationSelector ();
00045 
00046     bool connectI (Interface *i);
00047     bool disconnectI (Interface *i);
00048 
00049 // IStationSelectionClient
00050 
00051     bool noticeStationSelectionChanged(const QStringList &sl);
00052 
00053 // IRadioClient
00054 
00055     bool noticePowerChanged(bool /*on*/)                          { return false; }
00056     bool noticeStationChanged (const RadioStation &, int /*idx*/) { return false; }
00057     bool noticeStationsChanged(const StationList &sl);
00058     bool noticePresetFileChanged(const QString &/*f*/)            { return false; }
00059 
00060     bool noticeCurrentSoundStreamIDChanged(SoundStreamID)         { return false; }
00061 
00062     void   saveState    (KConfig *) const;
00063     void   restoreState (KConfig *);
00064     
00065     bool   isDirty () const { return m_dirty; }
00066 
00067 protected slots:
00068 
00069     void slotButtonToLeft();
00070     void slotButtonToRight();
00071     void slotMoveToRight(const QStringList &list);
00072     void slotMoveToLeft(const QStringList &list);
00073 
00074     void slotOK();
00075     void slotCancel();
00076     void slotSetDirty();
00077 
00078 signals:
00079 
00080     void sigDirty();
00081 
00082 protected:
00083 
00084     void moveItem (RadioStationListView *fromListView,    QStringList          &fromIDList,
00085                    QListViewItem        *item,            int                   fromIdx,
00086                    RadioStationListView *toListView,      QStringList          &toIDList);
00087 
00088     void updateListViews();
00089 
00090     // station ids
00091     QStringList   m_stationIDsAvailable,
00092                   m_stationIDsSelected,
00093                   m_stationIDsNotDisplayed,
00094                   m_stationIDsAll;
00095 
00096     bool          m_dirty;
00097 };
00098 
00099 #endif
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 28 Jan 2011 for kradio by  doxygen 1.6.1