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

  1. /* 
  2.  *
  3.  * $Id: sourceheader 511311 2006-02-19 14:51:05Z trueg $
  4.  * Copyright (C) 2006 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_TOOL_BUTTON_H_
  17. #define _K3B_TOOL_BUTTON_H_
  18.  
  19. #include "k3b_export.h"
  20.  
  21. #include <qtoolbutton.h>
  22.  
  23. class QPainter;
  24. class QEvent;
  25.  
  26.  
  27. /**
  28.  * the K3bToolButton is an enhanced QToolButton which adds two functionalities:
  29.  * <li>A delayed popup menu is shown immiadetely once the mouse is dragged downwards
  30.  *     much like the KToolBarButton
  31.  * <li>If a popup menu is set a little arrow indicates this.
  32.  */
  33. class LIBK3B_EXPORT K3bToolButton : public QToolButton
  34. {
  35.  public:
  36.   K3bToolButton( QWidget* parent = 0 );
  37.   ~K3bToolButton();
  38.  
  39.   void setInstantMenu( bool );
  40.  
  41.  protected:
  42.   virtual void drawButton( QPainter* );
  43.   virtual bool eventFilter( QObject*, QEvent* );
  44.  
  45.  private:
  46.   class Private;
  47.   Private* d;
  48. };
  49.  
  50. #endif
  51.