author | ibotty <ibotty> | 2002-10-13 10:27:40 (UTC) |
---|---|---|
committer | ibotty <ibotty> | 2002-10-13 10:27:40 (UTC) |
commit | b8377d9c462d7edbc92c6809503cb53a09f8fd98 (patch) (side-by-side diff) | |
tree | 87e592def2ca4838665de93ba0e93125cffec1d8 | |
parent | 034504c65f8115f6a2fbd4f022082cc867aa2605 (diff) | |
download | opie-b8377d9c462d7edbc92c6809503cb53a09f8fd98.zip opie-b8377d9c462d7edbc92c6809503cb53a09f8fd98.tar.gz opie-b8377d9c462d7edbc92c6809503cb53a09f8fd98.tar.bz2 |
added call to calcGeometry in constructor of EmulationWidget.
hopefully fixes the 50x1 size problem
-rw-r--r-- | noncore/apps/opie-console/emulation_widget.cpp | 3 | ||||
-rw-r--r-- | noncore/apps/opie-console/widget_layer.h | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/emulation_widget.cpp b/noncore/apps/opie-console/emulation_widget.cpp index 5c3b2d2..318d7bb 100644 --- a/noncore/apps/opie-console/emulation_widget.cpp +++ b/noncore/apps/opie-console/emulation_widget.cpp @@ -5,48 +5,51 @@ #include "profile.h" // qt includes #include <qwidget.h> #include <qarray.h> #include <qstring.h> #include <qpainter.h> #include <qrect.h> #include <qscrollbar.h> #define rimX 0 // left/right rim width #define rimY 0 // top/bottom rim high #define SCRWIDTH 16 // width of scrollbar EmulationWidget::EmulationWidget( const Profile& config, QWidget *parent, const char* name ) : WidgetLayer( config, parent, name ) { // initialize font attributes QFontMetrics fm( font() ); f_height = fm.height(); f_width = fm.maxWidth(); f_ascent = fm.ascent(); + // give reasonable defaults to m_columns, m_lines + calcGeometry(); + // initialize scrollbar related vars m_scrollbar = new QScrollBar( this ); m_scrollbar->setCursor( arrowCursor ); // load config reloadConfig( config ); m_resizing = false; } void EmulationWidget::reloadConfig( const Profile& config ) { // nothing yet } EmulationWidget::~EmulationWidget() { //clean up } static QChar vt100extended(QChar c) { switch (c.unicode()) diff --git a/noncore/apps/opie-console/widget_layer.h b/noncore/apps/opie-console/widget_layer.h index bc8fe36..067f3da 100644 --- a/noncore/apps/opie-console/widget_layer.h +++ b/noncore/apps/opie-console/widget_layer.h @@ -5,48 +5,50 @@ /* -------------------------------------------------------------------------- */ // proposal of a widget Layer in opie-console // // fellow devels: // just mail me (ibotty@web.de), what you additionally need from the main widget // (or say in chat) #ifndef WIDGET_LAYER_H #define WIDGET_LAYER_H // qt includes #include <qapplication.h> #include <qframe.h> #include <qarray.h> #include <qtimer.h> #include <qkeycode.h> #include <qclipboard.h> // opie-console includes #include "session.h" #include "common.h" #include "profile.h" + + /* * given a pseudo location ( column, line ), * returns the actual index, in the QArray<Character> */ #define loc(X,Y) ((Y)*m_columns+(X)) extern unsigned short vt100_graphics[32]; class WidgetLayer : public QFrame { Q_OBJECT public: /** * constructor * @param const Profile &config, the configuration for this widget * @param QWidget *parent, the parent widget * @param const char *name, the name of the widget, defaults to "" */ WidgetLayer( const Profile& config, QWidget *parent=0, const char *name=0 ); /** |