author | kergoth <kergoth> | 2003-08-09 16:24:58 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2003-08-09 16:24:58 (UTC) |
commit | e16d333ec2e8509fc665921ca106c25325bae9e0 (patch) (side-by-side diff) | |
tree | 9e9068190a15bc9b2a52ab33b40881128f732c0e /noncore/graphics/drawpad/importdialog.cpp | |
parent | 1c58d1407f9584fedcdae390a04e2b37e5853361 (diff) | |
download | opie-e16d333ec2e8509fc665921ca106c25325bae9e0.zip opie-e16d333ec2e8509fc665921ca106c25325bae9e0.tar.gz opie-e16d333ec2e8509fc665921ca106c25325bae9e0.tar.bz2 |
Merge from BRANCH_1_0
Diffstat (limited to 'noncore/graphics/drawpad/importdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/drawpad/importdialog.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/noncore/graphics/drawpad/importdialog.cpp b/noncore/graphics/drawpad/importdialog.cpp index 1c447cb..9a59a20 100644 --- a/noncore/graphics/drawpad/importdialog.cpp +++ b/noncore/graphics/drawpad/importdialog.cpp @@ -5,41 +5,45 @@ * (C) 2002 by S. Prud'homme <prudhomme@laposte.net> * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "importdialog.h" #include <qpe/applnk.h> -#include <qpe/fileselector.h> +#include <opie/ofileselector.h> #include <qcheckbox.h> #include <qimage.h> #include <qlabel.h> #include <qlayout.h> #include <qpushbutton.h> ImportDialog::ImportDialog(QWidget* parent, const char* name) : QDialog(parent, name, true) { setCaption(tr("DrawPad - Import")); - m_pFileSelector = new FileSelector("image/*", this, "fileselector"); + MimeTypes types; types.insert( tr("All images"),"image/*" ); + m_pFileSelector = new OFileSelector(this, + OFileSelector::FileSelector, + OFileSelector::Normal, + QString::null, + QString::null, types ); + m_pFileSelector->setNameVisible( false ); connect(m_pFileSelector, SIGNAL(fileSelected(const DocLnk&)), this, SLOT(fileChanged())); - m_pFileSelector->setNewVisible(false); - m_pFileSelector->setCloseVisible(false); m_pPreviewLabel = new QLabel(this); m_pPreviewLabel->setFrameStyle(QFrame::Panel | QFrame::Sunken); m_pPreviewLabel->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); m_pPreviewLabel->setFixedSize(114, 114); m_pPreviewLabel->setBackgroundMode(QWidget::PaletteMid); m_pAutomaticPreviewCheckBox = new QCheckBox(tr("Automatic preview"), this); m_pAutomaticPreviewCheckBox->setChecked(true); QPushButton* previewPushButton = new QPushButton(tr("Preview"), this); connect(previewPushButton, SIGNAL(clicked()), this, SLOT(preview())); @@ -59,25 +63,25 @@ ImportDialog::ImportDialog(QWidget* parent, const char* name) mainLayout->addLayout(previewLayout); preview(); } ImportDialog::~ImportDialog() { } const DocLnk* ImportDialog::selected() { // FIXME change from pointer to reference -zecke - DocLnk *lnk = new DocLnk( m_pFileSelector->selectedDocument() ); + DocLnk *lnk = new DocLnk( m_pFileSelector->selectedDocument() ); return lnk; } void ImportDialog::fileChanged() { if (m_pAutomaticPreviewCheckBox->isChecked()) { preview(); } } void ImportDialog::preview() { |