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 / k3bdevicecombobox.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-05-27  |  1.6 KB  |  68 lines

  1. /* 
  2.  *
  3.  * $Id: k3bdevicecombobox.h 619556 2007-01-03 17:38:12Z trueg $
  4.  * Copyright (C) 2003 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.  
  17. #ifndef _K3B_DEVICE_COMBO_BOX_H_
  18. #define _K3B_DEVICE_COMBO_BOX_H_
  19.  
  20. #include <kcombobox.h>
  21. #include "k3b_export.h"
  22.  
  23. namespace K3bDevice {
  24.   class Device;
  25.   class DeviceManager;
  26. }
  27.  
  28.  
  29. /**
  30.  * A combobox to select a K3b device.
  31.  *
  32.  * It automatically removes devices that are removed from the system.
  33.  */
  34. class LIBK3B_EXPORT K3bDeviceComboBox : public KComboBox
  35. {
  36.   Q_OBJECT
  37.  
  38.  public:
  39.   K3bDeviceComboBox( QWidget* parent = 0, const char* name = 0 );
  40.   ~K3bDeviceComboBox();
  41.  
  42.   K3bDevice::Device* selectedDevice() const;
  43.  
  44.  signals:
  45.   void selectionChanged( K3bDevice::Device* );
  46.  
  47.  public slots:
  48.   void addDevice( K3bDevice::Device* );
  49.   void addDevices( const QPtrList<K3bDevice::Device>& );
  50.   /**
  51.    * Clears the device combo and tries to keep the current selection
  52.    */
  53.   void refreshDevices( const QPtrList<K3bDevice::Device>& );
  54.   void removeDevice( K3bDevice::Device* );
  55.   void setSelectedDevice( K3bDevice::Device* );
  56.   void clear();
  57.  
  58.  private slots:
  59.   void slotActivated( int );
  60.   void slotDeviceManagerChanged( K3bDevice::DeviceManager* dm );
  61.  
  62.  private:
  63.   class Private;
  64.   Private* d;
  65. };
  66.  
  67. #endif
  68.