00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef MEDIUMBUTTON_H
00021 #define MEDIUMBUTTON_H
00022
00023 #include <panelbutton.h>
00024 #include <tqpoint.h>
00025 #include <tqstring.h>
00026 #include <tqpixmap.h>
00027 #include <tqcursor.h>
00028 #include <tqtimer.h>
00029 #include <kfileitem.h>
00030 #include <kpanelapplet.h>
00031 #include <kactioncollection.h>
00032
00033 class MediumButton : public PanelPopupButton
00034 {
00035 Q_OBJECT
00036
00037 public:
00038 MediumButton(TQWidget *parent, const KFileItem &fileItem);
00039 ~MediumButton();
00040 const KFileItem &fileItem() const;
00041 void setFileItem(const KFileItem &fileItem);
00042 void setPanelPosition(KPanelApplet::Position position);
00043
00044 protected:
00045 TQString tileName();
00046 void refreshType();
00047 void initPopup();
00048 void dragEnterEvent( TQDragEnterEvent* );
00049 void dragLeaveEvent( TQDragLeaveEvent* );
00050 void dropEvent(TQDropEvent *e);
00051
00052 protected slots:
00053
00054
00055
00056 void slotPaste();
00057 void slotCopy();
00058 void slotDragOpen();
00059
00060 private:
00061 KActionCollection mActions;
00062 KFileItem mFileItem;
00063 TQTimer mOpenTimer;
00064 };
00065
00066 #endif