author | ibotty <ibotty> | 2002-10-12 17:27:39 (UTC) |
---|---|---|
committer | ibotty <ibotty> | 2002-10-12 17:27:39 (UTC) |
commit | 9c983d273b055d847cf2d1fa4f5b6e082ce850c9 (patch) (side-by-side diff) | |
tree | e9e6c6320ad3ba926089786f7b187dc62b0af359 /noncore/apps/opie-console/emulation_widget.h | |
parent | e6b92ad451dba66f4eb5000a41b96eb2ee203dce (diff) | |
download | opie-9c983d273b055d847cf2d1fa4f5b6e082ce850c9.zip opie-9c983d273b055d847cf2d1fa4f5b6e082ce850c9.tar.gz opie-9c983d273b055d847cf2d1fa4f5b6e082ce850c9.tar.bz2 |
added functionality to emulation_widget
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.h | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/noncore/apps/opie-console/emulation_widget.h b/noncore/apps/opie-console/emulation_widget.h index 56ea15f..e185534 100644 --- a/noncore/apps/opie-console/emulation_widget.h +++ b/noncore/apps/opie-console/emulation_widget.h @@ -2,24 +2,25 @@ #include "widget_layer.h" #include "profile.h" #include "common.h" // qt includes #include <qwidget.h> #include <qpainter.h> #include <qstring.h> #include <qarray.h> #include <qrect.h> + /** * EmulationWidget * simple implementation of EmulationLayer * (doesn't support scrollbar, history, etc, yet) */ class EmulationWidget : public WidgetLayer { Q_OBJECT public: /** * constructor @@ -31,50 +32,81 @@ public: /** * destructor */ ~EmulationWidget(); /** * sets the image * @param QArray<Character> const newimg, the new image * @param int lines, lines of the new image * @param int columns, columns of the new image */ - virtual void setImage( QArray<Character> const newimg, int columns, int lines ) {}; + virtual void setImage( QArray<Character> const newimg, int columns, int lines ); /** * reloads configuration * @param const Profile& config, configuration */ - virtual void reloadConfig( const Profile& config ) {}; + virtual void reloadConfig( const Profile& config ); /** * sets the scrollbar (not yet implemented) */ virtual void setScroll( int cursor, int slines ); /** * scrolls (not yet implemented) * @param int value, scroll by this value */ virtual void scroll( int value ); protected: /** * calculates current image bounds */ - virtual void calcGeometry() {}; + virtual void calcGeometry(); + + + /** + * @param const ColorEntry* table, the new color table + */ + void setColorTable( const ColorEntry table[] ); /** * draws a String * @param QString& string, string to be drawn * @param QPainter& painter, painter, that should draw * @param QRect rect, rect to be drawn into * @param Character attr, attributes of Characters * @param bool usePixmap, if to use the background pixmap (currently not supported) * @param bool clear, if rect should be cleared */ void drawAttrString( QString& string, QPainter& painter, QRect rect, Character attr, bool pm, bool clear ); +protected: + + enum ScrollLocation + { + SCRNONE, + SCRLEFT, + SCRIGHT + }; + + int f_height; + int f_width; + int f_ascent; + int m_blX; + int m_blY; + int m_brX; + + int m_bY; + int m_bX; + QScrollBar* m_scrollbar; + + ScrollLocation scrollLoc; + + ColorEntry* color_table; + + bool blinking; }; |