stationlistModel Class Reference

A model (for model-view-programming) handling radio streams. More...

#include <stationlistmodel.h>

Collaboration diagram for stationlistModel:

Collaboration graph
[legend]

List of all members.

Public Types

enum  columnInfoType {
  columnHeaderTitle, columnHeaderToolTip,
  columnHeaderWhatsThis, columnWidth,
  setColumnWidth, columnVisibility,
  setColumnVisibility, columnData
}

Public Slots

void enableListeningIn ()
void disableListeningIn ()
void paste ()
void pasteSelection ()
void record (const int index)
void showConfigDialog (const int index)
void stopRecording (const int index)

Signals

void bandwidthChanged ()
void numberOfActiveStreamsChanged ()
void numberOfActiveStreamsIsZero ()

Public Member Functions

 stationlistModel (stationlistWidget *parent, QWidget *mainWidget=0)
virtual ~stationlistModel ()
QModelIndex addNewStation ()
quint64 bandwidth () const
virtual int columnCount (const QModelIndex &parent=QModelIndex()) const
QVariant columnInfo (const columnInfoType type, const int column, const qint64 row=(-1), const quint64 value=(-1), QList< radioStation * > listOfStations=QList< radioStation * >()) const
virtual QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
virtual bool dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
virtual Qt::ItemFlags flags (const QModelIndex &index) const
virtual QVariant headerData (int section, Qt::Orientation orientation, int role) const
virtual QStringList mimeTypes () const
int numberOfActiveStreams () const
virtual bool queryClose ()
virtual void readProperties (const KConfigGroup &m_configGroup)
virtual bool removeRows (int row, int count, const QModelIndex &parent=QModelIndex())
virtual int rowCount (const QModelIndex &parent=QModelIndex()) const
virtual void saveProperties (KConfigGroup &m_configGroup)
virtual void sort (int column, Qt::SortOrder order=Qt::AscendingOrder)

Protected Attributes

QPointer< stationlistWidgetview

Properties

quint64 bandwidth
int numberOfActiveStreams

Private Slots

void recalculate_numberOfActiveStreams_and_bandwidth ()
void reloadBitrate (const qlonglong stationIndex)
void reloadDataSize (const qlonglong stationIndex)
void reloadMetaInterval (const qlonglong stationIndex)
void reloadMetaInterval_milliSeconds (const qlonglong stationIndex)
void reloadRelayPort (const qlonglong stationIndex)
void reloadServerName (const qlonglong stationIndex)
void reloadSong (const qlonglong stationIndex)
void reloadStatus (const qlonglong stationIndex)
void reloadStreamName (const qlonglong stationIndex)
void reloadUri (const qlonglong stationIndex)
void rememberListOfStreamsWhichTheUserWantsToRip_ifNotYetDone ()

Private Member Functions

void helper_connectSignalsAndSlots (radioStation *m_stream)
QList< QUrl > helper_convertToUrl (const QMimeData *data)
bool helper_firstIsAfterSecond (const PropertyValue &firstValue, const PropertyValue &secondValue, Qt::SortOrder order)
bool helper_isNumericValue (const QVariant &value)
qlonglong helper_toLongLong (const PropertyValue &value)
void helper_writeStationListToGeneralSettings ()

Private Attributes

quint64 internal_bandwidth
int internal_numberOfActiveStreams
listenSupport listen
QStringList * m_listOfStreamsOfWhichTheUserWantsThatTheyRip
QPointer< QWidget > m_mainWidget
QList< radioStation * > m_stationlist


Detailed Description

A model (for model-view-programming) handling radio streams.

This class handels radio stations. It reads the list of configuration files of radio stations from settings_general and represents these radio stations. Internally, it uses objects of the class radioStation to handle the stations. This class can also create new radio stations or delete existing ones - and takes care of creating/changing/removing the corresponding config files.

This class inherits from QAbstractTableModel (and this way indirectly from QAbstractItemModel). So it can be used as model for Qt's model-view-programming. Use a QTableView object to watch the data of this model.

Warning:
Use only one instance of this class at the same time! (Otherwise, the same stream could be recorded by more than one instance at the same time - and written by all instances to the same file! That's bad! Also this class uses the config files - and it is bad when more than one instance uses them...)

You can use only one view to show the content of this model!

Definition at line 54 of file stationlistmodel.h.


Member Enumeration Documentation

This enum is used in columnInfo() to determinate which action will be performed:

  • stationlistModel::columnHeaderTitle: Get the header title of the given column (QString).
  • stationlistModel::columnHeaderToolTip: Get the tooltip of the header of the given column (QString).
  • stationlistModel::columnHeaderWhatsThis: Get the "What's this"-help of the header of the given column (QString).
  • stationlistModel::columnWidth: Get the width of the given column from settings_general (quint64). A view for this model should take care of this value and read it and apply it in his constructor. In the config file the values aren't saved as a simple list of values (ordered by column number), but each column has an individual entry name for the width. This way it is guaranteed that, also when the model changes the order of columns, each column guards its width. Furthermore, no changes at the "view" widget are necessary as this system works without that the view widget knows about the order of the columns and of there content.
  • stationlistModel::setColumnWidth: Set the width of the given column in settings_general. A view for this model should write this value back in his contructor to guarantee that the last state of the UI is saved.
  • stationlistModel::columnVisibility: Get the visibility of the given column from settings_general (bool). A view for this model should take care of this value and read it and apply it in his constructor. Like stationlistmodel::columnWidth, it is saved individually for each column.
  • stationlistModel::setColumnVisibility: Set the visibility of the given column in settings_general. A view for this model should write this value back in his contructor to guarantee that the last state of the UI is saved.
  • stationlistModel::columnData: Get the data of the field specified by column and row (PropertyValue).
Enumerator:
columnHeaderTitle 
columnHeaderToolTip 
columnHeaderWhatsThis 
columnWidth 
setColumnWidth 
columnVisibility 
setColumnVisibility 
columnData 

Definition at line 128 of file stationlistmodel.h.


Constructor & Destructor Documentation

stationlistModel::stationlistModel ( stationlistWidget parent,
QWidget *  mainWidget = 0 
) [explicit]

The constructor.

Parameters:
parent The parent of this object. This is important for the necessary interaction between model and view (for example: selection handling).
mainWidget The widget to which configuration dialogs will be centered.

Definition at line 37 of file stationlistmodel.cpp.

References helper_connectSignalsAndSlots(), helper_writeStationListToGeneralSettings(), m_listOfStreamsOfWhichTheUserWantsThatTheyRip, m_mainWidget, m_stationlist, recalculate_numberOfActiveStreams_and_bandwidth(), and view.

Here is the call graph for this function:

stationlistModel::~stationlistModel (  )  [virtual]

The destructor.

Definition at line 67 of file stationlistmodel.cpp.

References m_listOfStreamsOfWhichTheUserWantsThatTheyRip.


Member Function Documentation

QModelIndex stationlistModel::addNewStation (  ) 

This function adds a new radio station: It displays a configuration dialog for the new stream. If accepted by the user (= clicking OK), the new stream is inserted at the end of the list.

Returns:
The model index of the new entry (if accepted by the user) or an invalid QModelIndex() (if canceled by the user).

Definition at line 785 of file stationlistmodel.cpp.

References helper_connectSignalsAndSlots(), helper_writeStationListToGeneralSettings(), m_mainWidget, and m_stationlist.

Here is the call graph for this function:

quint64 stationlistModel::bandwidth (  )  const

See property bandwidth.

void stationlistModel::bandwidthChanged (  )  [signal]

See property bandwidth.

Referenced by recalculate_numberOfActiveStreams_and_bandwidth().

Here is the caller graph for this function:

int stationlistModel::columnCount ( const QModelIndex &  parent = QModelIndex()  )  const [virtual]

Reimplemented from QAbstractTableModel.

Parameters:
parent As this is a table model (non-hirarchical!), this parameter is ignored.
Returns:
the number of columns

Definition at line 113 of file stationlistmodel.cpp.

Referenced by dropMimeData(), and sort().

Here is the caller graph for this function:

QVariant stationlistModel::columnInfo ( const columnInfoType  type,
const int  column,
const qint64  row = (-1),
const quint64  value = (-1),
QList< radioStation * >  listOfStations = QList<radioStation *>() 
) const

This function is the central place to access all information about the data in the model and also about related things (column width, visibility, header title...).

Warning:
This function has the const qualifier, but this doesn't mean that nothing changes. You have not only read access, but also write access (to some values).
Parameters:
type Specifies the type of action that will be performed. See columnInfoType for details.
column The column to access.
row The row to access. Is ignored if the action is independent from the row.
value The value to write. Is ignored if the action is not a writing action.
listOfStations The list of stations from which this function gets the data of the fields. If the list is empty (which is the default value), than m_stationlist is used instead.
Warning:
Notice that this function takes as argument the column before the row (which is an unusual order).
Returns:
The requested data as QVariant. If the passed arguments were invalid or if it was a write operation, than an invalid QVariant is returned.

Definition at line 122 of file stationlistmodel.cpp.

References columnData, columnHeaderTitle, columnHeaderToolTip, columnHeaderWhatsThis, columnVisibility, columnWidth, PropertyValue::error, PropertyValue::formatedValue, PropertyValue::internalValue, m_stationlist, OR, setColumnVisibility, setColumnWidth, PropertyValue::toolTip, PropertyValue::type, PropertyValue::unset, PropertyValue::value, and PropertyValue::whatsThis.

Referenced by data(), headerData(), and sort().

Here is the caller graph for this function:

QVariant stationlistModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const [virtual]

Reimplemented from QAbstractTableModel.

Uses columnInfo() to deliver the data.

Parameters:
index As this is a table model (non-hirarchical!), only rows and columns of the index are relevant. The parent is ignored. If the index doesn't belong to this model, an invalid QVariant is returned.
role The type of information that is requested. Supported are
  • Qt::DisplayRole (the data itself)
  • Qt::ToolTipRole
  • Qt::WhatsThisRole.
For other values, an invalid QVariant is returned.
Returns:
the data of a the spezified item.

Definition at line 589 of file stationlistmodel.cpp.

References AND, columnData, columnInfo(), and EQUAL.

Here is the call graph for this function:

void stationlistModel::disableListeningIn (  )  [slot]

Disables listening in.

Definition at line 1097 of file stationlistmodel.cpp.

References listen, and listenSupport::setStation().

Here is the call graph for this function:

bool stationlistModel::dropMimeData ( const QMimeData *  data,
Qt::DropAction  action,
int  row,
int  column,
const QModelIndex &  parent 
) [virtual]

Reimplemented function that provides support for dropping URL lists via "drag and drop.

Definition at line 1029 of file stationlistmodel.cpp.

References columnCount(), helper_connectSignalsAndSlots(), helper_convertToUrl(), helper_writeStationListToGeneralSettings(), m_mainWidget, m_stationlist, and view.

Referenced by paste(), and pasteSelection().

Here is the call graph for this function:

Here is the caller graph for this function:

void stationlistModel::enableListeningIn (  )  [slot]

Enables the listening in to the actually selected stream.

Note:
If there is no stream selected of more than 1 stream are selected, than listening in is disabled.

Definition at line 1087 of file stationlistmodel.cpp.

References listen, m_stationlist, listenSupport::setStation(), and view.

Here is the call graph for this function:

Qt::ItemFlags stationlistModel::flags ( const QModelIndex &  index  )  const [virtual]

Reimplemented function that says that dropping streams via "drag and drop" is accepted at each place in the view widget.

Definition at line 1075 of file stationlistmodel.cpp.

QVariant stationlistModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role 
) const [virtual]

Reimplemented from QAbstractTableModel.

Uses columnInfo() if orientation is horizontal.

Definition at line 564 of file stationlistmodel.cpp.

References columnHeaderTitle, columnHeaderToolTip, columnHeaderWhatsThis, columnInfo(), and EQUAL.

Here is the call graph for this function:

void stationlistModel::helper_connectSignalsAndSlots ( radioStation m_stream  )  [private]

This helper function sets up all the necessary connection of signals and slots which are needed to keep this model up to date.

Warning:
Call this function only once for each station.
Parameters:
m_stream a pointer to the station for which you want to set up the connection

Definition at line 72 of file stationlistmodel.cpp.

References recalculate_numberOfActiveStreams_and_bandwidth(), reloadBitrate(), reloadDataSize(), reloadMetaInterval(), reloadMetaInterval_milliSeconds(), reloadRelayPort(), reloadServerName(), reloadSong(), reloadStatus(), reloadStreamName(), and reloadUri().

Referenced by addNewStation(), dropMimeData(), and stationlistModel().

Here is the call graph for this function:

Here is the caller graph for this function:

QList< QUrl > stationlistModel::helper_convertToUrl ( const QMimeData *  data  )  [private]

Extracts a list of URLs from mime data.

Definition at line 985 of file stationlistmodel.cpp.

Referenced by dropMimeData().

Here is the caller graph for this function:

bool stationlistModel::helper_firstIsAfterSecond ( const PropertyValue firstValue,
const PropertyValue secondValue,
Qt::SortOrder  order 
) [private]

This function compares 2 values for sorting. It uses the following sort order:

  1. PropertyValue::unset
  2. PropertyValue::error
  3. PropertyValue::value in order (following PropertyValue.internalValue interpretated as integer if possible, otherwise case-insensitive string sorting of PropertyValue.formatedValue)

If both values have the same order, it returns always true.

Returns:
If the first item should be after the second item when sorting.

Definition at line 723 of file stationlistmodel.cpp.

References PropertyValue::error, PropertyValue::formatedValue, helper_isNumericValue(), helper_toLongLong(), PropertyValue::internalValue, PropertyValue::type, PropertyValue::unset, and PropertyValue::value.

Referenced by sort().

Here is the call graph for this function:

Here is the caller graph for this function:

bool stationlistModel::helper_isNumericValue ( const QVariant &  value  )  [private]

Returns:
Whether the value is of numeric type (either an integer number or an floating point number) or can be converted to a numeric type (ripping::statusType).
See also:
helper_toLongLong

Definition at line 690 of file stationlistmodel.cpp.

Referenced by helper_firstIsAfterSecond().

Here is the caller graph for this function:

qlonglong stationlistModel::helper_toLongLong ( const PropertyValue value  )  [private]

Converts a PropertyValue.internalValue to a qlonglong is possible (integer values or ripping::statusType).

See also:
helper_isNumericValue

Definition at line 713 of file stationlistmodel.cpp.

References PropertyValue::internalValue.

Referenced by helper_firstIsAfterSecond().

Here is the caller graph for this function:

void stationlistModel::helper_writeStationListToGeneralSettings (  )  [inline, private]

Writes the actual list of streams back to the configuration file.

Definition at line 857 of file stationlistmodel.cpp.

References m_stationlist.

Referenced by addNewStation(), dropMimeData(), removeRows(), and stationlistModel().

Here is the caller graph for this function:

QStringList stationlistModel::mimeTypes (  )  const [virtual]

Reimplemented from Qt. Provides a list of the mime types that are accepted for dropping streams via "drag and drop".

Definition at line 1080 of file stationlistmodel.cpp.

int stationlistModel::numberOfActiveStreams (  )  const

See property numberOfActiveStreams.

Referenced by queryClose().

Here is the caller graph for this function:

void stationlistModel::numberOfActiveStreamsChanged (  )  [signal]

See property numberOfActiveStreams.

Referenced by recalculate_numberOfActiveStreams_and_bandwidth().

Here is the caller graph for this function:

void stationlistModel::numberOfActiveStreamsIsZero (  )  [signal]

See property numberOfActiveStreams.

Referenced by queryClose(), and recalculate_numberOfActiveStreams_and_bandwidth().

Here is the caller graph for this function:

void stationlistModel::paste (  )  [slot]

Pastes the content of the clipboard (using dropMimeData()).

Definition at line 1011 of file stationlistmodel.cpp.

References dropMimeData().

Here is the call graph for this function:

void stationlistModel::pasteSelection (  )  [slot]

Pastes the content of the mouse selection (using dropMimeData()).

Definition at line 1020 of file stationlistmodel.cpp.

References dropMimeData().

Here is the call graph for this function:

bool stationlistModel::queryClose (  )  [virtual]

# Remembers a list of running streams (which is necessary if we do session management) # Shuts them down. As this can take a while, a "busy" dialog is displayed.

See also:
saveProperties()

rememberListOfStreamsWhichTheUserWantsToRip_ifNotYetDone()

Definition at line 922 of file stationlistmodel.cpp.

References m_mainWidget, m_stationlist, numberOfActiveStreams(), numberOfActiveStreamsIsZero(), and rememberListOfStreamsWhichTheUserWantsToRip_ifNotYetDone().

Here is the call graph for this function:

void stationlistModel::readProperties ( const KConfigGroup &  m_configGroup  )  [virtual]

Reads properties for restoring the previous session (using session management).

Parameters:
m_configGroup The location where to read the properties from
See also:
saveProperties()

Definition at line 970 of file stationlistmodel.cpp.

References m_stationlist, and rowCount().

Here is the call graph for this function:

void stationlistModel::recalculate_numberOfActiveStreams_and_bandwidth (  )  [private, slot]

This slot recalculates the values for the properties bandwidth and numberOfActiveStreams from scratch. It caches them in the corresponding member. If for one of the properties or for both of them, the new value differs from the old value, the corresponding signal(s) is/are emitted.

We recalculate the value each time from scratch. We could have implemented a solution the reacts on signals of the radiostation objects that the status has changed, and than increment or decrement our properties. This solution would be more efficient, but also more complicate: We would have to worry about a correct initialization, about session management.... The situation would be confusing and complicate. So it's better to have a clean solution, also when it's not so efficient.

Definition at line 480 of file stationlistmodel.cpp.

References bandwidthChanged(), ripping::idle, internal_bandwidth, internal_numberOfActiveStreams, m_stationlist, numberOfActiveStreamsChanged(), numberOfActiveStreamsIsZero(), and PropertyValue::value.

Referenced by helper_connectSignalsAndSlots(), and stationlistModel().

Here is the call graph for this function:

Here is the caller graph for this function:

void stationlistModel::record ( const int  index  )  [slot]

This slot starts the recording of a stream.

Parameters:
index You must pass the index (= the row) of the stream which you want to record. When you pass an invalid index, nothing happens.

Definition at line 871 of file stationlistmodel.cpp.

References AND, and m_stationlist.

void stationlistModel::reloadBitrate ( const qlonglong  stationIndex  )  [private, slot]

Used internally to emit the signal dataChanged.

Definition at line 539 of file stationlistmodel.cpp.

Referenced by helper_connectSignalsAndSlots().

Here is the caller graph for this function:

void stationlistModel::reloadDataSize ( const qlonglong  stationIndex  )  [private, slot]

Used internally to emit the signal dataChanged.

Definition at line 534 of file stationlistmodel.cpp.

Referenced by helper_connectSignalsAndSlots().

Here is the caller graph for this function:

void stationlistModel::reloadMetaInterval ( const qlonglong  stationIndex  )  [private, slot]

Used internally to emit the signal dataChanged.

Definition at line 544 of file stationlistmodel.cpp.

Referenced by helper_connectSignalsAndSlots().

Here is the caller graph for this function:

void stationlistModel::reloadMetaInterval_milliSeconds ( const qlonglong  stationIndex  )  [private, slot]

Used internally to emit the signal dataChanged.

Definition at line 549 of file stationlistmodel.cpp.

Referenced by helper_connectSignalsAndSlots().

Here is the caller graph for this function:

void stationlistModel::reloadRelayPort ( const qlonglong  stationIndex  )  [private, slot]

Used internally to emit the signal dataChanged.

Definition at line 559 of file stationlistmodel.cpp.

Referenced by helper_connectSignalsAndSlots().

Here is the caller graph for this function:

void stationlistModel::reloadServerName ( const qlonglong  stationIndex  )  [private, slot]

Used internally to emit the signal dataChanged.

Definition at line 554 of file stationlistmodel.cpp.

Referenced by helper_connectSignalsAndSlots().

Here is the caller graph for this function:

void stationlistModel::reloadSong ( const qlonglong  stationIndex  )  [private, slot]

Used internally to emit the signal dataChanged.

Definition at line 529 of file stationlistmodel.cpp.

Referenced by helper_connectSignalsAndSlots().

Here is the caller graph for this function:

void stationlistModel::reloadStatus ( const qlonglong  stationIndex  )  [private, slot]

Used internally to emit the signal dataChanged.

Definition at line 524 of file stationlistmodel.cpp.

Referenced by helper_connectSignalsAndSlots().

Here is the caller graph for this function:

void stationlistModel::reloadStreamName ( const qlonglong  stationIndex  )  [private, slot]

Used internally to emit the signal dataChanged.

Definition at line 514 of file stationlistmodel.cpp.

Referenced by helper_connectSignalsAndSlots().

Here is the caller graph for this function:

void stationlistModel::reloadUri ( const qlonglong  stationIndex  )  [private, slot]

Used internally to emit the signal dataChanged.

Definition at line 519 of file stationlistmodel.cpp.

Referenced by helper_connectSignalsAndSlots().

Here is the caller graph for this function:

void stationlistModel::rememberListOfStreamsWhichTheUserWantsToRip_ifNotYetDone (  )  [private, slot]

If the application is closed using session management, it is undefined, if saveProperties() or queryClose() is executed first. Because queryClose() shuts the streams down, if saveProperties() is executed later it would not be able to know which streams were running.

To solve this problem, queryClose() and saveProperties() call this function (in the case of queryClose() of course before shutting down streams). This function writes a list of running streams to the member m_listOfStreamsOfWhichTheUserWantsThatTheyRip - but only if there is not yet a list. This way, saveProperties() can call this function and be sure to have now a correct list of running streams at m_listOfStreamsOfWhichTheUserWantsThatTheyRip, indepentently from the execution order of saveProperties() and readProperties().

See also:
saveProperties()

queryClose()

m_listOfStreamsOfWhichTheUserWantsThatTheyRip

Definition at line 905 of file stationlistmodel.cpp.

References m_listOfStreamsOfWhichTheUserWantsThatTheyRip, m_stationlist, and rowCount().

Referenced by queryClose(), and saveProperties().

Here is the call graph for this function:

Here is the caller graph for this function:

bool stationlistModel::removeRows ( int  row,
int  count,
const QModelIndex &  parent = QModelIndex() 
) [virtual]

Reimplemented from QAbstractItemModel.

Removes count radio stations starting with the given row (radio station) from this model and deletes the corresponding config files.

Parameters:
row You must pass the index (= the row) of the first stream which you want to delete. When you pass an invalid index, nothing happens.
count number of streams that will be deleted.
parent is ignored.
Returns:
whether the removing was sucessful

Definition at line 817 of file stationlistmodel.cpp.

References helper_writeStationListToGeneralSettings(), and m_stationlist.

Here is the call graph for this function:

int stationlistModel::rowCount ( const QModelIndex &  parent = QModelIndex()  )  const [virtual]

Reimplemented from QAbstractTableModel.

Parameters:
parent As this is a table model (non-hirarchical!), this parameter is ignored.
Returns:
the number of rows

Definition at line 104 of file stationlistmodel.cpp.

References m_stationlist.

Referenced by readProperties(), and rememberListOfStreamsWhichTheUserWantsToRip_ifNotYetDone().

Here is the caller graph for this function:

void stationlistModel::saveProperties ( KConfigGroup &  m_configGroup  )  [virtual]

Saves properties for restoring this session later (using session management).

Parameters:
m_configGroup The location where to save the properties
See also:
readProperties()

rememberListOfStreamsWhichTheUserWantsToRip_ifNotYetDone()

m_listOfStreamsOfWhichTheUserWantsThatTheyRip

Definition at line 962 of file stationlistmodel.cpp.

References m_listOfStreamsOfWhichTheUserWantsThatTheyRip, and rememberListOfStreamsWhichTheUserWantsToRip_ifNotYetDone().

Here is the call graph for this function:

void stationlistModel::showConfigDialog ( const int  index  )  [slot]

If exactly one stream is selected, then this slot shows the config dialog. Else nothing happens.

Definition at line 887 of file stationlistmodel.cpp.

References AND, and m_stationlist.

void stationlistModel::sort ( int  column,
Qt::SortOrder  order = Qt::AscendingOrder 
) [virtual]

Reimplemented from QAbstractTableModel.

This is just a dummy function. It (still) does nothing.

Definition at line 623 of file stationlistmodel.cpp.

References columnCount(), columnData, columnInfo(), helper_firstIsAfterSecond(), m_stationlist, and view.

Here is the call graph for this function:

void stationlistModel::stopRecording ( const int  index  )  [slot]

This slot stops the recording of a stream.

Parameters:
index You must pass the index (= the row) of the stream which you want to stop the recording. When you pass an invalid index, nothing happens.

Definition at line 879 of file stationlistmodel.cpp.

References AND, and m_stationlist.


Member Data Documentation

Used internally to cache the value of the property bandwidth.

Definition at line 345 of file stationlistmodel.h.

Referenced by recalculate_numberOfActiveStreams_and_bandwidth().

Used internally to cache the value of the property numberOfActiveStreams.

Definition at line 347 of file stationlistmodel.h.

Referenced by recalculate_numberOfActiveStreams_and_bandwidth().

With this object, we can listen in streams.

Definition at line 349 of file stationlistmodel.h.

Referenced by disableListeningIn(), and enableListeningIn().

Here you can save a list of the streams for which radioStation::doesTheUserWantsThatTheStreamIsRipping() is true. Used for session management handling.

By initialization, this pointer is null.

Warning:
Keep this pointer always valid and set it back to null when deleting the QStringList. The destructor will delete a possibly remaining QStringlist, and this will lead to a crash when the pointer is invalid.
See also:
rememberListOfStreamsWhichTheUserWantsToRip_ifNotYetDone() has details.

Definition at line 361 of file stationlistmodel.h.

Referenced by rememberListOfStreamsWhichTheUserWantsToRip_ifNotYetDone(), saveProperties(), stationlistModel(), and ~stationlistModel().

QPointer<QWidget> stationlistModel::m_mainWidget [private]

A pointer to the widget to which configuration dialogs should be centered. This member is initialized in the constructor.

Definition at line 364 of file stationlistmodel.h.

Referenced by addNewStation(), dropMimeData(), queryClose(), and stationlistModel().

A pointer to the view that shows this model.

Warning:
This pointer can be 0! Test this before using it!

Definition at line 308 of file stationlistmodel.h.

Referenced by dropMimeData(), enableListeningIn(), sort(), and stationlistModel().


Property Documentation

quint64 stationlistModel::bandwidth [read]

This property holds the total bandwidth that is actually really used by the streams (summation of the bitrate of all streams which are not ripping::idle).

Warning:
The formated version contains the value in kbit/s (with SI prefix which means 1000 bit/s, not 1024 bit/s).
See also:

Definition at line 71 of file stationlistmodel.h.

int stationlistModel::numberOfActiveStreams [read]

This property holds the number of active streams (number of all streams which are not ripping::idle).

See also:

Definition at line 83 of file stationlistmodel.h.


The documentation for this class was generated from the following files:

doxygen