author | zecke <zecke> | 2002-09-10 22:18:48 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-09-10 22:18:48 (UTC) |
commit | aa056d16a0bed859dbe23dc93a7220181b216634 (patch) (unidiff) | |
tree | 52942f64e98ab217600e31df61d6b9ecdf1db3a7 /noncore/graphics/drawpad/importdialog.cpp | |
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
Diffstat (limited to 'noncore/graphics/drawpad/importdialog.cpp') (more/less context) (ignore whitespace changes)
-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 | |||
@@ -58,37 +58,39 @@ ImportDialog::ImportDialog(QWidget* parent, const char* name) | |||
58 | mainLayout->addWidget(m_pFileSelector); | 58 | mainLayout->addWidget(m_pFileSelector); |
59 | mainLayout->addLayout(previewLayout); | 59 | mainLayout->addLayout(previewLayout); |
60 | 60 | ||
61 | preview(); | 61 | preview(); |
62 | } | 62 | } |
63 | 63 | ||
64 | ImportDialog::~ImportDialog() | 64 | ImportDialog::~ImportDialog() |
65 | { | 65 | { |
66 | } | 66 | } |
67 | 67 | ||
68 | const DocLnk* ImportDialog::selected() | 68 | const DocLnk* ImportDialog::selected() |
69 | { | 69 | { |
70 | return m_pFileSelector->selected(); | 70 | // FIXME change from pointer to reference -zecke |
71 | DocLnk *lnk = new DocLnk( m_pFileSelector->selectedDocument() ); | ||
72 | return lnk; | ||
71 | } | 73 | } |
72 | 74 | ||
73 | void ImportDialog::fileChanged() | 75 | void ImportDialog::fileChanged() |
74 | { | 76 | { |
75 | if (m_pAutomaticPreviewCheckBox->isChecked()) { | 77 | if (m_pAutomaticPreviewCheckBox->isChecked()) { |
76 | preview(); | 78 | preview(); |
77 | } | 79 | } |
78 | } | 80 | } |
79 | 81 | ||
80 | void ImportDialog::preview() | 82 | void ImportDialog::preview() |
81 | { | 83 | { |
82 | const DocLnk* docLnk = m_pFileSelector->selected(); | 84 | const DocLnk* docLnk = selected(); |
83 | 85 | ||
84 | if (docLnk) { | 86 | if (docLnk) { |
85 | QImage image(docLnk->file()); | 87 | QImage image(docLnk->file()); |
86 | 88 | ||
87 | int previewWidth = m_pPreviewLabel->contentsRect().width(); | 89 | int previewWidth = m_pPreviewLabel->contentsRect().width(); |
88 | int previewHeight = m_pPreviewLabel->contentsRect().height(); | 90 | int previewHeight = m_pPreviewLabel->contentsRect().height(); |
89 | 91 | ||
90 | float widthScale = 1.0; | 92 | float widthScale = 1.0; |
91 | float heightScale = 1.0; | 93 | float heightScale = 1.0; |
92 | 94 | ||
93 | if (previewWidth < image.width()) { | 95 | if (previewWidth < image.width()) { |
94 | widthScale = (float)previewWidth / float(image.width()); | 96 | widthScale = (float)previewWidth / float(image.width()); |