stationselector.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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 <QtCore/QStringList>
00026 #include <QtGui/QWidget>
00027
00028 #include "radio_interfaces.h"
00029 #include "stationselection_interfaces.h"
00030 #include "stationlist.h"
00031
00032 #include "radiostation-listview.h"
00033
00034 #ifdef KRADIO_ENABLE_FIXMES
00035 #warning "konvert from k3listview to KListWidget"
00036 #endif
00037
00038
00039 class RadioStationListView;
00040 class Ui_StationSelectorUI;
00041 class QGridLayout;
00042
00043 class KDE_EXPORT StationSelector : public QWidget,
00044 public IRadioClient,
00045 public IStationSelectionClient
00046 {
00047 Q_OBJECT
00048 public :
00049 StationSelector (QWidget *parent);
00050 ~StationSelector ();
00051
00052 bool connectI (Interface *i);
00053 bool disconnectI (Interface *i);
00054
00055
00056
00057 bool noticeStationSelectionChanged(const QStringList &sl);
00058
00059
00060
00061 bool noticePowerChanged(bool ) { return false; }
00062 bool noticeStationChanged (const RadioStation &, int ) { return false; }
00063 bool noticeStationsChanged(const StationList &sl);
00064 bool noticePresetFileChanged(const QString &) { return false; }
00065
00066 bool noticeRDSStateChanged (bool ) { return false; }
00067 bool noticeRDSRadioTextChanged (const QString &) { return false; }
00068 bool noticeRDSStationNameChanged(const QString &) { return false; }
00069
00070 bool noticeCurrentSoundStreamSourceIDChanged(SoundStreamID) { return false; }
00071 bool noticeCurrentSoundStreamSinkIDChanged (SoundStreamID) { return false; }
00072
00073 void saveState (KConfigGroup &) const;
00074 void restoreState (KConfigGroup &);
00075
00076 bool isDirty () const { return m_dirty; }
00077
00078 protected slots:
00079
00080 void slotButtonToLeft();
00081 void slotButtonToRight();
00082 void slotMoveToRight(const QStringList &list);
00083 void slotMoveToLeft(const QStringList &list);
00084
00085 void slotOK();
00086 void slotCancel();
00087 void slotSetDirty();
00088
00089 signals:
00090
00091 void sigDirty();
00092
00093 protected:
00094
00095 QGridLayout *getGridLayout();
00096
00097 void moveItem (RadioStationListView *fromListView, QStringList &fromIDList,
00098 Q3ListViewItem *item, int fromIdx,
00099 RadioStationListView *toListView, QStringList &toIDList);
00100
00101 void updateListViews();
00102
00103
00104 QStringList m_stationIDsAvailable,
00105 m_stationIDsSelected,
00106 m_stationIDsNotDisplayed,
00107 m_stationIDsAll;
00108
00109 bool m_dirty;
00110
00111 Ui_StationSelectorUI *m_ui;
00112 };
00113
00114 #endif