Diffstat (limited to 'noncore/comm/keypebble/krfbcanvas.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/comm/keypebble/krfbcanvas.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/noncore/comm/keypebble/krfbcanvas.h b/noncore/comm/keypebble/krfbcanvas.h new file mode 100644 index 0000000..7864f1c --- a/dev/null +++ b/noncore/comm/keypebble/krfbcanvas.h @@ -0,0 +1,54 @@ +// -*- c++ -*- + +#ifndef KRFBCANVAS_H +#define KRFBCANVAS_H + +#include <qscrollview.h> +#include <qurl.h> + +class KRFBConnection; + +/** + * Displays data from an KRFBDecoder, and sends events to the + * KRFBConnection. + */ +class KRFBCanvas : public QScrollView +{ + Q_OBJECT +public: + KRFBCanvas( QWidget *parent, const char *name=0 ); + ~KRFBCanvas(); + + void setConnection( KRFBConnection * ); + KRFBConnection *connection() { return connection_; }; + +public slots: + void openConnection(); + void openURL( const QUrl & ); + void closeConnection(); + void passwordRequired( KRFBConnection * ); + + void refresh(); + void bell(); + +protected: + virtual void keyPressEvent( QKeyEvent * ); + virtual void keyReleaseEvent( QKeyEvent * ); + virtual void contentsMousePressEvent( QMouseEvent * ); + virtual void contentsMouseReleaseEvent( QMouseEvent * ); + virtual void contentsMouseMoveEvent( QMouseEvent * ); + + virtual void viewportPaintEvent( QPaintEvent *e ); + +protected slots: + void loggedIn(); + void viewportUpdate( int x, int y, int w, int h ); + void clipboardChanged(); + +private: + KRFBConnection *connection_; + QString password; + bool loggedIn_; +}; + +#endif // KRFBCANVAS_H |