radioapp/radiowidgets/src/radiouiutilities.cpp
changeset 19 afea38384506
parent 16 f54ebcfc1b80
equal deleted inserted replaced
16:f54ebcfc1b80 19:afea38384506
    20 
    20 
    21 // User includes
    21 // User includes
    22 #include "radiouiutilities.h"
    22 #include "radiouiutilities.h"
    23 #include "radiofrequencystrip.h"
    23 #include "radiofrequencystrip.h"
    24 #include "radiostationcarousel.h"
    24 #include "radiostationcarousel.h"
       
    25 #include "radiofrequencyscanner.h"
    25 #include "radiologger.h"
    26 #include "radiologger.h"
    26 
    27 
    27 // Constants
    28 // Constants
    28 
    29 
    29 static RadioUiUtilities* theInstance = 0;
    30 static RadioUiUtilities* theInstance = 0;
    88 }
    89 }
    89 
    90 
    90 /*!
    91 /*!
    91  *
    92  *
    92  */
    93  */
       
    94 bool RadioUiUtilities::isScannerAlive()
       
    95 {
       
    96     RadioFrequencyScanner* scanner = instance().mScanner;
       
    97     if ( scanner ) {
       
    98         return scanner->isAlive();
       
    99     }
       
   100     return false;
       
   101 }
       
   102 
       
   103 /*!
       
   104  *
       
   105  */
    93 void RadioUiUtilities::setFrequencyStrip( RadioFrequencyStrip* frequencyStrip )
   106 void RadioUiUtilities::setFrequencyStrip( RadioFrequencyStrip* frequencyStrip )
    94 {
   107 {
    95     instance().mFrequencyStrip = frequencyStrip;
   108     instance().mFrequencyStrip = frequencyStrip;
    96 }
   109 }
    97 
   110 
   104 }
   117 }
   105 
   118 
   106 /*!
   119 /*!
   107  *
   120  *
   108  */
   121  */
       
   122 void RadioUiUtilities::setFrequencyScanner( RadioFrequencyScanner* scanner )
       
   123 {
       
   124     instance().mScanner = scanner;
       
   125 }
       
   126 
       
   127 /*!
       
   128  *
       
   129  */
   109 RadioUiUtilities& RadioUiUtilities::instance()
   130 RadioUiUtilities& RadioUiUtilities::instance()
   110 {
   131 {
   111     if ( !::theInstance ) {
   132     if ( !::theInstance ) {
   112         ::theInstance = new RadioUiUtilities;
   133         ::theInstance = new RadioUiUtilities;
   113     }
   134     }