author | zautrix <zautrix> | 2005-02-05 14:31:01 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-05 14:31:01 (UTC) |
commit | 231a90376b096687770b2b029d4a3d2efa232b2e (patch) (unidiff) | |
tree | 609a9b8434fe28eab8ea9a1a7e4441a37be0b246 /microkde | |
parent | 7be6218eaf6bd29d4bc09d0bb79bb0dec6da9ae5 (diff) | |
download | kdepimpi-231a90376b096687770b2b029d4a3d2efa232b2e.zip kdepimpi-231a90376b096687770b2b029d4a3d2efa232b2e.tar.gz kdepimpi-231a90376b096687770b2b029d4a3d2efa232b2e.tar.bz2 |
many fixes
-rw-r--r-- | microkde/kfiledialog.cpp | 4 | ||||
-rw-r--r-- | microkde/ktextedit.h | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/microkde/kfiledialog.cpp b/microkde/kfiledialog.cpp index 309f8dc..3f47425 100644 --- a/microkde/kfiledialog.cpp +++ b/microkde/kfiledialog.cpp | |||
@@ -7,59 +7,59 @@ | |||
7 | 7 | ||
8 | #ifndef DESKTOP_VERSION | 8 | #ifndef DESKTOP_VERSION |
9 | //US orig#include <ofileselector.h> | 9 | //US orig#include <ofileselector.h> |
10 | #include <ofileselector_p.h> | 10 | #include <ofileselector_p.h> |
11 | QString KFileDialog::getSaveFileName( const QString & fn, | 11 | QString KFileDialog::getSaveFileName( const QString & fn, |
12 | const QString & cap , QWidget * par ) | 12 | const QString & cap , QWidget * par ) |
13 | { | 13 | { |
14 | QString retfile = ""; | 14 | QString retfile = ""; |
15 | QDialog dia ( par, "input-dialog", true ); | 15 | QDialog dia ( par, "input-dialog", true ); |
16 | QVBoxLayout lay( &dia ); | 16 | QVBoxLayout lay( &dia ); |
17 | lay.setMargin(7); | 17 | lay.setMargin(7); |
18 | lay.setSpacing(7); | 18 | lay.setSpacing(7); |
19 | dia.setCaption( cap ); | ||
20 | QString file = fn; | 19 | QString file = fn; |
21 | if ( file.isEmpty() ) | 20 | if ( file.isEmpty() ) |
22 | file = QDir::homeDirPath()+"/*"; | 21 | file = QDir::homeDirPath()+"/*"; |
23 | QFileInfo fi ( file ); | 22 | QFileInfo fi ( file ); |
24 | OFileSelector o ( &dia,OFileSelector::FileSelector, OFileSelector::Save, fi.dirPath(true), fi.fileName() ); | 23 | OFileSelector o ( &dia,OFileSelector::FileSelector, OFileSelector::Save, fi.dirPath(true), fi.fileName() ); |
25 | QObject::connect ( &o, SIGNAL( ok() ), &dia, SLOT ( accept () ) ); | 24 | QObject::connect ( &o, SIGNAL( ok() ), &dia, SLOT ( accept () ) ); |
26 | lay.addWidget( &o); | 25 | lay.addWidget( &o); |
27 | // o.setNewVisible( true ); | 26 | // o.setNewVisible( true ); |
28 | // o.setNameVisible( true ); | 27 | // o.setNameVisible( true ); |
29 | dia.showMaximized(); | 28 | dia.showMaximized(); |
29 | dia.setCaption( cap ); | ||
30 | int res = dia.exec(); | 30 | int res = dia.exec(); |
31 | if ( res ) | 31 | if ( res ) |
32 | retfile = o.selectedName(); | 32 | retfile = o.selectedName(); |
33 | return retfile; | 33 | return retfile; |
34 | } | 34 | } |
35 | 35 | ||
36 | QString KFileDialog::getOpenFileName( const QString & fn, | 36 | QString KFileDialog::getOpenFileName( const QString & fn, |
37 | const QString & cap, QWidget * par ) | 37 | const QString & cap, QWidget * par ) |
38 | { | 38 | { |
39 | QString retfile = ""; | 39 | QString retfile = ""; |
40 | QDialog dia ( par, "input-dialog", true ); | 40 | QDialog dia ( par, "input-dialog", true ); |
41 | // QLineEdit lab ( &dia ); | 41 | // QLineEdit lab ( &dia ); |
42 | QVBoxLayout lay( &dia ); | 42 | QVBoxLayout lay( &dia ); |
43 | lay.setMargin(7); | 43 | lay.setMargin(7); |
44 | lay.setSpacing(7); | 44 | lay.setSpacing(7); |
45 | dia.setCaption( cap ); | ||
46 | QString file = fn; | 45 | QString file = fn; |
47 | if ( file.isEmpty() ) | 46 | if ( file.isEmpty() ) |
48 | file = QDir::homeDirPath()+"/*";; | 47 | file = QDir::homeDirPath()+"/*";; |
49 | QFileInfo fi ( file ); | 48 | QFileInfo fi ( file ); |
50 | OFileSelector o ( &dia,OFileSelector::FileSelector, OFileSelector::Open, fi.dirPath(true), fi.fileName() ); | 49 | OFileSelector o ( &dia,OFileSelector::FileSelector, OFileSelector::Open, fi.dirPath(true), fi.fileName() ); |
51 | QObject::connect ( &o, SIGNAL( ok() ), &dia, SLOT ( accept () ) ); | 50 | QObject::connect ( &o, SIGNAL( ok() ), &dia, SLOT ( accept () ) ); |
52 | lay.addWidget( &o); | 51 | lay.addWidget( &o); |
53 | dia.showMaximized(); | 52 | dia.showMaximized(); |
53 | dia.setCaption( cap ); | ||
54 | int res = dia.exec(); | 54 | int res = dia.exec(); |
55 | if ( res ) | 55 | if ( res ) |
56 | retfile = o.selectedName(); | 56 | retfile = o.selectedName(); |
57 | return retfile; | 57 | return retfile; |
58 | } | 58 | } |
59 | 59 | ||
60 | #else | 60 | #else |
61 | 61 | ||
62 | #include <qfiledialog.h> | 62 | #include <qfiledialog.h> |
63 | 63 | ||
64 | QString KFileDialog::getSaveFileName( const QString & fn, | 64 | QString KFileDialog::getSaveFileName( const QString & fn, |
65 | const QString & cap , QWidget * par ) | 65 | const QString & cap , QWidget * par ) |
diff --git a/microkde/ktextedit.h b/microkde/ktextedit.h index c912f3b..87c0602 100644 --- a/microkde/ktextedit.h +++ b/microkde/ktextedit.h | |||
@@ -1,21 +1,22 @@ | |||
1 | #ifndef MICROKDE_KTEXTEDIT_H | 1 | #ifndef MICROKDE_KTEXTEDIT_H |
2 | #define MICROKDE_KTEXTEDIT_H | 2 | #define MICROKDE_KTEXTEDIT_H |
3 | 3 | ||
4 | #include <qmultilineedit.h> | 4 | #include <qmultilineedit.h> |
5 | 5 | ||
6 | class KTextEdit : public QMultiLineEdit | 6 | class KTextEdit : public QMultiLineEdit |
7 | { | 7 | { |
8 | public: | 8 | public: |
9 | KTextEdit( QWidget *parent ) ; | 9 | KTextEdit( QWidget *parent ) ; |
10 | void setIgnoreMark( bool b ) { mIgnoreMark = b; } | ||
10 | 11 | ||
11 | private: | 12 | private: |
12 | bool mAllowPopupMenu; | 13 | bool mAllowPopupMenu; |
13 | bool mMouseDown; | 14 | bool mMouseDown; |
14 | bool mIgnoreMark; | 15 | bool mIgnoreMark; |
15 | int mYMousePos; | 16 | int mYMousePos; |
16 | int mXMousePos; | 17 | int mXMousePos; |
17 | void mousePressEvent(QMouseEvent *e); | 18 | void mousePressEvent(QMouseEvent *e); |
18 | void mouseReleaseEvent(QMouseEvent *e); | 19 | void mouseReleaseEvent(QMouseEvent *e); |
19 | void mouseMoveEvent(QMouseEvent *e); | 20 | void mouseMoveEvent(QMouseEvent *e); |
20 | }; | 21 | }; |
21 | 22 | ||