radiostation.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
00019
00020
00021 #ifndef RADIOSTATION_H
00022 #define RADIOSTATION_H
00023
00024 #include "get_stream_info.h"
00025 #include "ripping.h"
00026 #include "settings_stream_dialog.h"
00027
00036 class radioStation : public ripping
00037 {
00038
00039 Q_OBJECT
00040
00052 Q_PROPERTY(QString configFileName READ configFileName)
00053
00054
00065 Q_PROPERTY(QString fullConfigFileName READ fullConfigFileName)
00066
00076 Q_PROPERTY(QString fullParseRulesFileName READ fullParseRulesFileName)
00077
00092 Q_PROPERTY(PropertyValue uri READ uri)
00093
00094 public:
00095
00109 explicit radioStation(QObject *parent = 0,
00110 QWidget *mainWidget = 0,
00111 const QString & configFileName = QString());
00126 explicit radioStation(QObject *parent,
00127 QWidget *mainWidget,
00128 const QString & configFileName,
00129 void *index);
00131 virtual ~radioStation();
00133 QString configFileName() const;
00135 QString fullConfigFileName() const;
00137 QString fullParseRulesFileName() const;
00139 virtual PropertyValue uri() const;
00142 virtual void setServerUri(const QUrl & uri);
00144 static PropertyValue formatedUri(const QString & theUri);
00145
00146 signals:
00147 void uriChanged(void *index, PropertyValue newUri);
00148
00149 public slots:
00152 int execSettingsDialogWithoutApplyButton();
00155 void showSettingsDialogWithApplyButton();
00156
00157 protected:
00161 QPointer<settings_stream> config_skeleton;
00165 QPointer<QWidget> m_mainWidget;
00168 virtual QStringList parameterList() const;
00170 virtual QString serverUri() const;
00174
00176
00177 virtual void setBitrate(const qint64 bitrate);
00179 virtual void setMetaInterval(const qint64 metaInterval);
00181 virtual void setServerName(const QString & newServerName);
00183 virtual void setStreamName(const QString & newStreamName);
00185
00187 QPointer<settings_stream_dialog> settingsDialog;
00188 virtual QString workingDirectory() const;
00189
00190 protected slots:
00197 virtual void setBitrate(void *ignored, const PropertyValue & newBitrate);
00204 virtual void setMetaInterval(void *ignored, const PropertyValue & newMetaInterval);
00211 virtual void setServerName(void *ignored, const PropertyValue & newServerName);
00218 virtual void setStreamName(void *ignored, const PropertyValue & newStreamName);
00219
00220 private:
00222 enum applyButton {
00223 showApplyButton,
00224 hideApplyButton
00225 };
00227 enum returnType {
00228 immediately,
00229 after_execution
00230 };
00235 QString helper_locateConfigfile(const QString & configfileName) const;
00243 void helper_setupConfigSystem(const QString & configFile);
00255 int helper_displaySettingsDialog(const returnType returnMode,
00256 const applyButton applyButtonMode);
00258 QString internal_configFileName;
00268 KSharedConfig::Ptr shared_config;
00270 QPointer<get_stream_info> infoCatcher;
00271
00272 private slots:
00285 void helper_write_properties_from_file_to_class_ripping();
00288 void updateMetaData();
00289 };
00290
00291 #endif