summaryrefslogtreecommitdiff
path: root/noncore
authoribotty <ibotty>2002-10-14 08:54:34 (UTC)
committer ibotty <ibotty>2002-10-14 08:54:34 (UTC)
commit59d6018e53537e15d27cd0174adefba2ec8b8f6e (patch) (side-by-side diff)
tree5f55e9c314b7918b1abf92d2a98561039a499084 /noncore
parent2c2d282f3d665035300873bddab6e64c843ebc0e (diff)
downloadopie-59d6018e53537e15d27cd0174adefba2ec8b8f6e.zip
opie-59d6018e53537e15d27cd0174adefba2ec8b8f6e.tar.gz
opie-59d6018e53537e15d27cd0174adefba2ec8b8f6e.tar.bz2
added sizeHint method, hopefully (dont really think so) fixes size problem
VS: ----------------------------------------------------------------------
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/emulation_widget.cpp9
-rw-r--r--noncore/apps/opie-console/emulation_widget.h2
-rw-r--r--noncore/apps/opie-console/widget_layer.cpp6
-rw-r--r--noncore/apps/opie-console/widget_layer.h5
4 files changed, 21 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/emulation_widget.cpp b/noncore/apps/opie-console/emulation_widget.cpp
index e11c5e4..40199fa 100644
--- a/noncore/apps/opie-console/emulation_widget.cpp
+++ b/noncore/apps/opie-console/emulation_widget.cpp
@@ -92,2 +92,9 @@ static QChar vt100extended(QChar c)
+QSize EmulationWidget::calcSize( int cols, int lins ) const
+{
+ int frw = width() - contentsRect().width();
+ int frh = height() - contentsRect().height();
+ int scw = (scrollLoc == SCRNONE? 0 : m_scrollbar->width() );
+ return QSize( f_width * cols + 2 * rimX + frw + scw, f_height * lins + 2 * rimY + frh );
+}
@@ -119,3 +126,3 @@ void EmulationWidget::setImage( QArray<Character> const newimg, int lines, int c
const Character* lcl = &m_image[y * m_columns];
- const Character* ext = &newimg[y * columns];
+ const Character* ext = &newimg[y * m_columns];
if ( ! m_resizing )
diff --git a/noncore/apps/opie-console/emulation_widget.h b/noncore/apps/opie-console/emulation_widget.h
index e185534..5e20dc4 100644
--- a/noncore/apps/opie-console/emulation_widget.h
+++ b/noncore/apps/opie-console/emulation_widget.h
@@ -62,2 +62,4 @@ public:
+ virtual QSize calcSize( int cols, int lins ) const;
+
protected:
diff --git a/noncore/apps/opie-console/widget_layer.cpp b/noncore/apps/opie-console/widget_layer.cpp
index e4b0ede..ac84f8b 100644
--- a/noncore/apps/opie-console/widget_layer.cpp
+++ b/noncore/apps/opie-console/widget_layer.cpp
@@ -55,2 +55,8 @@ WidgetLayer::~WidgetLayer()
+QSize WidgetLayer::sizeHint()
+{
+ return size();
+}
+
+
/* --------------------------------- audio ---------------------------------- */
diff --git a/noncore/apps/opie-console/widget_layer.h b/noncore/apps/opie-console/widget_layer.h
index 0c290f3..6812711 100644
--- a/noncore/apps/opie-console/widget_layer.h
+++ b/noncore/apps/opie-console/widget_layer.h
@@ -125,2 +125,7 @@ public:
virtual bool eventFilter( QObject *obj, QEvent *event );
+
+
+ QSize sizeHint();
+
+ virtual QSize calcSize( int cols, int lins ) const = 0;
signals: