summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/emulation_widget.cpp3
-rw-r--r--noncore/apps/opie-console/widget_layer.h2
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
@@ -16,24 +16,27 @@
16#define rimY 0 // top/bottom rim high 16#define rimY 0 // top/bottom rim high
17 17
18#define SCRWIDTH 16 // width of scrollbar 18#define SCRWIDTH 16 // width of scrollbar
19 19
20EmulationWidget::EmulationWidget( const Profile& config, QWidget *parent, const char* name ) : WidgetLayer( config, parent, name ) 20EmulationWidget::EmulationWidget( const Profile& config, QWidget *parent, const char* name ) : WidgetLayer( config, parent, name )
21{ 21{
22 22
23 // initialize font attributes 23 // initialize font attributes
24 QFontMetrics fm( font() ); 24 QFontMetrics fm( font() );
25 f_height = fm.height(); 25 f_height = fm.height();
26 f_width = fm.maxWidth(); 26 f_width = fm.maxWidth();
27 f_ascent = fm.ascent(); 27 f_ascent = fm.ascent();
28
29 // give reasonable defaults to m_columns, m_lines
30 calcGeometry();
28 31
29 // initialize scrollbar related vars 32 // initialize scrollbar related vars
30 m_scrollbar = new QScrollBar( this ); 33 m_scrollbar = new QScrollBar( this );
31 m_scrollbar->setCursor( arrowCursor ); 34 m_scrollbar->setCursor( arrowCursor );
32 35
33 // load config 36 // load config
34 reloadConfig( config ); 37 reloadConfig( config );
35 38
36 m_resizing = false; 39 m_resizing = false;
37} 40}
38 41
39void EmulationWidget::reloadConfig( const Profile& config ) 42void EmulationWidget::reloadConfig( const Profile& config )
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
@@ -17,24 +17,26 @@
17#include <qapplication.h> 17#include <qapplication.h>
18#include <qframe.h> 18#include <qframe.h>
19#include <qarray.h> 19#include <qarray.h>
20#include <qtimer.h> 20#include <qtimer.h>
21#include <qkeycode.h> 21#include <qkeycode.h>
22#include <qclipboard.h> 22#include <qclipboard.h>
23 23
24 24
25// opie-console includes 25// opie-console includes
26#include "session.h" 26#include "session.h"
27#include "common.h" 27#include "common.h"
28#include "profile.h" 28#include "profile.h"
29
30
29/* 31/*
30 * given a pseudo location ( column, line ), 32 * given a pseudo location ( column, line ),
31 * returns the actual index, in the QArray<Character> 33 * returns the actual index, in the QArray<Character>
32 */ 34 */
33#define loc(X,Y) ((Y)*m_columns+(X)) 35#define loc(X,Y) ((Y)*m_columns+(X))
34 36
35 37
36 38
37extern unsigned short vt100_graphics[32]; 39extern unsigned short vt100_graphics[32];
38 40
39class WidgetLayer : public QFrame 41class WidgetLayer : public QFrame
40{ Q_OBJECT 42{ Q_OBJECT