diff options
author | Mavridis Philippe <mavridisf@gmail.com> | 2021-03-30 13:58:33 +0300 |
---|---|---|
committer | Mavridis Philippe <mavridisf@gmail.com> | 2021-03-30 13:58:33 +0300 |
commit | 74b22318b8df6c1e9355b73a16bb755a5178b8d6 (patch) | |
tree | 538c9e62d606c6718fa64f8c8f2ad42e4aefc1ad /src/komposetaskcontainerwidget.h | |
download | kompose-74b22318b8df6c1e9355b73a16bb755a5178b8d6.tar.gz kompose-74b22318b8df6c1e9355b73a16bb755a5178b8d6.zip |
Initial commit (KDE3 version)
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
Diffstat (limited to 'src/komposetaskcontainerwidget.h')
-rw-r--r-- | src/komposetaskcontainerwidget.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/src/komposetaskcontainerwidget.h b/src/komposetaskcontainerwidget.h new file mode 100644 index 0000000..816d487 --- /dev/null +++ b/src/komposetaskcontainerwidget.h @@ -0,0 +1,58 @@ +// +// C++ Interface: komposetaskcontainerwidget +// +// Description: +// +// +// Author: Hans Oischinger <hans.oischinger@kde-mail.net>, (C) 2004 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#ifndef KOMPOSETASKCONTAINERWIDGET_H +#define KOMPOSETASKCONTAINERWIDGET_H + +#include "komposewidget.h" +#include "komposetask.h" +#include "komposelayout.h" + +/** + * This abstract class contains some functions only usable for + * Widgets that display task widgets + * (so I won't have to double the code for the createTaskWidgets() funxtion :) ) + * + * @author Hans Oischinger + */ +class KomposeTaskContainerWidget : public KomposeWidget +{ + Q_OBJECT +public: + KomposeTaskContainerWidget( int desk = 0, QWidget *parent = 0, KomposeLayout *l = 0, const char *name = 0); + + virtual ~KomposeTaskContainerWidget(); + + virtual int getHeightForWidth( int w ) const; + virtual int getWidthForHeight( int h ) const; + virtual double getAspectRatio(); + + void setDesktop( int desk ) { desktop = desk; } + int getDesktop() { return desktop; } + +public slots: + void requestRemoval( KomposeWidget *obj ); + +protected slots: + void createTaskWidgets(); + void createTaskWidget( KomposeTask* task, bool manualShow=true ); + void reparentTaskWidget( KomposeTask* task, int fromDesktop, int toDesktop ); + bool focusNeighbourChild( int direction ); + +protected: + void keyReleaseEvent ( QKeyEvent * e ); + void keyPressEvent ( QKeyEvent * e ); + void childEvent( QChildEvent * ce); + + int desktop; +}; + +#endif |