summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/emulation_widget.h
authoribotty <ibotty>2002-10-11 17:15:59 (UTC)
committer ibotty <ibotty>2002-10-11 17:15:59 (UTC)
commit526ee9ecc0e9b35dfff85f37ece86ab628efd47e (patch) (unidiff)
tree51c8ad3e3caac58150d4386e8f1b37380e40ed93 /noncore/apps/opie-console/emulation_widget.h
parent85249d2b17fe30418342ddc8ef18054f14d3fc10 (diff)
downloadopie-526ee9ecc0e9b35dfff85f37ece86ab628efd47e.zip
opie-526ee9ecc0e9b35dfff85f37ece86ab628efd47e.tar.gz
opie-526ee9ecc0e9b35dfff85f37ece86ab628efd47e.tar.bz2
initial not working commit
Diffstat (limited to 'noncore/apps/opie-console/emulation_widget.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/emulation_widget.h80
1 files changed, 80 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/emulation_widget.h b/noncore/apps/opie-console/emulation_widget.h
new file mode 100644
index 0000000..9d0f63e
--- a/dev/null
+++ b/noncore/apps/opie-console/emulation_widget.h
@@ -0,0 +1,80 @@
1// opie console includes
2#include "widget_layer.h"
3#include "profile.h"
4#include "common.h"
5
6// qt includes
7#include <qwidget.h>
8#include <qpainter.h>
9#include <qstring.h>
10#include <qarray.h>
11#include <qrect.h>
12
13
14/**
15 * EmulationWidget
16 * simple implementation of EmulationLayer
17 * (doesn't support scrollbar, history, etc, yet)
18 */
19class EmulationWidget : public WidgetLayer
20{ Q_OBJECT
21
22public:
23
24 /**
25 * constructor
26 * @param const Profile& config, the configuration
27 * @param QWidget* parent, parent widget
28 * @param const char* name, the name of the widget
29 */
30 EmulationWidget( const Profile& config, QWidget *parent=0, const char *name =0 );
31
32 /**
33 * destructor
34 */
35 ~EmulationWidget();
36
37 /**
38 * sets the image
39 * @param QArray<Character> const newimg, the new image
40 * @param int lines, lines of the new image
41 * @param int columns, columns of the new image
42 */
43 virtual void setImage( QArray<Character> const newimg, int columns, int lines );
44
45 /**
46 * reloads configuration
47 * @param const Profile& config, configuration
48 */
49 virtual void reloadConfig( const Profile& config );
50
51 /**
52 * sets the scrollbar (not yet implemented)
53 */
54 virtual void setScroll( int cursor, int slines );
55
56 /**
57 * scrolls (not yet implemented)
58 * @param int value, scroll by this value
59 */
60 virtual void scroll( int value );
61
62protected:
63
64 /**
65 * calculates current image bounds
66 */
67 virtual void calcGeometry();
68
69 /**
70 * draws a String
71 * @param QString& string, string to be drawn
72 * @param QPainter& painter, painter, that should draw
73 * @param QRect rect, rect to be drawn into
74 * @param Character attr, attributes of Characters
75 * @param bool usePixmap, if to use the background pixmap (currently not supported)
76 * @param bool clear, if rect should be cleared
77 */
78 void drawAttrString( QString& string, QPainter& painter, QRect rect, Character attr, bool pm, bool clear );
79
80}