Canorus  0.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
/home/iurt/rpm/BUILD/canorus-0.7.R1002/src/widgets/undotoolbutton.h
Go to the documentation of this file.
00001 
00008 #ifndef UNDOTOOLBUTTON_H_
00009 #define UNDOTOOLBUTTON_H_
00010 
00011 #include "widgets/toolbutton.h"
00012 
00013 #include <QListWidget>
00014 
00015 class QUndoStack;
00016 
00017 class CAUndoToolButton : public CAToolButton {
00018         Q_OBJECT
00019 public:
00020         enum CAUndoToolButtonType {
00021                 Undo,
00022                 Redo
00023         };
00024         
00025         CAUndoToolButton( QIcon icon, CAUndoToolButtonType t, QWidget *parent );
00026         ~CAUndoToolButton();
00027         void setDefaultAction( QAction* );
00028         
00029         inline CAUndoToolButtonType undoType() { return _type; }
00030         inline void setUndoType( CAUndoToolButtonType type ) { _type = type; }
00031         void showButtons();
00032         
00033 public slots:
00034         void onListWidgetItemClicked( QListWidgetItem* );
00035         void onListWidgetItemEntered( QListWidgetItem* );
00036         
00037 protected:
00038         void wheelEvent(QWheelEvent*);
00039         
00040 private:
00041         QListWidget         *_listWidget;
00042         CAUndoToolButtonType _type;
00043         QIcon                _icon;
00044 };
00045 
00046 #endif /* UNDOTOOLBUTTON_H_ */