author | zecke <zecke> | 2002-09-10 22:18:48 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-09-10 22:18:48 (UTC) |
commit | aa056d16a0bed859dbe23dc93a7220181b216634 (patch) (side-by-side diff) | |
tree | 52942f64e98ab217600e31df61d6b9ecdf1db3a7 /noncore | |
parent | 26ef77469fd6452450eb18e12e231d471673dca8 (diff) | |
download | opie-aa056d16a0bed859dbe23dc93a7220181b216634.zip opie-aa056d16a0bed859dbe23dc93a7220181b216634.tar.gz opie-aa056d16a0bed859dbe23dc93a7220181b216634.tar.bz2 |
Compile fix for Qtopia1.6
selected() -> selectedDocument()
CCMAIL leseb@handhelds.org
-rw-r--r-- | noncore/graphics/drawpad/importdialog.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/noncore/graphics/drawpad/importdialog.cpp b/noncore/graphics/drawpad/importdialog.cpp index 0783ed8..1c447cb 100644 --- a/noncore/graphics/drawpad/importdialog.cpp +++ b/noncore/graphics/drawpad/importdialog.cpp @@ -46,61 +46,63 @@ ImportDialog::ImportDialog(QWidget* parent, const char* name) QVBoxLayout* mainLayout = new QVBoxLayout(this, 4, 4); QHBoxLayout* previewLayout = new QHBoxLayout(4); QVBoxLayout* previewSecondLayout = new QVBoxLayout(4); previewSecondLayout->addWidget(m_pAutomaticPreviewCheckBox); previewSecondLayout->addWidget(previewPushButton); previewSecondLayout->addStretch(); previewLayout->addWidget(m_pPreviewLabel); previewLayout->addLayout(previewSecondLayout); mainLayout->addWidget(m_pFileSelector); mainLayout->addLayout(previewLayout); preview(); } ImportDialog::~ImportDialog() { } const DocLnk* ImportDialog::selected() { - return m_pFileSelector->selected(); + // FIXME change from pointer to reference -zecke + DocLnk *lnk = new DocLnk( m_pFileSelector->selectedDocument() ); + return lnk; } void ImportDialog::fileChanged() { if (m_pAutomaticPreviewCheckBox->isChecked()) { preview(); } } void ImportDialog::preview() { - const DocLnk* docLnk = m_pFileSelector->selected(); + const DocLnk* docLnk = selected(); if (docLnk) { QImage image(docLnk->file()); int previewWidth = m_pPreviewLabel->contentsRect().width(); int previewHeight = m_pPreviewLabel->contentsRect().height(); float widthScale = 1.0; float heightScale = 1.0; if (previewWidth < image.width()) { widthScale = (float)previewWidth / float(image.width()); } if (previewHeight < image.height()) { heightScale = (float)previewHeight / float(image.height()); } float scale = (widthScale < heightScale ? widthScale : heightScale); QImage previewImage = image.smoothScale((int)(image.width() * scale) , (int)(image.height() * scale)); QPixmap previewPixmap; previewPixmap.convertFromImage(previewImage); |