summaryrefslogtreecommitdiff
path: root/noncore/graphics/drawpad/thumbnailview.cpp
authorleseb <leseb>2002-07-10 21:59:27 (UTC)
committer leseb <leseb>2002-07-10 21:59:27 (UTC)
commitf568737c20bea96fb79d85681a72e142ec05d66f (patch) (side-by-side diff)
tree80d08b351bbdeec5be93885a4c18ba0207ef990a /noncore/graphics/drawpad/thumbnailview.cpp
parent01b04adb73c8bc49938b71a4bebe6fb6a5477f75 (diff)
downloadopie-f568737c20bea96fb79d85681a72e142ec05d66f.zip
opie-f568737c20bea96fb79d85681a72e142ec05d66f.tar.gz
opie-f568737c20bea96fb79d85681a72e142ec05d66f.tar.bz2
Undo/redo reimplemented
Diffstat (limited to 'noncore/graphics/drawpad/thumbnailview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/drawpad/thumbnailview.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/graphics/drawpad/thumbnailview.cpp b/noncore/graphics/drawpad/thumbnailview.cpp
index 14092bf..9b08ca2 100644
--- a/noncore/graphics/drawpad/thumbnailview.cpp
+++ b/noncore/graphics/drawpad/thumbnailview.cpp
@@ -26,48 +26,48 @@
#include <qimage.h>
#include <qlayout.h>
#include <qmessagebox.h>
#include <qtoolbutton.h>
#define THUMBNAIL_SIZE 48
PageListBoxItem::PageListBoxItem(Page* page, QListBox* parent)
: QListBoxItem(parent)
{
m_pPage = page;
- QImage image = m_pPage->convertToImage();
+ QImage image = m_pPage->pixmap()->convertToImage();
int previewWidth = THUMBNAIL_SIZE;
int previewHeight = THUMBNAIL_SIZE;
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 thumbnailImage = image.smoothScale((int)(image.width() * scale) , (int)(image.height() * scale));
m_thumbnail.convertFromImage(thumbnailImage);
m_titleText = QObject::tr("Title:") + " " + m_pPage->title();
- m_dimensionText = QObject::tr("Dimension:") + " " + QString::number(m_pPage->width())
- + "x" + QString::number(m_pPage->height());
+ m_dimensionText = QObject::tr("Dimension:") + " " + QString::number(m_pPage->pixmap()->width())
+ + "x" + QString::number(m_pPage->pixmap()->height());
m_dateText = QObject::tr("Date:") + " " + dateTimeString(m_pPage->lastModified());
QColor baseColor = parent->colorGroup().base();
int h, s, v;
baseColor.hsv(&h, &s, &v);
if (v > 128) {
m_alternateColor = baseColor.dark(115);
} else if (baseColor != Qt::black) {
m_alternateColor = baseColor.light(115);
} else {
m_alternateColor = QColor(32, 32, 32);