summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/textedit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp
index 26b907b..63709dd 100644
--- a/core/apps/textedit/textedit.cpp
+++ b/core/apps/textedit/textedit.cpp
@@ -124,97 +124,97 @@ void QpeEditor::find ( const QString &txt, bool caseSensitive,
124 //ignore backwards for now.... 124 //ignore backwards for now....
125 if ( !backwards ) { 125 if ( !backwards ) {
126 for ( ; ; ) { 126 for ( ; ; ) {
127 if ( line >= numLines() ) { 127 if ( line >= numLines() ) {
128 wrap = true; 128 wrap = true;
129 //emit notFound(); 129 //emit notFound();
130 break; 130 break;
131 } 131 }
132 int findCol = getString( line )->find( txt, col, caseSensitive ); 132 int findCol = getString( line )->find( txt, col, caseSensitive );
133 if ( findCol >= 0 ) { 133 if ( findCol >= 0 ) {
134 setCursorPosition( line, findCol, false ); 134 setCursorPosition( line, findCol, false );
135 col = findCol + txt.length(); 135 col = findCol + txt.length();
136 setCursorPosition( line, col, true ); 136 setCursorPosition( line, col, true );
137 137
138 //found = true; 138 //found = true;
139 break; 139 break;
140 } 140 }
141 line++; 141 line++;
142 col = 0; 142 col = 0;
143 } 143 }
144 } 144 }
145} 145}
146 146
147 147
148#else 148#else
149 149
150#error "Must make a QpeEditor that inherits QTextEdit" 150#error "Must make a QpeEditor that inherits QTextEdit"
151 151
152#endif 152#endif
153 153
154 154
155static const int nfontsizes = 6; 155static const int nfontsizes = 6;
156static const int fontsize[nfontsizes] = {8,10,12,14,18,24}; 156static const int fontsize[nfontsizes] = {8,10,12,14,18,24};
157 157
158TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f ) 158TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f )
159 : QMainWindow( parent, name, f ), bFromDocView( false ) 159 : QMainWindow( parent, name, f ), bFromDocView( false )
160{ 160{
161 doc = 0; 161 doc = 0;
162 edited=false; 162 edited=false;
163 fromSetDocument=false; 163 fromSetDocument=false;
164 164
165 setToolBarsMovable( false ); 165 setToolBarsMovable( false );
166 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); 166 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
167 167
168 channel = new QCopChannel( "QPE/Application/textedit", this ); 168 channel = new QCopChannel( "QPE/Application/textedit", this );
169 connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), 169 connect( channel, SIGNAL(received(const QCString&,const QByteArray&)),
170 this, SLOT(receive(const QCString&,const QByteArray&)) ); 170 this, SLOT(receive(const QCString&,const QByteArray&)) );
171 171
172 setIcon( Resource::loadPixmap( "TextEditor" ) ); 172 setIcon( Resource::loadPixmap( "textedit/TextEditor" ) );
173 173
174 QToolBar *bar = new QToolBar( this ); 174 QToolBar *bar = new QToolBar( this );
175 bar->setHorizontalStretchable( true ); 175 bar->setHorizontalStretchable( true );
176 menu = bar; 176 menu = bar;
177 177
178 QMenuBar *mb = new QMenuBar( bar ); 178 QMenuBar *mb = new QMenuBar( bar );
179 QPopupMenu *file = new QPopupMenu( this ); 179 QPopupMenu *file = new QPopupMenu( this );
180 QPopupMenu *edit = new QPopupMenu( this ); 180 QPopupMenu *edit = new QPopupMenu( this );
181 QPopupMenu *advancedMenu = new QPopupMenu(this); 181 QPopupMenu *advancedMenu = new QPopupMenu(this);
182 182
183 font = new QPopupMenu( this ); 183 font = new QPopupMenu( this );
184 184
185 bar = new QToolBar( this ); 185 bar = new QToolBar( this );
186 editBar = bar; 186 editBar = bar;
187 187
188 QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), 188 QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ),
189 QString::null, 0, this, 0 ); 189 QString::null, 0, this, 0 );
190 connect( a, SIGNAL( activated() ), this, SLOT( fileNew() ) ); 190 connect( a, SIGNAL( activated() ), this, SLOT( fileNew() ) );
191// a->addTo( bar ); 191// a->addTo( bar );
192 a->addTo( file ); 192 a->addTo( file );
193 193
194 a = new QAction( tr( "Open" ), Resource::loadPixmap( "fileopen" ), 194 a = new QAction( tr( "Open" ), Resource::loadPixmap( "fileopen" ),
195 QString::null, 0, this, 0 ); 195 QString::null, 0, this, 0 );
196 connect( a, SIGNAL( activated() ), this, SLOT( fileOpen() ) ); 196 connect( a, SIGNAL( activated() ), this, SLOT( fileOpen() ) );
197 a->addTo( bar ); 197 a->addTo( bar );
198 a->addTo( file ); 198 a->addTo( file );
199 199
200 a = new QAction( tr( "Save" ), Resource::loadPixmap("save") , 200 a = new QAction( tr( "Save" ), Resource::loadPixmap("save") ,
201 QString::null, 0, this, 0 ); 201 QString::null, 0, this, 0 );
202 connect( a, SIGNAL( activated() ), this, SLOT( save() ) ); 202 connect( a, SIGNAL( activated() ), this, SLOT( save() ) );
203 file->insertSeparator(); 203 file->insertSeparator();
204 a->addTo( bar ); 204 a->addTo( bar );
205 a->addTo( file ); 205 a->addTo( file );
206 206
207 a = new QAction( tr( "Save As" ), Resource::loadPixmap("save") , 207 a = new QAction( tr( "Save As" ), Resource::loadPixmap("save") ,
208 QString::null, 0, this, 0 ); 208 QString::null, 0, this, 0 );
209 connect( a, SIGNAL( activated() ), this, SLOT( saveAs() ) ); 209 connect( a, SIGNAL( activated() ), this, SLOT( saveAs() ) );
210 a->addTo( file ); 210 a->addTo( file );
211 211
212 a = new QAction( tr( "Cut" ), Resource::loadPixmap( "cut" ), 212 a = new QAction( tr( "Cut" ), Resource::loadPixmap( "cut" ),
213 QString::null, 0, this, 0 ); 213 QString::null, 0, this, 0 );
214 connect( a, SIGNAL( activated() ), this, SLOT( editCut() ) ); 214 connect( a, SIGNAL( activated() ), this, SLOT( editCut() ) );
215 a->addTo( editBar ); 215 a->addTo( editBar );
216 a->addTo( edit ); 216 a->addTo( edit );
217 217
218 a = new QAction( tr( "Copy" ), Resource::loadPixmap( "copy" ), 218 a = new QAction( tr( "Copy" ), Resource::loadPixmap( "copy" ),
219 QString::null, 0, this, 0 ); 219 QString::null, 0, this, 0 );
220 connect( a, SIGNAL( activated() ), this, SLOT( editCopy() ) ); 220 connect( a, SIGNAL( activated() ), this, SLOT( editCopy() ) );