-rw-r--r-- | core/apps/textedit/fileBrowser.cpp | 23 | ||||
-rw-r--r-- | core/apps/textedit/fileBrowser.h | 17 | ||||
-rw-r--r-- | core/apps/textedit/inputDialog.cpp | 40 | ||||
-rw-r--r-- | core/apps/textedit/inputDialog.h | 34 | ||||
-rw-r--r-- | core/apps/textedit/textedit.pro | 4 |
5 files changed, 41 insertions, 77 deletions
diff --git a/core/apps/textedit/fileBrowser.cpp b/core/apps/textedit/fileBrowser.cpp index ebb78d1..f3e4e1e 100644 --- a/core/apps/textedit/fileBrowser.cpp +++ b/core/apps/textedit/fileBrowser.cpp | |||
@@ -1,39 +1,39 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** copyright 2001 ljp ljp@llornkcor.com | 2 | ** copyright 2001 ljp ljp@llornkcor.com |
3 | ** Created: Fri Dec 14 08:16:46 2001 | 3 | ** Created: Fri Dec 14 08:16:46 2001 |
4 | ** | 4 | ** |
5 | ** This file may be distributed and/or modified under the terms of the | 5 | ** This file may be distributed and/or modified under the terms of the |
6 | ** GNU General Public License version 2 as published by the Free Software | 6 | ** GNU General Public License version 2 as published by the Free Software |
7 | ** Foundation and appearing in the file LICENSE.GPL included in the | 7 | ** Foundation and appearing in the file LICENSE.GPL included in the |
8 | ** packaging of this file. | 8 | ** packaging of this file. |
9 | ** | 9 | ** |
10 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 10 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
11 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 11 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
12 | ** | 12 | ** |
13 | ****************************************************************************/ | 13 | ****************************************************************************/ |
14 | #include "fileBrowser.h" | 14 | #include "fileBrowser.h" |
15 | #include "inputDialog.h" | 15 | //#include "inputDialog.h" |
16 | 16 | ||
17 | #include <qpe/config.h> | 17 | #include <qpe/config.h> |
18 | #include <qpe/resource.h> | 18 | #include <qpe/resource.h> |
19 | #include <qpe/fileselector.h> | 19 | #include <qpe/fileselector.h> |
20 | #include <qpe/qpeapplication.h> | 20 | #include <qpe/qpeapplication.h> |
21 | #include <qpe/menubutton.h> | 21 | #include <qpe/menubutton.h> |
22 | #include <qpe/mimetype.h> | 22 | #include <qpe/mimetype.h> |
23 | 23 | ||
24 | #include <qdict.h> | 24 | #include <qdict.h> |
25 | #include <qwidgetstack.h> | 25 | #include <qwidgetstack.h> |
26 | #include <qlistview.h> | 26 | #include <qlistview.h> |
27 | #include <qcombo.h> | 27 | #include <qcombo.h> |
28 | #include <qpushbutton.h> | 28 | #include <qpushbutton.h> |
29 | #include <qfile.h> | 29 | #include <qfile.h> |
30 | #include <qmessagebox.h> | 30 | #include <qmessagebox.h> |
31 | #include <qlayout.h> | 31 | #include <qlayout.h> |
32 | #include <unistd.h> | 32 | #include <unistd.h> |
33 | #include <qpopupmenu.h> | 33 | #include <qpopupmenu.h> |
34 | #include <qlineedit.h> | 34 | #include <qlineedit.h> |
35 | #include <qstringlist.h> | 35 | #include <qstringlist.h> |
36 | 36 | ||
37 | #include <unistd.h> | 37 | #include <unistd.h> |
38 | #include <stdlib.h> | 38 | #include <stdlib.h> |
39 | 39 | ||
@@ -532,24 +532,45 @@ void fileBrowser::dirPathComboActivated( const QString & current) { | |||
532 | chdir( current.latin1() ); | 532 | chdir( current.latin1() ); |
533 | currentDir.cd( current, TRUE); | 533 | currentDir.cd( current, TRUE); |
534 | populateList(); | 534 | populateList(); |
535 | update(); | 535 | update(); |
536 | } | 536 | } |
537 | 537 | ||
538 | void fileBrowser::dirPathEditPressed() { | 538 | void fileBrowser::dirPathEditPressed() { |
539 | QString current = dirPathCombo->lineEdit()->text(); | 539 | QString current = dirPathCombo->lineEdit()->text(); |
540 | chdir( current.latin1() ); | 540 | chdir( current.latin1() ); |
541 | currentDir.cd( current, TRUE); | 541 | currentDir.cd( current, TRUE); |
542 | populateList(); | 542 | populateList(); |
543 | update(); | 543 | update(); |
544 | } | 544 | } |
545 | 545 | ||
546 | void fileBrowser::fillCombo(const QString ¤tPath) { | 546 | void fileBrowser::fillCombo(const QString ¤tPath) { |
547 | 547 | ||
548 | dirPathCombo->lineEdit()->setText(currentPath); | 548 | dirPathCombo->lineEdit()->setText(currentPath); |
549 | 549 | ||
550 | if( dirPathStringList.grep(currentPath,TRUE).isEmpty() ) { | 550 | if( dirPathStringList.grep(currentPath,TRUE).isEmpty() ) { |
551 | dirPathCombo->clear(); | 551 | dirPathCombo->clear(); |
552 | dirPathStringList.prepend(currentPath ); | 552 | dirPathStringList.prepend(currentPath ); |
553 | dirPathCombo->insertStringList( dirPathStringList,-1); | 553 | dirPathCombo->insertStringList( dirPathStringList,-1); |
554 | } | 554 | } |
555 | } | 555 | } |
556 | |||
557 | |||
558 | InputDialog::InputDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) | ||
559 | : QDialog( parent, name, modal, fl ) | ||
560 | { | ||
561 | if ( !name ) | ||
562 | setName( "InputDialog" ); | ||
563 | resize( 234, 50 ); | ||
564 | setMaximumSize( QSize( 240, 50 ) ); | ||
565 | setCaption( tr(name ) ); | ||
566 | |||
567 | LineEdit1 = new QLineEdit( this, "LineEdit1" ); | ||
568 | LineEdit1->setGeometry( QRect( 10, 10, 216, 22 ) ); | ||
569 | } | ||
570 | |||
571 | InputDialog::~InputDialog() | ||
572 | { | ||
573 | inputText= LineEdit1->text(); | ||
574 | |||
575 | } | ||
576 | |||
diff --git a/core/apps/textedit/fileBrowser.h b/core/apps/textedit/fileBrowser.h index bac3d2e..42f93b6 100644 --- a/core/apps/textedit/fileBrowser.h +++ b/core/apps/textedit/fileBrowser.h | |||
@@ -5,48 +5,52 @@ | |||
5 | ** This file may be distributed and/or modified under the terms of the | 5 | ** This file may be distributed and/or modified under the terms of the |
6 | ** GNU General Public License version 2 as published by the Free Software | 6 | ** GNU General Public License version 2 as published by the Free Software |
7 | ** Foundation and appearing in the file LICENSE.GPL included in the | 7 | ** Foundation and appearing in the file LICENSE.GPL included in the |
8 | ** packaging of this file. | 8 | ** packaging of this file. |
9 | ** | 9 | ** |
10 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 10 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
11 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 11 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
12 | ** | 12 | ** |
13 | copyright Sun 02-17-2002 22:28:23 L. J. Potter ljp@llornkcor.com | 13 | copyright Sun 02-17-2002 22:28:23 L. J. Potter ljp@llornkcor.com |
14 | ****************************************************************************/ | 14 | ****************************************************************************/ |
15 | #ifndef FILEBROWSER_H | 15 | #ifndef FILEBROWSER_H |
16 | #define FILEBROWSER_H | 16 | #define FILEBROWSER_H |
17 | 17 | ||
18 | //#include <qvariant.h> | 18 | //#include <qvariant.h> |
19 | #include <qdialog.h> | 19 | #include <qdialog.h> |
20 | #include <qfile.h> | 20 | #include <qfile.h> |
21 | #include <qdir.h> | 21 | #include <qdir.h> |
22 | #include <qstringlist.h> | 22 | #include <qstringlist.h> |
23 | #include <qlabel.h> | 23 | #include <qlabel.h> |
24 | #include <qstring.h> | 24 | #include <qstring.h> |
25 | #include <qdict.h> | 25 | #include <qdict.h> |
26 | 26 | ||
27 | #include <qpe/filemanager.h> | 27 | #include <qpe/filemanager.h> |
28 | 28 | ||
29 | #include <qvariant.h> | ||
30 | #include <qdialog.h> | ||
31 | class QLineEdit; | ||
32 | |||
29 | class QVBoxLayout; | 33 | class QVBoxLayout; |
30 | class QHBoxLayout; | 34 | class QHBoxLayout; |
31 | class QGridLayout; | 35 | class QGridLayout; |
32 | class QListView; | 36 | class QListView; |
33 | class QListViewItem; | 37 | class QListViewItem; |
34 | class QPushButton; | 38 | class QPushButton; |
35 | class QComboBox; | 39 | class QComboBox; |
36 | class QWidgetStack; | 40 | class QWidgetStack; |
37 | class FileSelector; | 41 | class FileSelector; |
38 | class QPoint; | 42 | class QPoint; |
39 | class MenuButton; | 43 | class MenuButton; |
40 | class QRegExp; | 44 | class QRegExp; |
41 | 45 | ||
42 | 46 | ||
43 | class fileBrowser : public QDialog | 47 | class fileBrowser : public QDialog |
44 | { | 48 | { |
45 | Q_OBJECT | 49 | Q_OBJECT |
46 | 50 | ||
47 | public: | 51 | public: |
48 | fileBrowser( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ,const QString filter=0); | 52 | fileBrowser( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ,const QString filter=0); |
49 | ~fileBrowser(); | 53 | ~fileBrowser(); |
50 | 54 | ||
51 | QPushButton *buttonOk, *buttonCancel, *homeButton, *docButton, *hideButton, *cdUpButton; | 55 | QPushButton *buttonOk, *buttonCancel, *homeButton, *docButton, *hideButton, *cdUpButton; |
52 | QListView* ListView; | 56 | QListView* ListView; |
@@ -77,25 +81,38 @@ private slots: | |||
77 | void docButtonPushed(); | 81 | void docButtonPushed(); |
78 | void ListPressed( int, QListViewItem *, const QPoint&, int); | 82 | void ListPressed( int, QListViewItem *, const QPoint&, int); |
79 | void showListMenu(QListViewItem*); | 83 | void showListMenu(QListViewItem*); |
80 | void doCd(); | 84 | void doCd(); |
81 | void makDir(); | 85 | void makDir(); |
82 | void localRename(); | 86 | void localRename(); |
83 | void localDelete(); | 87 | void localDelete(); |
84 | void receive( const QCString &msg, const QByteArray &data ); | 88 | void receive( const QCString &msg, const QByteArray &data ); |
85 | void dirPathComboActivated( const QString & ); | 89 | void dirPathComboActivated( const QString & ); |
86 | void upDir(); | 90 | void upDir(); |
87 | void listClicked( QListViewItem * ); | 91 | void listClicked( QListViewItem * ); |
88 | void selectionChanged( const QString & ); | 92 | void selectionChanged( const QString & ); |
89 | void OnOK(); | 93 | void OnOK(); |
90 | void docOpen( const DocLnk & ); | 94 | void docOpen( const DocLnk & ); |
91 | void updateMimeTypeMenu(); | 95 | void updateMimeTypeMenu(); |
92 | void showType(const QString &); | 96 | void showType(const QString &); |
93 | void dirPathEditPressed(); | 97 | void dirPathEditPressed(); |
94 | 98 | ||
95 | protected slots: | 99 | protected slots: |
96 | 100 | ||
97 | protected: | 101 | protected: |
98 | 102 | ||
99 | }; | 103 | }; |
100 | 104 | ||
105 | |||
106 | class InputDialog : public QDialog | ||
107 | { | ||
108 | Q_OBJECT | ||
109 | |||
110 | public: | ||
111 | InputDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); | ||
112 | ~InputDialog(); | ||
113 | QString inputText; | ||
114 | QLineEdit* LineEdit1; | ||
115 | |||
116 | }; | ||
117 | |||
101 | #endif // FILEBROWSER_H | 118 | #endif // FILEBROWSER_H |
diff --git a/core/apps/textedit/inputDialog.cpp b/core/apps/textedit/inputDialog.cpp deleted file mode 100644 index 22205d3..0000000 --- a/core/apps/textedit/inputDialog.cpp +++ b/dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | /**************************************************************************** | ||
2 | inputDialog.cpp | ||
3 | ------------------- | ||
4 | ** Created: Sat Mar 9 23:33:09 2002 | ||
5 | copyright : (C) 2002 by ljp | ||
6 | email : ljp@llornkcor.com | ||
7 | * This program is free software; you can redistribute it and/or modify * | ||
8 | * it under the terms of the GNU General Public License as published by * | ||
9 | * the Free Software Foundation; either version 2 of the License, or * | ||
10 | * (at your option) any later version. * | ||
11 | ***************************************************************************/ | ||
12 | |||
13 | #include "inputDialog.h" | ||
14 | |||
15 | #include <qlineedit.h> | ||
16 | #include <qlayout.h> | ||
17 | #include <qvariant.h> | ||
18 | #include <qtooltip.h> | ||
19 | #include <qwhatsthis.h> | ||
20 | |||
21 | |||
22 | InputDialog::InputDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) | ||
23 | : QDialog( parent, name, modal, fl ) | ||
24 | { | ||
25 | if ( !name ) | ||
26 | setName( "InputDialog" ); | ||
27 | resize( 234, 50 ); | ||
28 | setMaximumSize( QSize( 240, 50 ) ); | ||
29 | setCaption( tr(name ) ); | ||
30 | |||
31 | LineEdit1 = new QLineEdit( this, "LineEdit1" ); | ||
32 | LineEdit1->setGeometry( QRect( 10, 10, 216, 22 ) ); | ||
33 | } | ||
34 | |||
35 | InputDialog::~InputDialog() | ||
36 | { | ||
37 | inputText= LineEdit1->text(); | ||
38 | |||
39 | } | ||
40 | |||
diff --git a/core/apps/textedit/inputDialog.h b/core/apps/textedit/inputDialog.h deleted file mode 100644 index 2cd8285..0000000 --- a/core/apps/textedit/inputDialog.h +++ b/dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | inputDialog.h | ||
3 | ------------------- | ||
4 | ** Created: Sat Mar 9 23:33:09 2002 | ||
5 | copyright : (C) 2002 by ljp | ||
6 | email : ljp@llornkcor.com | ||
7 | * This program is free software; you can redistribute it and/or modify * | ||
8 | * it under the terms of the GNU General Public License as published by * | ||
9 | * the Free Software Foundation; either version 2 of the License, or * | ||
10 | * (at your option) any later version. * | ||
11 | ***************************************************************************/ | ||
12 | #ifndef INPUTDIALOG_H | ||
13 | #define INPUTDIALOG_H | ||
14 | |||
15 | #include <qvariant.h> | ||
16 | #include <qdialog.h> | ||
17 | class QVBoxLayout; | ||
18 | class QHBoxLayout; | ||
19 | class QGridLayout; | ||
20 | class QLineEdit; | ||
21 | |||
22 | class InputDialog : public QDialog | ||
23 | { | ||
24 | Q_OBJECT | ||
25 | |||
26 | public: | ||
27 | InputDialog( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); | ||
28 | ~InputDialog(); | ||
29 | QString inputText; | ||
30 | QLineEdit* LineEdit1; | ||
31 | |||
32 | }; | ||
33 | |||
34 | #endif // INPUTDIALOG_H | ||
diff --git a/core/apps/textedit/textedit.pro b/core/apps/textedit/textedit.pro index 37ddf15..9b743d3 100644 --- a/core/apps/textedit/textedit.pro +++ b/core/apps/textedit/textedit.pro | |||
@@ -1,15 +1,15 @@ | |||
1 | TEMPLATE = app | 1 | TEMPLATE = app |
2 | CONFIG += qt warn_on release | 2 | CONFIG += qt warn_on release |
3 | 3 | ||
4 | DESTDIR = $(OPIEDIR)/bin | 4 | DESTDIR = $(OPIEDIR)/bin |
5 | HEADERS = textedit.h fileBrowser.h fontDialog.h fileSaver.h filePermissions.h inputDialog.h | 5 | HEADERS = textedit.h fileBrowser.h fontDialog.h fileSaver.h filePermissions.h |
6 | SOURCES = main.cpp textedit.cpp fileBrowser.cpp fontDialog.cpp fileSaver.cpp filePermissions.cpp inputDialog.cpp | 6 | SOURCES = main.cpp textedit.cpp fileBrowser.cpp fontDialog.cpp fileSaver.cpp filePermissions.cpp |
7 | 7 | ||
8 | INCLUDEPATH += $(OPIEDIR)/include | 8 | INCLUDEPATH += $(OPIEDIR)/include |
9 | DEPENDPATH += $(OPIEDIR)/include | 9 | DEPENDPATH += $(OPIEDIR)/include |
10 | LIBS += -lqpe | 10 | LIBS += -lqpe |
11 | 11 | ||
12 | TARGET = textedit | 12 | TARGET = textedit |
13 | 13 | ||
14 | TRANSLATIONS += ../i18n/de/textedit.ts | 14 | TRANSLATIONS += ../i18n/de/textedit.ts |
15 | TRANSLATIONS += ../i18n/pt_BR/textedit.ts | 15 | TRANSLATIONS += ../i18n/pt_BR/textedit.ts |