111 } |
111 } |
112 } |
112 } |
113 |
113 |
114 // ============================================================================= |
114 // ============================================================================= |
115 // ----------------------------------------------------------------------------- |
115 // ----------------------------------------------------------------------------- |
116 str OverlayDialog::fpath() const |
116 QString OverlayDialog::fpath() const |
117 { |
117 { |
118 return ui->filename->text(); |
118 return ui->filename->text(); |
119 } |
119 } |
120 |
120 |
121 int OverlayDialog::ofsx() const |
121 int OverlayDialog::ofsx() const |
205 QPushButton* LDrawPathDialog::cancelButton() |
205 QPushButton* LDrawPathDialog::cancelButton() |
206 { |
206 { |
207 return ui->buttonBox->button (QDialogButtonBox::Cancel); |
207 return ui->buttonBox->button (QDialogButtonBox::Cancel); |
208 } |
208 } |
209 |
209 |
210 void LDrawPathDialog::setPath (str path) |
210 void LDrawPathDialog::setPath (QString path) |
211 { |
211 { |
212 ui->path->setText (path); |
212 ui->path->setText (path); |
213 } |
213 } |
214 |
214 |
215 str LDrawPathDialog::filename() const |
215 QString LDrawPathDialog::filename() const |
216 { |
216 { |
217 return ui->path->text(); |
217 return ui->path->text(); |
218 } |
218 } |
219 |
219 |
220 // ============================================================================= |
220 // ============================================================================= |
221 // ----------------------------------------------------------------------------- |
221 // ----------------------------------------------------------------------------- |
222 void LDrawPathDialog::slot_findPath() |
222 void LDrawPathDialog::slot_findPath() |
223 { |
223 { |
224 str newpath = QFileDialog::getExistingDirectory (this, "Find LDraw Path"); |
224 QString newpath = QFileDialog::getExistingDirectory (this, "Find LDraw Path"); |
225 |
225 |
226 if (newpath.length() > 0 && newpath != filename()) |
226 if (newpath.length() > 0 && newpath != filename()) |
227 { |
227 { |
228 setPath (newpath); |
228 setPath (newpath); |
229 slot_tryConfigure(); |
229 slot_tryConfigure(); |
303 updateValues(); |
303 updateValues(); |
304 } |
304 } |
305 |
305 |
306 // ============================================================================= |
306 // ============================================================================= |
307 // ----------------------------------------------------------------------------- |
307 // ----------------------------------------------------------------------------- |
308 ExtProgPathPrompt::ExtProgPathPrompt (str progName, QWidget* parent, Qt::WindowFlags f) : |
308 ExtProgPathPrompt::ExtProgPathPrompt (QString progName, QWidget* parent, Qt::WindowFlags f) : |
309 QDialog (parent, f), |
309 QDialog (parent, f), |
310 ui (new Ui_ExtProgPath) |
310 ui (new Ui_ExtProgPath) |
311 { |
311 { |
312 ui->setupUi (this); |
312 ui->setupUi (this); |
313 str labelText = ui->m_label->text(); |
313 QString labelText = ui->m_label->text(); |
314 labelText.replace ("<PROGRAM>", progName); |
314 labelText.replace ("<PROGRAM>", progName); |
315 ui->m_label->setText (labelText); |
315 ui->m_label->setText (labelText); |
316 connect (ui->m_findPath, SIGNAL (clicked (bool)), this, SLOT (findPath())); |
316 connect (ui->m_findPath, SIGNAL (clicked (bool)), this, SLOT (findPath())); |
317 } |
317 } |
318 |
318 |
325 |
325 |
326 // ============================================================================= |
326 // ============================================================================= |
327 // ----------------------------------------------------------------------------- |
327 // ----------------------------------------------------------------------------- |
328 void ExtProgPathPrompt::findPath() |
328 void ExtProgPathPrompt::findPath() |
329 { |
329 { |
330 str path = QFileDialog::getOpenFileName (null, "", "", g_extProgPathFilter); |
330 QString path = QFileDialog::getOpenFileName (null, "", "", g_extProgPathFilter); |
331 |
331 |
332 if (!path.isEmpty()) |
332 if (!path.isEmpty()) |
333 ui->m_path->setText (path); |
333 ui->m_path->setText (path); |
334 } |
334 } |
335 |
335 |
336 // ============================================================================= |
336 // ============================================================================= |
337 // ----------------------------------------------------------------------------- |
337 // ----------------------------------------------------------------------------- |
338 str ExtProgPathPrompt::getPath() const |
338 QString ExtProgPathPrompt::getPath() const |
339 { |
339 { |
340 return ui->m_path->text(); |
340 return ui->m_path->text(); |
341 } |
341 } |
342 |
342 |
343 // ============================================================================= |
343 // ============================================================================= |
365 QDesktopServices::openUrl (QUrl ("mailto:Santeri Piippo <arezey@gmail.com>?subject=LDForge")); |
365 QDesktopServices::openUrl (QUrl ("mailto:Santeri Piippo <arezey@gmail.com>?subject=LDForge")); |
366 } |
366 } |
367 |
367 |
368 // ============================================================================= |
368 // ============================================================================= |
369 // ----------------------------------------------------------------------------- |
369 // ----------------------------------------------------------------------------- |
370 void bombBox (const str& message) |
370 void bombBox (const QString& message) |
371 { |
371 { |
372 QDialog dlg (g_win); |
372 QDialog dlg (g_win); |
373 Ui_BombBox ui; |
373 Ui_BombBox ui; |
374 |
374 |
375 ui.setupUi (&dlg); |
375 ui.setupUi (&dlg); |