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
@@ -6,97 +6,97 @@
6#include <qpe/resource.h> 6#include <qpe/resource.h>
7#include <qtoolbutton.h> 7#include <qtoolbutton.h>
8#include <qlineedit.h> 8#include <qlineedit.h>
9#include <qheader.h> 9#include <qheader.h>
10#include <qlabel.h> 10#include <qlabel.h>
11#include "smallcommandeditdialogbase.h" 11#include "smallcommandeditdialogbase.h"
12 12
13CommandEditDialog::CommandEditDialog(QWidget *parent, const char* name, WFlags fl ) 13CommandEditDialog::CommandEditDialog(QWidget *parent, const char* name, WFlags fl )
14 : CommandEditDialogBase(parent, name, TRUE, fl) 14 : CommandEditDialogBase(parent, name, TRUE, fl)
15 15
16{ 16{
17 m_SuggestedCommandList->addColumn( tr("Command Selection") ); 17 m_SuggestedCommandList->addColumn( tr("Command Selection") );
18 m_SuggestedCommandList->header()->hide(); 18 m_SuggestedCommandList->header()->hide();
19 m_SuggestedCommandList->setSorting(-1,FALSE); 19 m_SuggestedCommandList->setSorting(-1,FALSE);
20 m_SuggestedCommandList->clearSelection(); 20 m_SuggestedCommandList->clearSelection();
21 m_SuggestedCommandList->setSorting(0,TRUE); 21 m_SuggestedCommandList->setSorting(0,TRUE);
22 QListViewItem *item; 22 QListViewItem *item;
23 item = new QListViewItem( m_SuggestedCommandList,"export "); 23 item = new QListViewItem( m_SuggestedCommandList,"export ");
24 item = new QListViewItem( m_SuggestedCommandList,"ifconfig "); 24 item = new QListViewItem( m_SuggestedCommandList,"ifconfig ");
25 item = new QListViewItem( m_SuggestedCommandList,"ipkg "); 25 item = new QListViewItem( m_SuggestedCommandList,"ipkg ");
26 item = new QListViewItem( m_SuggestedCommandList,"gzip "); 26 item = new QListViewItem( m_SuggestedCommandList,"gzip ");
27 item = new QListViewItem( m_SuggestedCommandList,"gunzip "); 27 item = new QListViewItem( m_SuggestedCommandList,"gunzip ");
28 item = new QListViewItem( m_SuggestedCommandList,"chgrp "); 28 item = new QListViewItem( m_SuggestedCommandList,"chgrp ");
29 item = new QListViewItem( m_SuggestedCommandList,"chown "); 29 item = new QListViewItem( m_SuggestedCommandList,"chown ");
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);
79 ToolButton4->setFocusPolicy(QWidget::NoFocus); 79 ToolButton4->setFocusPolicy(QWidget::NoFocus);
80 connect(ToolButton4,SIGNAL(clicked()),m_PlayListSelection,SLOT(moveSelectedUp())); 80 connect(ToolButton4,SIGNAL(clicked()),m_PlayListSelection,SLOT(moveSelectedUp()));
81 81
82 ToolButton5->setTextLabel("down"); 82 ToolButton5->setTextLabel("down");
83 ToolButton5->setPixmap(Resource::loadPixmap("down")); 83 ToolButton5->setPixmap(Resource::loadPixmap("down"));
84 ToolButton5->setAutoRaise(TRUE); 84 ToolButton5->setAutoRaise(TRUE);
85 ToolButton5->setFocusPolicy(QWidget::NoFocus); 85 ToolButton5->setFocusPolicy(QWidget::NoFocus);
86 86
87connect(ToolButton5,SIGNAL(clicked()),m_PlayListSelection,SLOT(moveSelectedDown())); 87connect(ToolButton5,SIGNAL(clicked()),m_PlayListSelection,SLOT(moveSelectedDown()));
88 88
89 89
90 90
91 91
92 QListViewItem *current = m_SuggestedCommandList->selectedItem(); 92 QListViewItem *current = m_SuggestedCommandList->selectedItem();
93 if ( current ) 93 if ( current )
94 item->moveItem( current ); 94 item->moveItem( current );
95 m_SuggestedCommandList->setSelected( item, TRUE ); 95 m_SuggestedCommandList->setSelected( item, TRUE );
96 m_SuggestedCommandList->ensureItemVisible( m_SuggestedCommandList->selectedItem() ); 96 m_SuggestedCommandList->ensureItemVisible( m_SuggestedCommandList->selectedItem() );
97 Config cfg( "Konsole" ); 97 Config cfg( "Konsole" );
98 cfg.setGroup("Commands"); 98 cfg.setGroup("Commands");
99 if (cfg.readEntry("Commands Set","FALSE") == "TRUE") { 99 if (cfg.readEntry("Commands Set","FALSE") == "TRUE") {
100 for (int i = 0; i < 100; i++) { 100 for (int i = 0; i < 100; i++) {
101 QString tmp; 101 QString tmp;
102 tmp = cfg.readEntry( QString::number(i),""); 102 tmp = cfg.readEntry( QString::number(i),"");
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
@@ -6,119 +6,119 @@
6 /* */ 6 /* */
7/* -------------------------------------------------------------------------- */ 7/* -------------------------------------------------------------------------- */
8#include "session.h" 8#include "session.h"
9// #include <kdebug.h> 9// #include <kdebug.h>
10 10
11#include <stdlib.h> 11#include <stdlib.h>
12 12
13#define HERE fprintf(stderr,"%s(%d): here\n",__FILE__,__LINE__) 13#define HERE fprintf(stderr,"%s(%d): here\n",__FILE__,__LINE__)
14 14
15/*! \class TESession 15/*! \class TESession
16 16
17 Sessions are combinations of TEPTy and Emulations. 17 Sessions are combinations of TEPTy and Emulations.
18 18
19 The stuff in here does not belong to the terminal emulation framework, 19 The stuff in here does not belong to the terminal emulation framework,
20 but to main.C. It serves it's duty by providing a single reference 20 but to main.C. It serves it's duty by providing a single reference
21 to TEPTy/Emulation pairs. In fact, it is only there to demonstrate one 21 to TEPTy/Emulation pairs. In fact, it is only there to demonstrate one
22 of the abilities of the framework - multible sessions. 22 of the abilities of the framework - multible sessions.
23*/ 23*/
24 24
25TESession::TESession(QMainWindow* main, TEWidget* _te, const char* _pgm, QStrList & _args, const char *_term) : schema_no(0), font_no(3), pgm(_pgm), args(_args) 25TESession::TESession(QMainWindow* main, TEWidget* _te, const char* _pgm, QStrList & _args, const char *_term) : schema_no(0), font_no(3), pgm(_pgm), args(_args)
26{ 26{
27 te = _te; 27 te = _te;
28 term = _term; 28 term = _term;
29 29
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
101// following interfaces might be misplaced /// 101// following interfaces might be misplaced ///
102 102
103int TESession::schemaNo() 103int TESession::schemaNo()
104{ 104{
105 return schema_no; 105 return schema_no;
106} 106}
107 107
108int TESession::keymap() 108int TESession::keymap()
109{ 109{
110 return keymap_no; 110 return keymap_no;
111} 111}
112 112
113int TESession::fontNo() 113int TESession::fontNo()
114{ 114{
115 return font_no; 115 return font_no;
116} 116}
117 117
118const char* TESession::emuName() 118const char* TESession::emuName()
119{ 119{
120 return term.data(); 120 return term.data();
121} 121}
122 122
123void TESession::setSchemaNo(int sn) 123void TESession::setSchemaNo(int sn)
124{ 124{
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
@@ -25,139 +25,139 @@
25#include <qpe/qpeapplication.h> 25#include <qpe/qpeapplication.h>
26#include <qpe/resource.h> 26#include <qpe/resource.h>
27 27
28#include <qmenubar.h> 28#include <qmenubar.h>
29#include <qtoolbar.h> 29#include <qtoolbar.h>
30#include <qpe/qcopenvelope_qws.h> 30#include <qpe/qcopenvelope_qws.h>
31#include <qfileinfo.h> 31#include <qfileinfo.h>
32#include <qaction.h> 32#include <qaction.h>
33 33
34#include <cctype> 34#include <cctype>
35 35
36#include "magictextbrowser.h" 36#include "magictextbrowser.h"
37 37
38HelpBrowser::HelpBrowser( QWidget* parent, const char *name, WFlags f ) 38HelpBrowser::HelpBrowser( QWidget* parent, const char *name, WFlags f )
39 : QMainWindow( parent, name, f ), 39 : QMainWindow( parent, name, f ),
40 selectedURL() 40 selectedURL()
41{ 41{
42 init( "index.html" ); 42 init( "index.html" );
43} 43}
44 44
45 45
46 46
47void HelpBrowser::init( const QString& _home ) 47void HelpBrowser::init( const QString& _home )
48{ 48{
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();
140} 140}
141 141
142 142
143void HelpBrowser::textChanged() 143void HelpBrowser::textChanged()
144{ 144{
145 if ( browser->documentTitle().isNull() ) 145 if ( browser->documentTitle().isNull() )
146 setCaption( tr("Help Browser") ); 146 setCaption( tr("Help Browser") );
147 else 147 else
148 setCaption( browser->documentTitle() ) ; 148 setCaption( browser->documentTitle() ) ;
149 149
150 selectedURL = caption(); 150 selectedURL = caption();
151} 151}
152 152
153HelpBrowser::~HelpBrowser() 153HelpBrowser::~HelpBrowser()
154{ 154{
155 QStringList bookmarks; 155 QStringList bookmarks;
156 QMap<int, Bookmark>::Iterator it2 = mBookmarks.begin(); 156 QMap<int, Bookmark>::Iterator it2 = mBookmarks.begin();
157 for ( ; it2 != mBookmarks.end(); ++it2 ) 157 for ( ; it2 != mBookmarks.end(); ++it2 )
158 bookmarks.append( (*it2).name + "=" + (*it2).file ); 158 bookmarks.append( (*it2).name + "=" + (*it2).file );
159 159
160 QFile f2( Global::applicationFileName("helpbrowser", "bookmarks") ); 160 QFile f2( Global::applicationFileName("helpbrowser", "bookmarks") );
161 if ( f2.open( IO_WriteOnly ) ) { 161 if ( f2.open( IO_WriteOnly ) ) {
162 QDataStream s2( &f2 ); 162 QDataStream s2( &f2 );
163 s2 << bookmarks; 163 s2 << bookmarks;
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
@@ -118,98 +118,98 @@ void QpeEditor::find ( const QString &txt, bool caseSensitive,
118 } else { 118 } else {
119 getCursorPosition( &line, &col ); 119 getCursorPosition( &line, &col );
120 } 120 }
121 //ignore backwards for now.... 121 //ignore backwards for now....
122 if ( !backwards ) { 122 if ( !backwards ) {
123 for ( ; ; ) { 123 for ( ; ; ) {
124 if ( line >= numLines() ) { 124 if ( line >= numLines() ) {
125 wrap = true; 125 wrap = true;
126 //emit notFound(); 126 //emit notFound();
127 break; 127 break;
128 } 128 }
129 int findCol = getString( line )->find( txt, col, caseSensitive ); 129 int findCol = getString( line )->find( txt, col, caseSensitive );
130 if ( findCol >= 0 ) { 130 if ( findCol >= 0 ) {
131 setCursorPosition( line, findCol, false ); 131 setCursorPosition( line, findCol, false );
132 col = findCol + txt.length(); 132 col = findCol + txt.length();
133 setCursorPosition( line, col, true ); 133 setCursorPosition( line, col, true );
134 134
135 //found = true; 135 //found = true;
136 break; 136 break;
137 } 137 }
138 line++; 138 line++;
139 col = 0; 139 col = 0;
140 } 140 }
141 } 141 }
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" ),
192 QString::null, 0, this, 0 ); 192 QString::null, 0, this, 0 );
193 connect( a, SIGNAL( activated() ), this, SLOT( fileOpen() ) ); 193 connect( a, SIGNAL( activated() ), this, SLOT( fileOpen() ) );
194 a->addTo( bar ); 194 a->addTo( bar );
195 a->addTo( file ); 195 a->addTo( file );
196 196
197 a = new QAction( tr( "Save" ), Resource::loadPixmap("save") , 197 a = new QAction( tr( "Save" ), Resource::loadPixmap("save") ,
198 QString::null, 0, this, 0 ); 198 QString::null, 0, this, 0 );
199 connect( a, SIGNAL( activated() ), this, SLOT( save() ) ); 199 connect( a, SIGNAL( activated() ), this, SLOT( save() ) );
200 file->insertSeparator(); 200 file->insertSeparator();
201 a->addTo( bar ); 201 a->addTo( bar );
202 a->addTo( file ); 202 a->addTo( file );
203 203
204 a = new QAction( tr( "Save As" ), Resource::loadPixmap("save") , 204 a = new QAction( tr( "Save As" ), Resource::loadPixmap("save") ,
205 QString::null, 0, this, 0 ); 205 QString::null, 0, this, 0 );
206 connect( a, SIGNAL( activated() ), this, SLOT( saveAs() ) ); 206 connect( a, SIGNAL( activated() ), this, SLOT( saveAs() ) );
207 a->addTo( file ); 207 a->addTo( file );
208 208
209 a = new QAction( tr( "Cut" ), Resource::loadPixmap( "cut" ), 209 a = new QAction( tr( "Cut" ), Resource::loadPixmap( "cut" ),
210 QString::null, 0, this, 0 ); 210 QString::null, 0, this, 0 );
211 connect( a, SIGNAL( activated() ), this, SLOT( editCut() ) ); 211 connect( a, SIGNAL( activated() ), this, SLOT( editCut() ) );
212 a->addTo( editBar ); 212 a->addTo( editBar );
213 a->addTo( edit ); 213 a->addTo( edit );
214 214
215 a = new QAction( tr( "Copy" ), Resource::loadPixmap( "copy" ), 215 a = new QAction( tr( "Copy" ), Resource::loadPixmap( "copy" ),
@@ -280,97 +280,97 @@ TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f )
280 this, SLOT( doPrompt(bool) ) ); 280 this, SLOT( doPrompt(bool) ) );
281 nAdvanced->setToggleAction(true); 281 nAdvanced->setToggleAction(true);
282 nAdvanced->addTo( advancedMenu ); 282 nAdvanced->addTo( advancedMenu );
283 283
284 desktopAction = new QAction( tr("Always open linked file"), 284 desktopAction = new QAction( tr("Always open linked file"),
285 QString::null, 0, this, 0 ); 285 QString::null, 0, this, 0 );
286 connect( desktopAction, SIGNAL( toggled(bool) ), 286 connect( desktopAction, SIGNAL( toggled(bool) ),
287 this, SLOT( doDesktop(bool) ) ); 287 this, SLOT( doDesktop(bool) ) );
288 desktopAction->setToggleAction(true); 288 desktopAction->setToggleAction(true);
289 desktopAction->addTo( advancedMenu); 289 desktopAction->addTo( advancedMenu);
290 290
291 filePermAction = new QAction( tr("File Permissions"), 291 filePermAction = new QAction( tr("File Permissions"),
292 QString::null, 0, this, 0 ); 292 QString::null, 0, this, 0 );
293 connect( filePermAction, SIGNAL( toggled(bool) ), 293 connect( filePermAction, SIGNAL( toggled(bool) ),
294 this, SLOT( doFilePerms(bool) ) ); 294 this, SLOT( doFilePerms(bool) ) );
295 filePermAction->setToggleAction(true); 295 filePermAction->setToggleAction(true);
296 filePermAction->addTo( advancedMenu); 296 filePermAction->addTo( advancedMenu);
297 297
298 searchBarAction = new QAction( tr("Search Bar Open"), 298 searchBarAction = new QAction( tr("Search Bar Open"),
299 QString::null, 0, this, 0 ); 299 QString::null, 0, this, 0 );
300 connect( searchBarAction, SIGNAL( toggled(bool) ), 300 connect( searchBarAction, SIGNAL( toggled(bool) ),
301 this, SLOT( setSearchBar(bool) ) ); 301 this, SLOT( setSearchBar(bool) ) );
302 searchBarAction->setToggleAction(true); 302 searchBarAction->setToggleAction(true);
303 searchBarAction->addTo( advancedMenu); 303 searchBarAction->addTo( advancedMenu);
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 );
353 connect( editor, SIGNAL( textChanged() ), 353 connect( editor, SIGNAL( textChanged() ),
354 this, SLOT( editorChanged() ) ); 354 this, SLOT( editorChanged() ) );
355 355
356 QPEApplication::setStylusOperation( editor, QPEApplication::RightOnHold); 356 QPEApplication::setStylusOperation( editor, QPEApplication::RightOnHold);
357 357
358 Config cfg("TextEdit"); 358 Config cfg("TextEdit");
359 cfg. setGroup ( "Font" ); 359 cfg. setGroup ( "Font" );
360 360
361 QFont defaultFont = editor-> font ( ); 361 QFont defaultFont = editor-> font ( );
362 362
363 QString family = cfg. readEntry ( "Family", defaultFont. family ( )); 363 QString family = cfg. readEntry ( "Family", defaultFont. family ( ));
364 int size = cfg. readNumEntry ( "Size", defaultFont. pointSize ( )); 364 int size = cfg. readNumEntry ( "Size", defaultFont. pointSize ( ));
365 int weight = cfg. readNumEntry ( "Weight", defaultFont. weight ( )); 365 int weight = cfg. readNumEntry ( "Weight", defaultFont. weight ( ));
366 bool italic = cfg. readBoolEntry ( "Italic", defaultFont. italic ( )); 366 bool italic = cfg. readBoolEntry ( "Italic", defaultFont. italic ( ));
367 367
368 defaultFont = QFont ( family, size, weight, italic ); 368 defaultFont = QFont ( family, size, weight, italic );
369 editor-> setFont ( defaultFont ); 369 editor-> setFont ( defaultFont );
370// updateCaption(); 370// updateCaption();
371 371
372 cfg.setGroup ( "View" ); 372 cfg.setGroup ( "View" );
373 373
374 promptExit = cfg.readBoolEntry ( "PromptExit", false ); 374 promptExit = cfg.readBoolEntry ( "PromptExit", false );
375 openDesktop = cfg.readBoolEntry ( "OpenDesktop", true ); 375 openDesktop = cfg.readBoolEntry ( "OpenDesktop", true );
376 filePerms = cfg.readBoolEntry ( "FilePermissions", false ); 376 filePerms = cfg.readBoolEntry ( "FilePermissions", false );
@@ -538,98 +538,98 @@ void TextEdit::setSearchBar(bool b) {
538 cfg.setGroup("View"); 538 cfg.setGroup("View");
539 cfg.writeEntry ( "SearchBar", b ); 539 cfg.writeEntry ( "SearchBar", b );
540 searchBarAction->setOn(b); 540 searchBarAction->setOn(b);
541 if(b) 541 if(b)
542 searchBar->show(); 542 searchBar->show();
543 else 543 else
544 searchBar->hide(); 544 searchBar->hide();
545 editor->setFocus(); 545 editor->setFocus();
546} 546}
547 547
548void TextEdit::fileNew() { 548void TextEdit::fileNew() {
549// if( !bFromDocView ) { 549// if( !bFromDocView ) {
550// saveAs(); 550// saveAs();
551// } 551// }
552 newFile(DocLnk()); 552 newFile(DocLnk());
553} 553}
554 554
555void TextEdit::fileOpen() { 555void TextEdit::fileOpen() {
556 Config cfg("TextEdit"); 556 Config cfg("TextEdit");
557 cfg. setGroup ( "View" ); 557 cfg. setGroup ( "View" );
558 QMap<QString, QStringList> map; 558 QMap<QString, QStringList> map;
559 map.insert(tr("All"), QStringList() ); 559 map.insert(tr("All"), QStringList() );
560 QStringList text; 560 QStringList text;
561 text << "text/*"; 561 text << "text/*";
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}
612 612
613void TextEdit::editCopy() { 613void TextEdit::editCopy() {
614#ifndef QT_NO_CLIPBOARD 614#ifndef QT_NO_CLIPBOARD
615 editor->copy(); 615 editor->copy();
616#endif 616#endif
617} 617}
618 618
619void TextEdit::editPaste() { 619void TextEdit::editPaste() {
620#ifndef QT_NO_CLIPBOARD 620#ifndef QT_NO_CLIPBOARD
621 editor->paste(); 621 editor->paste();
622#endif 622#endif
623} 623}
624 624
625void TextEdit::editFind() { 625void TextEdit::editFind() {
626 searchBar->show(); 626 searchBar->show();
627 searchEdit->setFocus(); 627 searchEdit->setFocus();
628} 628}
629 629
630void TextEdit::findNext() { 630void TextEdit::findNext() {
631 editor->find( searchEdit->text(), false, false ); 631 editor->find( searchEdit->text(), false, false );
632 632
633} 633}
634 634
635void TextEdit::findClose() { 635void TextEdit::findClose() {