home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / k3bradioaction.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-05-27  |  4.4 KB  |  123 lines

  1. /* 
  2.  *
  3.  * $Id: k3bradioaction.h 619556 2007-01-03 17:38:12Z trueg $
  4.  * Copyright (C) 2005 Sebastian Trueg <trueg@k3b.org>
  5.  *
  6.  * This file is part of the K3b project.
  7.  * Copyright (C) 1998-2007 Sebastian Trueg <trueg@k3b.org>
  8.  *
  9.  * This program is free software; you can redistribute it and/or modify
  10.  * it under the terms of the GNU General Public License as published by
  11.  * the Free Software Foundation; either version 2 of the License, or
  12.  * (at your option) any later version.
  13.  * See the file "COPYING" for the exact licensing terms.
  14.  */
  15.  
  16. #ifndef _K3B_RADIO_ACTION_H_
  17. #define _K3B_RADIO_ACTION_H_
  18.  
  19. #include <kactionclasses.h>
  20. #include "k3b_export.h"
  21.  
  22. /**
  23.  * This differs from KRadioAction only in the boolean 
  24.  * flag which says if it should always emit the signals 
  25.  * even if it was checked twice.
  26.  *
  27.  * Docu copied from kdelibs
  28.  */
  29. class LIBK3B_EXPORT K3bRadioAction : public KToggleAction
  30. {
  31.   Q_OBJECT
  32.  
  33.  public:
  34.   /**
  35.    * Constructs a radio action with text and potential keyboard
  36.    * accelerator but nothing else. Use this only if you really
  37.    * know what you are doing.
  38.    *
  39.    * @param text The text that will be displayed.
  40.    * @param cut The corresponding keyboard accelerator (shortcut).
  41.    * @param parent This action's parent.
  42.    * @param name An internal name for this action.
  43.    */
  44.   K3bRadioAction( const QString& text, const KShortcut& cut = KShortcut(), QObject* parent = 0, const char* name = 0 );
  45.  
  46.   /**
  47.    *  @param text The text that will be displayed.
  48.    *  @param cut The corresponding keyboard accelerator (shortcut).
  49.    *  @param receiver The SLOT's parent.
  50.    *  @param slot The SLOT to invoke to execute this action.
  51.    *  @param parent This action's parent.
  52.    *  @param name An internal name for this action.
  53.    */
  54.   K3bRadioAction( const QString& text, const KShortcut& cut,
  55.                   const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
  56.  
  57.   /**
  58.    *  @param text The text that will be displayed.
  59.    *  @param pix The icons that go with this action.
  60.    *  @param cut The corresponding keyboard accelerator (shortcut).
  61.    *  @param parent This action's parent.
  62.    *  @param name An internal name for this action.
  63.    */
  64.   K3bRadioAction( const QString& text, const QIconSet& pix, const KShortcut& cut = KShortcut(),
  65.                   QObject* parent = 0, const char* name = 0 );
  66.  
  67.   /**
  68.    *  @param text The text that will be displayed.
  69.    *  @param pix The dynamically loaded icon that goes with this action.
  70.    *  @param cut The corresponding keyboard accelerator (shortcut).
  71.    *  @param parent This action's parent.
  72.    *  @param name An internal name for this action.
  73.    */
  74.   K3bRadioAction( const QString& text, const QString& pix, const KShortcut& cut = KShortcut(),
  75.                   QObject* parent = 0, const char* name = 0 );
  76.  
  77.   /**
  78.    *  @param text The text that will be displayed.
  79.    *  @param pix The icons that go with this action.
  80.    *  @param cut The corresponding keyboard accelerator (shortcut).
  81.    *  @param receiver The SLOT's parent.
  82.    *  @param slot The SLOT to invoke to execute this action.
  83.    *  @param parent This action's parent.
  84.    *  @param name An internal name for this action.
  85.    */
  86.   K3bRadioAction( const QString& text, const QIconSet& pix, const KShortcut& cut,
  87.                   const QObject* receiver, const char* slot, QObject* parent, const char* name = 0 );
  88.  
  89.   /**
  90.    *  @param text The text that will be displayed.
  91.    *  @param pix The dynamically loaded icon that goes with this action.
  92.    *  @param cut The corresponding keyboard accelerator (shortcut).
  93.    *  @param receiver The SLOT's parent.
  94.    *  @param slot The SLOT to invoke to execute this action.
  95.    *  @param parent This action's parent.
  96.    *  @param name An internal name for this action.
  97.    */
  98.   K3bRadioAction( const QString& text, const QString& pix, const KShortcut& cut,
  99.                   const QObject* receiver, const char* slot,
  100.                   QObject* parent, const char* name = 0 );
  101.  
  102.   /**
  103.    *  @param parent This action's parent.
  104.    *  @param name An internal name for this action.
  105.    */
  106.   K3bRadioAction( QObject* parent = 0, const char* name = 0 );
  107.  
  108.   /**
  109.    * @param b if true the action will always emit the activated signal
  110.    *          even if the toggled state did not change. The default is false.
  111.    *          which is the same behaviour as KRadioAction
  112.    */
  113.   void setAlwaysEmitActivated( bool b ) { m_alwaysEmit = b; }
  114.  
  115.  protected:
  116.   virtual void slotActivated();
  117.  
  118.  private:
  119.   bool m_alwaysEmit;
  120. };
  121.  
  122. #endif
  123.