summaryrefslogtreecommitdiff
path: root/core/apps/textedit/textedit.cpp
Unidiff
Diffstat (limited to 'core/apps/textedit/textedit.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/textedit.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp
index 55725cc..b54da34 100644
--- a/core/apps/textedit/textedit.cpp
+++ b/core/apps/textedit/textedit.cpp
@@ -154,26 +154,26 @@ static const int fontsize[nfontsizes] = {8,10,12,14,18,24};
154 154
155TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f ) 155TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f )
156 : QMainWindow( parent, name, f ), bFromDocView( false ) 156 : QMainWindow( parent, name, f ), bFromDocView( false )
157{ 157{
158 doc = 0; 158 doc = 0;
159 edited=false; 159 edited=false;
160 fromSetDocument=false; 160 fromSetDocument=false;
161 161
162 setToolBarsMovable( false ); 162 setToolBarsMovable( false );
163 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); 163 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
164 164
165 channel = new QCopChannel( "QPE/Application/textedit", this ); 165 channel = new QCopChannel( "QPE/Application/textedit", this );
166 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), 166 connect( channel, SIGNAL(received(const QCString&,const QByteArray&)),
167 this, SLOT(receive(const QCString&, const QByteArray&)) ); 167 this, SLOT(receive(const QCString&,const QByteArray&)) );
168 168
169 setIcon( Resource::loadPixmap( "TextEditor" ) ); 169 setIcon( Resource::loadPixmap( "TextEditor" ) );
170 170
171 QToolBar *bar = new QToolBar( this ); 171 QToolBar *bar = new QToolBar( this );
172 bar->setHorizontalStretchable( true ); 172 bar->setHorizontalStretchable( true );
173 menu = bar; 173 menu = bar;
174 174
175 QMenuBar *mb = new QMenuBar( bar ); 175 QMenuBar *mb = new QMenuBar( bar );
176 QPopupMenu *file = new QPopupMenu( this ); 176 QPopupMenu *file = new QPopupMenu( this );
177 QPopupMenu *edit = new QPopupMenu( this ); 177 QPopupMenu *edit = new QPopupMenu( this );
178 QPopupMenu *advancedMenu = new QPopupMenu(this); 178 QPopupMenu *advancedMenu = new QPopupMenu(this);
179 179
@@ -316,25 +316,25 @@ TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f )
316 316
317 mb->insertItem( tr( "File" ), file ); 317 mb->insertItem( tr( "File" ), file );
318 mb->insertItem( tr( "Edit" ), edit ); 318 mb->insertItem( tr( "Edit" ), edit );
319 mb->insertItem( tr( "View" ), font ); 319 mb->insertItem( tr( "View" ), font );
320 320
321 searchBar = new QToolBar(this); 321 searchBar = new QToolBar(this);
322 addToolBar( searchBar, "Search", QMainWindow::Top, true ); 322 addToolBar( searchBar, "Search", QMainWindow::Top, true );
323 323
324 searchBar->setHorizontalStretchable( true ); 324 searchBar->setHorizontalStretchable( true );
325 325
326 searchEdit = new QLineEdit( searchBar, "searchEdit" ); 326 searchEdit = new QLineEdit( searchBar, "searchEdit" );
327 searchBar->setStretchableWidget( searchEdit ); 327 searchBar->setStretchableWidget( searchEdit );
328 connect( searchEdit, SIGNAL( textChanged( const QString & ) ), 328 connect( searchEdit, SIGNAL( textChanged(const QString&) ),
329 this, SLOT( search() ) ); 329 this, SLOT( search() ) );
330 330
331 a = new QAction( tr( "Find Next" ), Resource::loadPixmap( "next" ), 331 a = new QAction( tr( "Find Next" ), Resource::loadPixmap( "next" ),
332 QString::null, 0, this, 0 ); 332 QString::null, 0, this, 0 );
333 connect( a, SIGNAL( activated() ), this, SLOT( findNext() ) ); 333 connect( a, SIGNAL( activated() ), this, SLOT( findNext() ) );
334 a->addTo( searchBar ); 334 a->addTo( searchBar );
335 a->addTo( edit ); 335 a->addTo( edit );
336 336
337 a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), 337 a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ),
338 QString::null, 0, this, 0 ); 338 QString::null, 0, this, 0 );
339 connect( a, SIGNAL( activated() ), this, SLOT( findClose() ) ); 339 connect( a, SIGNAL( activated() ), this, SLOT( findClose() ) );
340 a->addTo( searchBar ); 340 a->addTo( searchBar );
@@ -574,26 +574,26 @@ void TextEdit::fileOpen() {
574} 574}
575 575
576void TextEdit::doSearchBar() { 576void TextEdit::doSearchBar() {
577 if(!useSearchBar) 577 if(!useSearchBar)
578 searchBar->hide(); 578 searchBar->hide();
579 else 579 else
580 searchBar->show(); 580 searchBar->show();
581} 581}
582 582
583#if 0 583#if 0
584void TextEdit::slotFind() { 584void TextEdit::slotFind() {
585 FindDialog frmFind( tr("Text Editor"), this ); 585 FindDialog frmFind( tr("Text Editor"), this );
586 connect( &frmFind, SIGNAL(signalFindClicked(const QString &, bool, bool, int)), 586 connect( &frmFind, SIGNAL(signalFindClicked(const QString&,bool,bool,int)),
587 editor, SLOT(slotDoFind( const QString&,bool,bool))); 587 editor, SLOT(slotDoFind(const QString&,bool,bool)));
588 588
589 //case sensitive, backwards, [category] 589 //case sensitive, backwards, [category]
590 590
591 connect( editor, SIGNAL(notFound()), 591 connect( editor, SIGNAL(notFound()),
592 &frmFind, SLOT(slotNotFound()) ); 592 &frmFind, SLOT(slotNotFound()) );
593 connect( editor, SIGNAL(searchWrapped()), 593 connect( editor, SIGNAL(searchWrapped()),
594 &frmFind, SLOT(slotWrapAround()) ); 594 &frmFind, SLOT(slotWrapAround()) );
595 595
596 frmFind.exec(); 596 frmFind.exec();
597 597
598 598
599} 599}