Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

multiline_ex.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002                           multiline_ex.cpp  -  description
00003                              -------------------
00004     begin                : Fri Aug 25 2000
00005     copyright            : (C) 2000 -2004 by llornkcor
00006     email                : ljp@llornkcor.com
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 //#include <qmultilineedit.h>
00018 #include "multiline_ex.h"
00019 
00020 struct MultiLine_ExData
00021 //class  MultiLine_ExData
00022 {
00023 public:
00024     QColorGroup mypapcolgrp;
00025     QColorGroup papcolgrp;
00026     uint ownpalette : 1;
00027 };
00028 
00029 
00030 MultiLine_Ex::MultiLine_Ex( QWidget *parent ,  const char *name  )
00031     :QMultiLineEdit( parent,name )
00032 {
00033 
00034 #ifndef Q_WS_QWS
00035 //    clearTableFlags( Tbl_autoHScrollBar | Tbl_autoVScrollBar);  //for pre release testing
00036 #else
00037 // clearTableFlags( Tbl_autoVScrollBar );  //for pre release testing
00038 #endif
00039 //     clearTableFlags( Tbl_autoHScrollBar | Tbl_autoVScrollBar); // for release
00040 //    init();
00041 }
00042 
00043 void MultiLine_Ex::pageDown( bool mark )
00044 {
00045   QMultiLineEdit::pageDown( mark );
00046 }
00047 
00048 void MultiLine_Ex::pageUp( bool mark )
00049 {
00050   QMultiLineEdit::pageUp(  mark );
00051 }
00052 
00053 
00054 void MultiLine_Ex::cursorLeft( bool mark, bool wrap )
00055 {
00056   QMultiLineEdit::cursorLeft( mark, wrap );
00057 }
00058 
00059 void MultiLine_Ex::cursorRight( bool mark, bool wrap )
00060 {
00061   QMultiLineEdit::cursorRight(  mark,  wrap );
00062 }
00063 
00064 void MultiLine_Ex::cursorUp( bool mark )
00065 {
00066   QMultiLineEdit::cursorUp(  mark );
00067 }
00068 
00069 void MultiLine_Ex::cursorDown( bool mark )
00070 {
00071   QMultiLineEdit::cursorDown(  mark );
00072 }
00073 
00074 
00075 //void MultiLine_Ex::setPaper( const QBrush& pap)
00076 //{
00077 
00078 //}
00079 
00080 int MultiLine_Ex::lastRow()
00081 {
00082   return lastRowVisible();
00083 }
00084 
00085 int MultiLine_Ex::topRow()
00086 {
00087   return topCell();
00088 }
00089 
00090 int MultiLine_Ex::editSize( )
00091 {
00092   return viewHeight() / cellHeight();
00093 //scroll( 0, int yPixels );
00094 }
00095 
00096 void MultiLine_Ex::ScrollUp( int lines )
00097 {
00098     for( int i = 0; i < lines; i++) {
00099     this->setTopCell( topCell() + 1 );
00100     }
00101 }
00102 
00103 void MultiLine_Ex::ScrollDown( int lines )
00104 {
00105   for( int i = 0; i < lines; i++) {
00106   this->setTopCell( topCell() -1 );
00107   }
00108 }
00109 
00110 int MultiLine_Ex::lineHeight( int row)
00111 {
00112   return this->cellHeight(row );
00113 }
00114 
00115 int MultiLine_Ex::Top( )
00116 {
00117   return this->topCell();
00118 }
00119 
00120 int MultiLine_Ex::Rows( )
00121 {
00122   return findRow ( 1 );
00123 }
00124 
00125 int MultiLine_Ex::PageSize()
00126 {
00127   return viewHeight() / cellHeight() ;
00128 }
00129 
00130 bool MultiLine_Ex::hasSelectedText()
00131 {
00132   return QMultiLineEdit::hasMarkedText();
00133 }

Generated on Sat Nov 5 16:16:52 2005 for OPIE by  doxygen 1.4.2