Show
Ignore:
Timestamp:
01/24/08 21:40:25 (10 months ago)
Author:
eugene
Message:

Major docking fix.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/qt-gui_qt4/src/dockicons/dockicon.h

    r5837 r6058  
    2222#define DOCKICON_H 
    2323 
    24 #include <QWidget> 
     24#include <QObject> 
    2525 
    26 class QMenu; 
     26class QPixmap; 
    2727 
    2828class ICQOwner; 
     
    3636 * Only holds state and common functions needed by dock icon implementations 
    3737 */ 
    38 class DockIcon : public QWidget 
     38class DockIcon : public QObject 
    3939{ 
    4040  Q_OBJECT 
     
    4343  /** 
    4444   * Constructor 
    45    * 
    46    * @param menu System menu to popup from dock icon on right click 
    4745   */ 
    48   DockIcon(QMenu* menu); 
     46  DockIcon(); 
    4947 
    5048  /** 
     
    7977  void middleClicked(); 
    8078 
     79  /** 
     80   * New tooltip is available 
     81   * Emitted when myIcon isn't set 
     82   */ 
     83  void newToolTip(QString tooltip); 
     84 
    8185protected slots: 
    8286  /** 
     
    97101protected: 
    98102  /** 
    99    * Setup X hints needed to mark icon window as dockable by some window managers 
    100    */ 
    101   void X11Init(); 
    102  
    103   /** 
    104103   * Update tool tip text for dock icon 
    105104   */ 
     
    107106 
    108107  /** 
    109    * User has clicked on icon 
    110    * 
    111    * @param event Event object 
     108   * Connects signals from myIcon onto this 
    112109   */ 
    113   virtual void mousePressEvent(QMouseEvent* event); 
     110  void relayDockIconSignals(); 
    114111 
    115   /** 
    116    * User tried to close icon window 
    117    * 
    118    * @param event Event object 
    119    */ 
    120   virtual void closeEvent(QCloseEvent* event); 
    121  
    122   /** 
    123    * Repaint icon window 
    124    * 
    125    * @param event Event object 
    126    */ 
    127   virtual void paintEvent(QPaintEvent* event); 
    128  
    129   QMenu* myMenu; 
    130112  DockIconWidget* myIcon; 
    131113  int myNewMsg; 
     
    134116  unsigned short myStatus; 
    135117  bool myInvisible; 
    136   QPixmap myStatusIcon; 
    137   QPixmap myEventIcon; 
    138  
    139   friend class DockIconWidget; 
     118  QPixmap* myStatusIcon; 
     119  QPixmap* myEventIcon; 
    140120 
    141121private: