Code Search for Developers
 
 
  

RdsEntry.h from LiveSupport at Krugle


Show RdsEntry.h syntax highlighted

/*------------------------------------------------------------------------------

    Copyright (c) 2004 Media Development Loan Fund
 
    This file is part of the Campcaster project.
    http://campcaster.campware.org/
    To report bugs, send an e-mail to bugs@campware.org
 
    Campcaster is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.
  
    Campcaster is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
    along with Campcaster; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 
    Author   : $Author: fgerlits $
    Version  : $Revision: 2862 $
    Location : $URL: svn://code.campware.org/livesupport/trunk/campcaster/src/products/gLiveSupport/src/RdsEntry.h $

------------------------------------------------------------------------------*/
#ifndef RdsEntry_h
#define RdsEntry_h

#ifndef __cplusplus
#error This is a C++ include file
#endif


/* ============================================================ include files */

#ifdef HAVE_CONFIG_H
#include "configure.h"
#endif

#include <gtkmm/box.h>
#include <gtkmm/checkbutton.h>

#include "LiveSupport/Core/Ptr.h"
#include "LiveSupport/Core/LocalizedObject.h"
#include "LiveSupport/Widgets/EntryBin.h"
#include "GLiveSupport.h"


namespace LiveSupport {
namespace GLiveSupport {

using namespace LiveSupport::Core;
using namespace LiveSupport::Widgets;
using namespace LiveSupport::GLiveSupport;
    
/* ================================================================ constants */


/* =================================================================== macros */


/* =============================================================== data types */

/**
 *  A single RDS input field.
 *
 *  @author  $Author: fgerlits $
 *  @version $Revision: 2862 $
 */
class RdsEntry : public Gtk::HBox, 
                 public LocalizedObject
{
    private:
        /**
         *  The RDS type of the object (PS, PI, RT, etc).
         */
        Ptr<const Glib::ustring>::Ref   type;
        
        /**
         *  The saved state of the checkbox.
         */
        bool                            checkBoxSaved;
        
        /**
         *  The saved contents of the entry bin.
         */
        Ptr<const Glib::ustring>::Ref   entryBinSaved;


    protected:
        /**
         *  The enable/disable checkbox.
         */
        Gtk::CheckButton *          checkBox;

        /**
         *  The entry field.
         */
        EntryBin *                  entryBin;


    public:
        /**
         *  Constructor.
         *  The type parameter is a string of 2 or 3 upper-case characters,
         *  see http://en.wikipedia.org/wiki/Radio_Data_System.
         *
         *  @param  bundle      the resource bundle holding the localized
         *                      resources for this window.
         *  @param  type        the type of RDS data (PS, PI, RT, etc).
         *  @param  width       the width of the entry, in characters.
         */
        RdsEntry(Ptr<ResourceBundle>::Ref   bundle,
                 const Glib::ustring &      type,
                 int                        width)                  throw ();

        /**
         *  A virtual destructor.
         */
        virtual
        ~RdsEntry(void)                                             throw ()
        {
        }

        /**
         *  Get the type of the widget.
         *  Returns the RDS option type (PS, PI, RT, ...).
         *
         *  @return the "type" parameter passed to the constructor.
         */
        Ptr<const Glib::ustring>::Ref
        getType(void)                                               throw ()
        {
            return type;
        }

        /**
         *  Set the state of the widget.
         *
         *  @param  enabled     the new state of the checkBox.
         *  @param  value       the new contents of the entryBin.
         */
        void
        setOptions(bool                           enabled,
                   Ptr<const Glib::ustring>::Ref  value)            throw ();

        /**
         *  Save the changes made by the user.
         *
         *  @param  gLiveSupport    the GLiveSupport object holding the 
         *                          RDS options to be modified.
         *  @return true if any changes were saved; false otherwise.
         */
        bool
        saveChanges(Ptr<GLiveSupport>::Ref      gLiveSupport)       throw ();

        /**
         *  Clear the entries of the widget.
         */
        void
        reset(void)                                                 throw ();
};


/* ================================================= external data structures */


/* ====================================================== function prototypes */


} // namespace GLiveSupport
} // namespace LiveSupport

#endif // RdsEntry_h





See more files for this project here

LiveSupport

LiveSupport is a radio playout and automation system. It enables radio stations to automate their broadcasts by using playlists that are scheduled for airing. Playlists can contain music, talk, or even other playlists. A Web interface is included, so radio station personnel can manage the the station's broadcasts remotely.

Project homepage: http://www.campware.org/en/camp/livesupport_news/
Programming language(s): C++,PHP,Shell Script,XML
License: gpl2

  AdvancedSearchEntry.cxx
  AdvancedSearchEntry.h
  AdvancedSearchItem.cxx
  AdvancedSearchItem.h
  AudioPlayerTest.cxx
  AudioPlayerTest.h
  BackupList.cxx
  BackupList.h
  BackupView.cxx
  BackupView.h
  BrowseEntry.cxx
  BrowseEntry.h
  BrowseItem.cxx
  BrowseItem.h
  ContentsStorable.h
  CuePlayer.cxx
  CuePlayer.h
  ExportFormatRadioButtons.cxx
  ExportFormatRadioButtons.h
  ExportPlaylistWindow.cxx
  ExportPlaylistWindow.h
  GLiveSupport.cxx
  GLiveSupport.h
  GLiveSupportTest.cxx
  GLiveSupportTest.h
  GuiWindow.cxx
  GuiWindow.h
  KeyboardShortcut.cxx
  KeyboardShortcut.h
  KeyboardShortcutContainer.cxx
  KeyboardShortcutContainer.h
  KeyboardShortcutList.cxx
  KeyboardShortcutList.h
  KeyboardShortcutTest.cxx
  KeyboardShortcutTest.h
  LiveModeWindow.cxx
  LiveModeWindow.h
  LoginWindow.cxx
  LoginWindow.h
  MasterPanelUserInfoWidget.cxx
  MasterPanelUserInfoWidget.h
  MasterPanelWindow.cxx
  MasterPanelWindow.h
  NowPlaying.cxx
  NowPlaying.h
  OptionsWindow.cxx
  OptionsWindow.h
  RdsEntry.cxx
  RdsEntry.h
  RdsView.cxx
  RdsView.h
  RestoreBackupWindow.cxx
  RestoreBackupWindow.h
  SchedulePlaylistWindow.cxx
  SchedulePlaylistWindow.h
  SchedulerWindow.cxx
  SchedulerWindow.h
  ScratchpadWindow.cxx
  ScratchpadWindow.h
  SearchWindow.cxx
  SearchWindow.h
  SimplePlaylistManagementWindow.cxx
  SimplePlaylistManagementWindow.h
  TaskbarIcons.cxx
  TaskbarIcons.h
  TestRunner.cxx
  TransportList.cxx
  TransportList.h
  UploadFileWindow.cxx
  UploadFileWindow.h
  main.cxx