summaryrefslogtreecommitdiff
path: root/noncore/apps
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
parent85249d2b17fe30418342ddc8ef18054f14d3fc10 (diff)
downloadopie-526ee9ecc0e9b35dfff85f37ece86ab628efd47e.zip
opie-526ee9ecc0e9b35dfff85f37ece86ab628efd47e.tar.gz
opie-526ee9ecc0e9b35dfff85f37ece86ab628efd47e.tar.bz2
initial not working commit
Diffstat (limited to 'noncore/apps') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/emulation_widget.cpp45
-rw-r--r--noncore/apps/opie-console/emulation_widget.h80
2 files changed, 125 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/emulation_widget.cpp b/noncore/apps/opie-console/emulation_widget.cpp
new file mode 100644
index 0000000..a45db8c
--- a/dev/null
+++ b/noncore/apps/opie-console/emulation_widget.cpp
@@ -0,0 +1,45 @@
1// opie-console includes
2#include "emulation_widget.h"
3#include "common.h"
4#include "widget_layer.h"
5#include "profile.h"
6
7// qt includes
8#include <qwidget.h>
9#include <qarray.h>
10#include <qstring.h>
11#include <qpainter.h>
12#include <qrect.h>
13
14
15EmulationWidget::EmulationWidget( const Profile& config, QWidget *parent, const char* name ) : WidgetLayer( config, parent, name )
16{
17
18}
19
20EmulationWidget::~EmulationWidget()
21{
22}
23
24
25void setImage( QArray<Character> const newimg, int lines, int columns )
26{
27}
28
29void drawAttrString( QString& string, QPainter &paint, QRect rect, Character attr, bool usePixmap, bool clear )
30{
31
32
33}
34
35///////////////////////
36// scrollbar
37// ////////////////////
38
39void EmulationWidget::scroll( int value )
40{
41}
42
43void EmulationWidget::setScroll( int cursor, int slines )
44{
45}
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}