author | alwin <alwin> | 2004-03-02 12:14:15 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-03-02 12:14:15 (UTC) |
commit | 0d59c780513da78033f4d9040475dee9db0256d4 (patch) (unidiff) | |
tree | 503d320b4aa3daae9982082e7b34e3e2c48bdfb7 /libopie2/opieui/fileselector/ofiledialog.cpp | |
parent | a0981652d61776d70f25980f035748b21339e946 (diff) | |
download | opie-0d59c780513da78033f4d9040475dee9db0256d4.zip opie-0d59c780513da78033f4d9040475dee9db0256d4.tar.gz opie-0d59c780513da78033f4d9040475dee9db0256d4.tar.bz2 |
run the optimize_connect script
the whole cvs is tagged with "before_optimize_connect" if there are problems you
can check the diff (but it had compiled and run here)
Diffstat (limited to 'libopie2/opieui/fileselector/ofiledialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opieui/fileselector/ofiledialog.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libopie2/opieui/fileselector/ofiledialog.cpp b/libopie2/opieui/fileselector/ofiledialog.cpp index 2a89c5d..e7daead 100644 --- a/libopie2/opieui/fileselector/ofiledialog.cpp +++ b/libopie2/opieui/fileselector/ofiledialog.cpp | |||
@@ -66,98 +66,98 @@ void saveLastDir( const QString& key, const QString& file ) | |||
66 | { | 66 | { |
67 | if ( qApp->argc() < 1 ) | 67 | if ( qApp->argc() < 1 ) |
68 | return; | 68 | return; |
69 | 69 | ||
70 | Config cfg( QFileInfo(qApp->argv()[0]).fileName() ); | 70 | Config cfg( QFileInfo(qApp->argv()[0]).fileName() ); |
71 | cfg.setGroup( key ); | 71 | cfg.setGroup( key ); |
72 | QFileInfo inf( file ); | 72 | QFileInfo inf( file ); |
73 | cfg.writeEntry("LastDir", inf.dirPath( true ) ); | 73 | cfg.writeEntry("LastDir", inf.dirPath( true ) ); |
74 | } | 74 | } |
75 | }; | 75 | }; |
76 | 76 | ||
77 | /** | 77 | /** |
78 | * This constructs a modal dialog | 78 | * This constructs a modal dialog |
79 | * | 79 | * |
80 | * @param caption The caption of the dialog | 80 | * @param caption The caption of the dialog |
81 | * @param wid The parent widget | 81 | * @param wid The parent widget |
82 | * @param mode The mode of the OFileSelector @see OFileSelector | 82 | * @param mode The mode of the OFileSelector @see OFileSelector |
83 | * @param selector The selector of the OFileSelector | 83 | * @param selector The selector of the OFileSelector |
84 | * @param dirName the dir or resource to start from | 84 | * @param dirName the dir or resource to start from |
85 | * @param fileName a proposed or existing filename | 85 | * @param fileName a proposed or existing filename |
86 | * @param mimetypes The mimeTypes | 86 | * @param mimetypes The mimeTypes |
87 | */ | 87 | */ |
88 | OFileDialog::OFileDialog(const QString &caption, | 88 | OFileDialog::OFileDialog(const QString &caption, |
89 | QWidget *wid, int mode, int selector, | 89 | QWidget *wid, int mode, int selector, |
90 | const QString &dirName, | 90 | const QString &dirName, |
91 | const QString &fileName, | 91 | const QString &fileName, |
92 | const QMap<QString,QStringList>& mimetypes ) | 92 | const QMap<QString,QStringList>& mimetypes ) |
93 | : QDialog( wid, "OFileDialog", true ) | 93 | : QDialog( wid, "OFileDialog", true ) |
94 | { | 94 | { |
95 | // QVBoxLayout *lay = new QVBoxLayout(this); | 95 | // QVBoxLayout *lay = new QVBoxLayout(this); |
96 | //showMaximized(); | 96 | //showMaximized(); |
97 | QVBoxLayout *lay = new QVBoxLayout(this ); | 97 | QVBoxLayout *lay = new QVBoxLayout(this ); |
98 | file = new OFileSelector(this , mode, selector, | 98 | file = new OFileSelector(this , mode, selector, |
99 | dirName, fileName, | 99 | dirName, fileName, |
100 | mimetypes ); | 100 | mimetypes ); |
101 | lay->addWidget( file ); | 101 | lay->addWidget( file ); |
102 | 102 | ||
103 | //lay->addWidget( file ); | 103 | //lay->addWidget( file ); |
104 | //showFullScreen(); | 104 | //showFullScreen(); |
105 | setCaption( caption.isEmpty() ? tr("FileDialog") : caption ); | 105 | setCaption( caption.isEmpty() ? tr("FileDialog") : caption ); |
106 | connect(file, SIGNAL(fileSelected(const QString&) ), | 106 | connect(file, SIGNAL(fileSelected(const QString&) ), |
107 | this, SLOT(slotFileSelected(const QString&) ) ); | 107 | this, SLOT(slotFileSelected(const QString&) ) ); |
108 | connect(file, SIGNAL(ok() ), | 108 | connect(file, SIGNAL(ok() ), |
109 | this, SLOT(slotSelectorOk()) ) ; | 109 | this, SLOT(slotSelectorOk()) ) ; |
110 | 110 | ||
111 | connect(file, SIGNAL(dirSelected(const QString&) ), this, SLOT(slotDirSelected(const QString&) ) ); | 111 | connect(file, SIGNAL(dirSelected(const QString&) ), this, SLOT(slotDirSelected(const QString&) ) ); |
112 | 112 | ||
113 | #if 0 | 113 | #if 0 |
114 | connect(file, SIGNAL(dirSelected(const QString &) ), | 114 | connect(file, SIGNAL(dirSelected(const QString&) ), |
115 | this, SLOT(slotDirSelected(const QString &) ) ); | 115 | this, SLOT(slotDirSelected(const QString&) ) ); |
116 | #endif | 116 | #endif |
117 | } | 117 | } |
118 | /** | 118 | /** |
119 | * @returns the mimetype of the selected | 119 | * @returns the mimetype of the selected |
120 | * currently it return QString::null | 120 | * currently it return QString::null |
121 | */ | 121 | */ |
122 | QString OFileDialog::mimetype()const | 122 | QString OFileDialog::mimetype()const |
123 | { | 123 | { |
124 | return QString::null; | 124 | return QString::null; |
125 | } | 125 | } |
126 | 126 | ||
127 | /** | 127 | /** |
128 | * @return the fileName | 128 | * @return the fileName |
129 | */ | 129 | */ |
130 | QString OFileDialog::fileName()const | 130 | QString OFileDialog::fileName()const |
131 | { | 131 | { |
132 | return file->selectedName(); | 132 | return file->selectedName(); |
133 | } | 133 | } |
134 | 134 | ||
135 | /** | 135 | /** |
136 | * return a DocLnk to the current file | 136 | * return a DocLnk to the current file |
137 | */ | 137 | */ |
138 | DocLnk OFileDialog::selectedDocument()const | 138 | DocLnk OFileDialog::selectedDocument()const |
139 | { | 139 | { |
140 | return file->selectedDocument(); | 140 | return file->selectedDocument(); |
141 | } | 141 | } |
142 | 142 | ||
143 | /** | 143 | /** |
144 | * This opens up a filedialog in Open mode | 144 | * This opens up a filedialog in Open mode |
145 | * | 145 | * |
146 | * @param selector the Selector Mode | 146 | * @param selector the Selector Mode |
147 | * @param startDir Where to start from | 147 | * @param startDir Where to start from |
148 | * @param file A proposed filename | 148 | * @param file A proposed filename |
149 | * @param mimes A list of MimeTypes | 149 | * @param mimes A list of MimeTypes |
150 | * @param wid the parent | 150 | * @param wid the parent |
151 | * @param caption of the dialog if QString::null tr("Open") will be used | 151 | * @param caption of the dialog if QString::null tr("Open") will be used |
152 | * @return the fileName or QString::null | 152 | * @return the fileName or QString::null |
153 | */ | 153 | */ |
154 | QString OFileDialog::getOpenFileName(int selector, | 154 | QString OFileDialog::getOpenFileName(int selector, |
155 | const QString &_startDir, | 155 | const QString &_startDir, |
156 | const QString &file, | 156 | const QString &file, |
157 | const MimeTypes &mimes, | 157 | const MimeTypes &mimes, |
158 | QWidget *wid, | 158 | QWidget *wid, |
159 | const QString &caption ) | 159 | const QString &caption ) |
160 | { | 160 | { |
161 | QString ret; | 161 | QString ret; |
162 | QString startDir = _startDir; | 162 | QString startDir = _startDir; |
163 | if (startDir.isEmpty() ) | 163 | if (startDir.isEmpty() ) |