summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-gutenbrowser/multiline_ex.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-gutenbrowser/multiline_ex.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-gutenbrowser/multiline_ex.cpp133
1 files changed, 133 insertions, 0 deletions
diff --git a/noncore/apps/opie-gutenbrowser/multiline_ex.cpp b/noncore/apps/opie-gutenbrowser/multiline_ex.cpp
new file mode 100644
index 0000000..16ddd67
--- a/dev/null
+++ b/noncore/apps/opie-gutenbrowser/multiline_ex.cpp
@@ -0,0 +1,133 @@
1/***************************************************************************
2 multiline_ex.cpp - description
3 -------------------
4 begin : Fri Aug 25 2000
5 copyright : (C) 2000 -2004 by llornkcor
6 email : ljp@llornkcor.com
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17//#include <qmultilineedit.h>
18#include "multiline_ex.h"
19
20struct MultiLine_ExData
21//class MultiLine_ExData
22{
23public:
24 QColorGroup mypapcolgrp;
25 QColorGroup papcolgrp;
26 uint ownpalette : 1;
27};
28
29
30MultiLine_Ex::MultiLine_Ex( QWidget *parent , const char *name )
31 :QMultiLineEdit( parent,name )
32{
33
34#ifndef Q_WS_QWS
35// clearTableFlags( Tbl_autoHScrollBar | Tbl_autoVScrollBar); //for pre release testing
36#else
37// clearTableFlags( Tbl_autoVScrollBar ); //for pre release testing
38#endif
39// clearTableFlags( Tbl_autoHScrollBar | Tbl_autoVScrollBar); // for release
40// init();
41}
42
43void MultiLine_Ex::pageDown( bool mark )
44{
45 QMultiLineEdit::pageDown( mark );
46}
47
48void MultiLine_Ex::pageUp( bool mark )
49{
50 QMultiLineEdit::pageUp( mark );
51}
52
53
54void MultiLine_Ex::cursorLeft( bool mark, bool wrap )
55{
56 QMultiLineEdit::cursorLeft( mark, wrap );
57}
58
59void MultiLine_Ex::cursorRight( bool mark, bool wrap )
60{
61 QMultiLineEdit::cursorRight( mark, wrap );
62}
63
64void MultiLine_Ex::cursorUp( bool mark )
65{
66 QMultiLineEdit::cursorUp( mark );
67}
68
69void MultiLine_Ex::cursorDown( bool mark )
70{
71 QMultiLineEdit::cursorDown( mark );
72}
73
74
75//void MultiLine_Ex::setPaper( const QBrush& pap)
76//{
77
78//}
79
80int MultiLine_Ex::lastRow()
81{
82 return lastRowVisible();
83}
84
85int MultiLine_Ex::topRow()
86{
87 return topCell();
88}
89
90int MultiLine_Ex::editSize( )
91{
92 return viewHeight() / cellHeight();
93//scroll( 0, int yPixels );
94}
95
96void MultiLine_Ex::ScrollUp( int lines )
97{
98 for( int i = 0; i < lines; i++) {
99 this->setTopCell( topCell() + 1 );
100 }
101}
102
103void MultiLine_Ex::ScrollDown( int lines )
104{
105 for( int i = 0; i < lines; i++) {
106 this->setTopCell( topCell() -1 );
107 }
108}
109
110int MultiLine_Ex::lineHeight( int row)
111{
112 return this->cellHeight(row );
113}
114
115int MultiLine_Ex::Top( )
116{
117 return this->topCell();
118}
119
120int MultiLine_Ex::Rows( )
121{
122 return findRow ( 1 );
123}
124
125int MultiLine_Ex::PageSize()
126{
127 return viewHeight() / cellHeight() ;
128}
129
130bool MultiLine_Ex::hasSelectedText()
131{
132 return QMultiLineEdit::hasMarkedText();
133}