summaryrefslogtreecommitdiff
path: root/core/apps
Unidiff
Diffstat (limited to 'core/apps') (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/embeddedkonsole/commandeditdialog.cpp2
-rw-r--r--core/apps/embeddedkonsole/session.cpp8
-rw-r--r--core/apps/helpbrowser/helpbrowser.cpp20
-rw-r--r--core/apps/textedit/textedit.cpp10
4 files changed, 20 insertions, 20 deletions
diff --git a/core/apps/embeddedkonsole/commandeditdialog.cpp b/core/apps/embeddedkonsole/commandeditdialog.cpp
index c0066d8..6587b26 100644
--- a/core/apps/embeddedkonsole/commandeditdialog.cpp
+++ b/core/apps/embeddedkonsole/commandeditdialog.cpp
@@ -30,49 +30,49 @@ CommandEditDialog::CommandEditDialog(QWidget *parent, const char* name, WFlags f
30 item = new QListViewItem( m_SuggestedCommandList,"date "); 30 item = new QListViewItem( m_SuggestedCommandList,"date ");
31 item = new QListViewItem( m_SuggestedCommandList,"dd "); 31 item = new QListViewItem( m_SuggestedCommandList,"dd ");
32 item = new QListViewItem( m_SuggestedCommandList,"dmesg "); 32 item = new QListViewItem( m_SuggestedCommandList,"dmesg ");
33 item = new QListViewItem( m_SuggestedCommandList,"fuser "); 33 item = new QListViewItem( m_SuggestedCommandList,"fuser ");
34 item = new QListViewItem( m_SuggestedCommandList,"hostname "); 34 item = new QListViewItem( m_SuggestedCommandList,"hostname ");
35 item = new QListViewItem( m_SuggestedCommandList,"kill "); 35 item = new QListViewItem( m_SuggestedCommandList,"kill ");
36 item = new QListViewItem( m_SuggestedCommandList,"killall "); 36 item = new QListViewItem( m_SuggestedCommandList,"killall ");
37 item = new QListViewItem( m_SuggestedCommandList,"ln "); 37 item = new QListViewItem( m_SuggestedCommandList,"ln ");
38 item = new QListViewItem( m_SuggestedCommandList,"ln -s "); 38 item = new QListViewItem( m_SuggestedCommandList,"ln -s ");
39 item = new QListViewItem( m_SuggestedCommandList,"lsmod"); 39 item = new QListViewItem( m_SuggestedCommandList,"lsmod");
40 item = new QListViewItem( m_SuggestedCommandList,"depmod -a"); 40 item = new QListViewItem( m_SuggestedCommandList,"depmod -a");
41 item = new QListViewItem( m_SuggestedCommandList,"modprobe "); 41 item = new QListViewItem( m_SuggestedCommandList,"modprobe ");
42 item = new QListViewItem( m_SuggestedCommandList,"mount "); 42 item = new QListViewItem( m_SuggestedCommandList,"mount ");
43 item = new QListViewItem( m_SuggestedCommandList,"more "); 43 item = new QListViewItem( m_SuggestedCommandList,"more ");
44 item = new QListViewItem( m_SuggestedCommandList,"sort "); 44 item = new QListViewItem( m_SuggestedCommandList,"sort ");
45 item = new QListViewItem( m_SuggestedCommandList,"touch "); 45 item = new QListViewItem( m_SuggestedCommandList,"touch ");
46 item = new QListViewItem( m_SuggestedCommandList,"umount "); 46 item = new QListViewItem( m_SuggestedCommandList,"umount ");
47 item = new QListViewItem( m_SuggestedCommandList,"mknod "); 47 item = new QListViewItem( m_SuggestedCommandList,"mknod ");
48 item = new QListViewItem( m_SuggestedCommandList,"netstat "); 48 item = new QListViewItem( m_SuggestedCommandList,"netstat ");
49 item = new QListViewItem( m_SuggestedCommandList,"route "); 49 item = new QListViewItem( m_SuggestedCommandList,"route ");
50 item = new QListViewItem( m_SuggestedCommandList,"cardctl eject "); 50 item = new QListViewItem( m_SuggestedCommandList,"cardctl eject ");
51 m_SuggestedCommandList->setSelected(m_SuggestedCommandList->firstChild(),TRUE); 51 m_SuggestedCommandList->setSelected(m_SuggestedCommandList->firstChild(),TRUE);
52 m_SuggestedCommandList->sort(); 52 m_SuggestedCommandList->sort();
53 53
54 connect( m_SuggestedCommandList, SIGNAL( clicked( QListViewItem * ) ), m_PlayListSelection, SLOT( addToSelection( QListViewItem *) ) ); 54 connect( m_SuggestedCommandList, SIGNAL( clicked(QListViewItem*) ), m_PlayListSelection, SLOT( addToSelection(QListViewItem*) ) );
55 55
56 56
57 57
58 ToolButton1->setTextLabel("new"); 58 ToolButton1->setTextLabel("new");
59 ToolButton1->setPixmap(Resource::loadPixmap("new")); 59 ToolButton1->setPixmap(Resource::loadPixmap("new"));
60 ToolButton1->setAutoRaise(TRUE); 60 ToolButton1->setAutoRaise(TRUE);
61 ToolButton1->setFocusPolicy(QWidget::NoFocus); 61 ToolButton1->setFocusPolicy(QWidget::NoFocus);
62 connect(ToolButton1,SIGNAL(clicked()),this,SLOT(showAddDialog())); 62 connect(ToolButton1,SIGNAL(clicked()),this,SLOT(showAddDialog()));
63 63
64 ToolButton2->setTextLabel("edit"); 64 ToolButton2->setTextLabel("edit");
65 ToolButton2->setPixmap(Resource::loadPixmap("edit")); 65 ToolButton2->setPixmap(Resource::loadPixmap("edit"));
66 ToolButton2->setAutoRaise(TRUE); 66 ToolButton2->setAutoRaise(TRUE);
67 ToolButton2->setFocusPolicy(QWidget::NoFocus); 67 ToolButton2->setFocusPolicy(QWidget::NoFocus);
68 connect(ToolButton2,SIGNAL(clicked()),this,SLOT(showEditDialog())); 68 connect(ToolButton2,SIGNAL(clicked()),this,SLOT(showEditDialog()));
69 69
70 ToolButton3->setTextLabel("delete"); 70 ToolButton3->setTextLabel("delete");
71 ToolButton3->setPixmap(Resource::loadPixmap("editdelete")); 71 ToolButton3->setPixmap(Resource::loadPixmap("editdelete"));
72 ToolButton3->setAutoRaise(TRUE); 72 ToolButton3->setAutoRaise(TRUE);
73 ToolButton3->setFocusPolicy(QWidget::NoFocus); 73 ToolButton3->setFocusPolicy(QWidget::NoFocus);
74 connect(ToolButton3,SIGNAL(clicked()),m_PlayListSelection,SLOT(removeSelected())); 74 connect(ToolButton3,SIGNAL(clicked()),m_PlayListSelection,SLOT(removeSelected()));
75 75
76 ToolButton4->setTextLabel("up"); 76 ToolButton4->setTextLabel("up");
77 ToolButton4->setPixmap(Resource::loadPixmap("up")); 77 ToolButton4->setPixmap(Resource::loadPixmap("up"));
78 ToolButton4->setAutoRaise(TRUE); 78 ToolButton4->setAutoRaise(TRUE);
diff --git a/core/apps/embeddedkonsole/session.cpp b/core/apps/embeddedkonsole/session.cpp
index 043b8db..a94712a 100644
--- a/core/apps/embeddedkonsole/session.cpp
+++ b/core/apps/embeddedkonsole/session.cpp
@@ -30,71 +30,71 @@ TESession::TESession(QMainWindow* main, TEWidget* _te, const char* _pgm, QStrLis
30 // sh = new TEPty(); 30 // sh = new TEPty();
31 sh = new MyPty(); 31 sh = new MyPty();
32 em = new TEmuVt102(te); 32 em = new TEmuVt102(te);
33 33
34 sh->setSize(te->Lines(),te->Columns()); // not absolutely nessesary 34 sh->setSize(te->Lines(),te->Columns()); // not absolutely nessesary
35 QObject::connect( sh,SIGNAL(block_in(const char*,int)), 35 QObject::connect( sh,SIGNAL(block_in(const char*,int)),
36 em,SLOT(onRcvBlock(const char*,int)) ); 36 em,SLOT(onRcvBlock(const char*,int)) );
37 QObject::connect( em,SIGNAL(ImageSizeChanged(int,int)), 37 QObject::connect( em,SIGNAL(ImageSizeChanged(int,int)),
38 sh,SLOT(setSize(int,int))); 38 sh,SLOT(setSize(int,int)));
39 39
40 // 'main' should do those connects itself, somehow. 40 // 'main' should do those connects itself, somehow.
41 // These aren't KTMW's slots, but konsole's.(David) 41 // These aren't KTMW's slots, but konsole's.(David)
42 42
43/* 43/*
44 QObject::connect( em,SIGNAL(ImageSizeChanged(int,int)), 44 QObject::connect( em,SIGNAL(ImageSizeChanged(int,int)),
45 main,SLOT(notifySize(int,int))); 45 main,SLOT(notifySize(int,int)));
46*/ 46*/
47 QObject::connect( em,SIGNAL(sndBlock(const char*,int)), 47 QObject::connect( em,SIGNAL(sndBlock(const char*,int)),
48 sh,SLOT(send_bytes(const char*,int)) ); 48 sh,SLOT(send_bytes(const char*,int)) );
49 QObject::connect( em,SIGNAL(changeColumns(int)), 49 QObject::connect( em,SIGNAL(changeColumns(int)),
50 main,SLOT(changeColumns(int)) ); 50 main,SLOT(changeColumns(int)) );
51 51
52 52
53 53
54 QObject::connect( em,SIGNAL(changeTitle(int, const QString&)), 54 QObject::connect( em,SIGNAL(changeTitle(int,const QString&)),
55 this,SLOT(changeTitle(int, const QString&)) ); 55 this,SLOT(changeTitle(int,const QString&)) );
56 56
57 QObject::connect( sh,SIGNAL(done(int)), this,SLOT(done(int)) ); 57 QObject::connect( sh,SIGNAL(done(int)), this,SLOT(done(int)) );
58} 58}
59 59
60 60
61 61
62void TESession::run() 62void TESession::run()
63{ 63{
64 //kdDebug() << "Running the session!" << pgm << "\n"; 64 //kdDebug() << "Running the session!" << pgm << "\n";
65 sh->run(pgm,args,term.data(),FALSE); 65 sh->run(pgm,args,term.data(),FALSE);
66} 66}
67 67
68void TESession::kill(int ) // signal) 68void TESession::kill(int ) // signal)
69{ 69{
70// sh->kill(signal); 70// sh->kill(signal);
71} 71}
72 72
73TESession::~TESession() 73TESession::~TESession()
74{ 74{
75 QObject::disconnect( sh, SIGNAL( done( int ) ), 75 QObject::disconnect( sh, SIGNAL( done(int) ),
76 this, SLOT( done( int ) ) ); 76 this, SLOT( done(int) ) );
77 delete em; 77 delete em;
78 delete sh; 78 delete sh;
79} 79}
80 80
81void TESession::setConnect(bool c) 81void TESession::setConnect(bool c)
82{ 82{
83 em->setConnect(c); 83 em->setConnect(c);
84} 84}
85 85
86void TESession::done(int status) 86void TESession::done(int status)
87{ 87{
88 emit done(te,status); 88 emit done(te,status);
89} 89}
90 90
91void TESession::terminate() 91void TESession::terminate()
92{ 92{
93 delete this; 93 delete this;
94} 94}
95 95
96TEmulation* TESession::getEmulation() 96TEmulation* TESession::getEmulation()
97{ 97{
98 return em; 98 return em;
99} 99}
100 100
diff --git a/core/apps/helpbrowser/helpbrowser.cpp b/core/apps/helpbrowser/helpbrowser.cpp
index 8fb0161..336d9fb 100644
--- a/core/apps/helpbrowser/helpbrowser.cpp
+++ b/core/apps/helpbrowser/helpbrowser.cpp
@@ -49,91 +49,91 @@ void HelpBrowser::init( const QString& _home )
49 setIcon( Resource::loadPixmap( "HelpBrowser" ) ); 49 setIcon( Resource::loadPixmap( "HelpBrowser" ) );
50 setBackgroundMode( PaletteButton ); 50 setBackgroundMode( PaletteButton );
51 51
52 browser = new MagicTextBrowser( this ); 52 browser = new MagicTextBrowser( this );
53 browser->setFrameStyle( QFrame::Panel | QFrame::Sunken ); 53 browser->setFrameStyle( QFrame::Panel | QFrame::Sunken );
54 connect( browser, SIGNAL( textChanged() ), 54 connect( browser, SIGNAL( textChanged() ),
55 this, SLOT( textChanged() ) ); 55 this, SLOT( textChanged() ) );
56 56
57 setCentralWidget( browser ); 57 setCentralWidget( browser );
58 setToolBarsMovable( FALSE ); 58 setToolBarsMovable( FALSE );
59 59
60 if ( !_home.isEmpty() ) 60 if ( !_home.isEmpty() )
61 browser->setSource( _home ); 61 browser->setSource( _home );
62 62
63 QToolBar* toolbar = new QToolBar( this ); 63 QToolBar* toolbar = new QToolBar( this );
64 toolbar->setHorizontalStretchable( TRUE ); 64 toolbar->setHorizontalStretchable( TRUE );
65 QMenuBar *menu = new QMenuBar( toolbar ); 65 QMenuBar *menu = new QMenuBar( toolbar );
66 66
67 toolbar = new QToolBar( this ); 67 toolbar = new QToolBar( this );
68 // addToolBar( toolbar, "Toolbar"); 68 // addToolBar( toolbar, "Toolbar");
69 69
70 QPopupMenu* go = new QPopupMenu( this ); 70 QPopupMenu* go = new QPopupMenu( this );
71 backAction = new QAction( tr( "Backward" ), Resource::loadIconSet( "back" ), QString::null, 0, this, 0 ); 71 backAction = new QAction( tr( "Backward" ), Resource::loadIconSet( "back" ), QString::null, 0, this, 0 );
72 connect( backAction, SIGNAL( activated() ), browser, SLOT( backward() ) ); 72 connect( backAction, SIGNAL( activated() ), browser, SLOT( backward() ) );
73 connect( browser, SIGNAL( backwardAvailable( bool ) ), 73 connect( browser, SIGNAL( backwardAvailable(bool) ),
74 backAction, SLOT( setEnabled( bool ) ) ); 74 backAction, SLOT( setEnabled(bool) ) );
75 backAction->addTo( go ); 75 backAction->addTo( go );
76 backAction->addTo( toolbar ); 76 backAction->addTo( toolbar );
77 backAction->setEnabled( FALSE ); 77 backAction->setEnabled( FALSE );
78 78
79 forwardAction = new QAction( tr( "Forward" ), Resource::loadIconSet( "forward" ), QString::null, 0, this, 0 ); 79 forwardAction = new QAction( tr( "Forward" ), Resource::loadIconSet( "forward" ), QString::null, 0, this, 0 );
80 connect( forwardAction, SIGNAL( activated() ), browser, SLOT( forward() ) ); 80 connect( forwardAction, SIGNAL( activated() ), browser, SLOT( forward() ) );
81 connect( browser, SIGNAL( forwardAvailable( bool ) ), 81 connect( browser, SIGNAL( forwardAvailable(bool) ),
82 forwardAction, SLOT( setEnabled( bool ) ) ); 82 forwardAction, SLOT( setEnabled(bool) ) );
83 forwardAction->addTo( go ); 83 forwardAction->addTo( go );
84 forwardAction->addTo( toolbar ); 84 forwardAction->addTo( toolbar );
85 forwardAction->setEnabled( FALSE ); 85 forwardAction->setEnabled( FALSE );
86 86
87 QAction *a = new QAction( tr( "Home" ), Resource::loadIconSet( "home" ), QString::null, 0, this, 0 ); 87 QAction *a = new QAction( tr( "Home" ), Resource::loadIconSet( "home" ), QString::null, 0, this, 0 );
88 connect( a, SIGNAL( activated() ), browser, SLOT( home() ) ); 88 connect( a, SIGNAL( activated() ), browser, SLOT( home() ) );
89 a->addTo( go ); 89 a->addTo( go );
90 a->addTo( toolbar ); 90 a->addTo( toolbar );
91 91
92 bookm = new QPopupMenu( this ); 92 bookm = new QPopupMenu( this );
93 bookm->insertItem( tr( "Add Bookmark" ), this, SLOT( addBookmark() ) ); 93 bookm->insertItem( tr( "Add Bookmark" ), this, SLOT( addBookmark() ) );
94 bookm->insertItem( tr( "Remove from Bookmarks" ), this, SLOT( removeBookmark() ) ); 94 bookm->insertItem( tr( "Remove from Bookmarks" ), this, SLOT( removeBookmark() ) );
95 bookm->insertSeparator(); 95 bookm->insertSeparator();
96 connect( bookm, SIGNAL( activated( int ) ), 96 connect( bookm, SIGNAL( activated(int) ),
97 this, SLOT( bookmChosen( int ) ) ); 97 this, SLOT( bookmChosen(int) ) );
98 98
99 readBookmarks(); 99 readBookmarks();
100 100
101 menu->insertItem( tr("Go"), go ); 101 menu->insertItem( tr("Go"), go );
102 menu->insertItem( tr( "Bookmarks" ), bookm ); 102 menu->insertItem( tr( "Bookmarks" ), bookm );
103 103
104 resize( 240, 300 ); 104 resize( 240, 300 );
105 browser->setFocus(); 105 browser->setFocus();
106 browser->setFrameStyle( QFrame::NoFrame ); 106 browser->setFrameStyle( QFrame::NoFrame );
107 107
108#if !defined(QT_NO_COP) 108#if !defined(QT_NO_COP)
109 QCopChannel *addressChannel = new QCopChannel("QPE/HelpBrowser" , this ); 109 QCopChannel *addressChannel = new QCopChannel("QPE/HelpBrowser" , this );
110 connect (addressChannel, SIGNAL( received(const QCString &, const QByteArray &)), 110 connect (addressChannel, SIGNAL( received(const QCString&,const QByteArray&)),
111 this, SLOT ( appMessage(const QCString &, const QByteArray &) ) ); 111 this, SLOT ( appMessage(const QCString&,const QByteArray&) ) );
112#endif 112#endif
113 113
114 connect( qApp, SIGNAL(appMessage(const QCString&, const QByteArray&)), 114 connect( qApp, SIGNAL(appMessage(const QCString&,const QByteArray&)),
115 this, SLOT(appMessage(const QCString&, const QByteArray&)) ); 115 this, SLOT(appMessage(const QCString&,const QByteArray&)) );
116} 116}
117 117
118void HelpBrowser::appMessage(const QCString& msg, const QByteArray& data) 118void HelpBrowser::appMessage(const QCString& msg, const QByteArray& data)
119{ 119{
120 qDebug("reached appMessage"); 120 qDebug("reached appMessage");
121 if ( msg == "showFile(QString)" ) { 121 if ( msg == "showFile(QString)" ) {
122 QDataStream ds(data,IO_ReadOnly); 122 QDataStream ds(data,IO_ReadOnly);
123 QString fn; 123 QString fn;
124 ds >> fn; 124 ds >> fn;
125 setDocument( fn ); 125 setDocument( fn );
126 126
127 QPEApplication::setKeepRunning(); 127 QPEApplication::setKeepRunning();
128 128
129 showMaximized(); 129 showMaximized();
130 setActiveWindow(); 130 setActiveWindow();
131 raise(); 131 raise();
132 } 132 }
133} 133}
134 134
135void HelpBrowser::setDocument( const QString &doc ) 135void HelpBrowser::setDocument( const QString &doc )
136{ 136{
137 if ( !doc.isEmpty() ) 137 if ( !doc.isEmpty() )
138 browser->setSource( doc ); 138 browser->setSource( doc );
139 raise(); 139 raise();
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
@@ -142,50 +142,50 @@ void QpeEditor::find ( const QString &txt, bool caseSensitive,
142} 142}
143 143
144 144
145#else 145#else
146 146
147#error "Must make a QpeEditor that inherits QTextEdit" 147#error "Must make a QpeEditor that inherits QTextEdit"
148 148
149#endif 149#endif
150 150
151 151
152static const int nfontsizes = 6; 152static const int nfontsizes = 6;
153static const int fontsize[nfontsizes] = {8,10,12,14,18,24}; 153static 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
180 font = new QPopupMenu( this ); 180 font = new QPopupMenu( this );
181 181
182 bar = new QToolBar( this ); 182 bar = new QToolBar( this );
183 editBar = bar; 183 editBar = bar;
184 184
185 QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), 185 QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ),
186 QString::null, 0, this, 0 ); 186 QString::null, 0, this, 0 );
187 connect( a, SIGNAL( activated() ), this, SLOT( fileNew() ) ); 187 connect( a, SIGNAL( activated() ), this, SLOT( fileNew() ) );
188// a->addTo( bar ); 188// a->addTo( bar );
189 a->addTo( file ); 189 a->addTo( file );
190 190
191 a = new QAction( tr( "Open" ), Resource::loadPixmap( "fileopen" ), 191 a = new QAction( tr( "Open" ), Resource::loadPixmap( "fileopen" ),
@@ -304,49 +304,49 @@ TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f )
304 304
305 nAutoSave = new QAction( tr("Auto Save 5 min."), 305 nAutoSave = new QAction( tr("Auto Save 5 min."),
306 QString::null, 0, this, 0 ); 306 QString::null, 0, this, 0 );
307 connect( nAutoSave, SIGNAL( toggled(bool) ), 307 connect( nAutoSave, SIGNAL( toggled(bool) ),
308 this, SLOT( doTimer(bool) ) ); 308 this, SLOT( doTimer(bool) ) );
309 nAutoSave->setToggleAction(true); 309 nAutoSave->setToggleAction(true);
310 nAutoSave->addTo( advancedMenu); 310 nAutoSave->addTo( advancedMenu);
311 311
312 312
313 //font->insertSeparator(); 313 //font->insertSeparator();
314 314
315 //font->insertItem(tr("About"), this, SLOT( doAbout()) ); 315 //font->insertItem(tr("About"), this, SLOT( doAbout()) );
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 );
341 341
342 edit->insertSeparator(); 342 edit->insertSeparator();
343 a = new QAction( tr( "Delete" ), Resource::loadPixmap( "close" ), 343 a = new QAction( tr( "Delete" ), Resource::loadPixmap( "close" ),
344 QString::null, 0, this, 0 ); 344 QString::null, 0, this, 0 );
345 connect( a, SIGNAL( activated() ), this, SLOT( editDelete() ) ); 345 connect( a, SIGNAL( activated() ), this, SLOT( editDelete() ) );
346 a->addTo( edit ); 346 a->addTo( edit );
347 347
348 searchBar->hide(); 348 searchBar->hide();
349 349
350 editor = new QpeEditor( this ); 350 editor = new QpeEditor( this );
351 setCentralWidget( editor ); 351 setCentralWidget( editor );
352 editor->setFrameStyle( QFrame::Panel | QFrame::Sunken ); 352 editor->setFrameStyle( QFrame::Panel | QFrame::Sunken );
@@ -562,50 +562,50 @@ void TextEdit::fileOpen() {
562 map.insert(tr("Text"), text ); 562 map.insert(tr("Text"), text );
563 text << "*"; 563 text << "*";
564 map.insert(tr("All"), text ); 564 map.insert(tr("All"), text );
565 QString str = OFileDialog::getOpenFileName( 2, 565 QString str = OFileDialog::getOpenFileName( 2,
566 QString::null , 566 QString::null ,
567 QString::null, map); 567 QString::null, map);
568 if( !str.isEmpty() && QFile(str).exists() && !QFileInfo(str).isDir() ) 568 if( !str.isEmpty() && QFile(str).exists() && !QFileInfo(str).isDir() )
569 { 569 {
570 openFile( str ); 570 openFile( str );
571 } 571 }
572 else 572 else
573 updateCaption(); 573 updateCaption();
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}
600#endif 600#endif
601 601
602void TextEdit::fileRevert() { 602void TextEdit::fileRevert() {
603 clear(); 603 clear();
604 fileOpen(); 604 fileOpen();
605} 605}
606 606
607void TextEdit::editCut() { 607void TextEdit::editCut() {
608#ifndef QT_NO_CLIPBOARD 608#ifndef QT_NO_CLIPBOARD
609 editor->cut(); 609 editor->cut();
610#endif 610#endif
611} 611}