author | kergoth <kergoth> | 2002-01-25 22:14:26 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-01-25 22:14:26 (UTC) |
commit | 15318cad33835e4e2dc620d033e43cd930676cdd (patch) (side-by-side diff) | |
tree | c2fa0399a2c47fda8e2cd0092c73a809d17f68eb /noncore/comm/keypebble/krfbcanvas.h | |
download | opie-15318cad33835e4e2dc620d033e43cd930676cdd.zip opie-15318cad33835e4e2dc620d033e43cd930676cdd.tar.gz opie-15318cad33835e4e2dc620d033e43cd930676cdd.tar.bz2 |
Initial revision
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 |