[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/graphics/kipi-plugins/printimages
From: Gilles Caulier <caulier.gilles () gmail ! com>
Date: 2010-10-14 12:12:35
Message-ID: 20101014121235.4B95DAC895 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1185859 by cgilles:
no need .h if .moc is there
Use more private internal container
M +3 -2 atkinspagelayout.cpp
M +2 -4 atkinspagelayout.h
M +8 -9 cropframe.cpp
M +16 -12 cropframe.h
M +0 -1 customdlg.cpp
M +0 -1 plugin_printimages.cpp
M +0 -1 wizard.cpp
--- trunk/extragear/graphics/kipi-plugins/printimages/atkinspagelayout.cpp #1185858:1185859
@@ -6,7 +6,7 @@
* Date : 2007-02-13
* Description : Layouting photos on a page
*
- * Copyright 2007-2009 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
+ * Copyright 2007-2010 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
@@ -37,8 +37,9 @@
namespace KIPIPrintImagesPlugin
{
-class AtkinsPageLayoutPriv
+class AtkinsPageLayout::AtkinsPageLayoutPriv
{
+
public:
AtkinsPageLayoutPriv()
{
--- trunk/extragear/graphics/kipi-plugins/printimages/atkinspagelayout.h #1185858:1185859
@@ -6,7 +6,7 @@
* Date : 2007-02-13
* Description : Layouting photos on a page
*
- * Copyright 2007-2009 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
+ * Copyright 2007-2010 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
@@ -31,8 +31,6 @@
namespace KIPIPrintImagesPlugin
{
-class AtkinsPageLayoutPriv;
-
/**
Implements the algorithm described in
@@ -80,10 +78,10 @@
private:
+ class AtkinsPageLayoutPriv;
AtkinsPageLayoutPriv* const d;
};
} // NameSpace KIPIPrintImagesPlugin
#endif /* ATKINSPAGELAYOUT_H */
-
--- trunk/extragear/graphics/kipi-plugins/printimages/cropframe.cpp #1185858:1185859
@@ -7,7 +7,7 @@
* Description : a kipi plugin to print images
*
* Copyright 2002-2003 by Todd Shoemaker <todd@theshoemakers.net>
- * Copyright 2007-2008 by 2007 Angelo Naselli <anaselli at linux dot it>
+ * Copyright 2007-2008 by Angelo Naselli <anaselli at linux dot it>
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
@@ -21,7 +21,6 @@
*
* ============================================================ */
-#include "cropframe.h"
#include "cropframe.moc"
// C++ includes
@@ -47,7 +46,7 @@
{
m_mouseDown = false;
m_drawRec = true;
- m_pixmap = NULL;
+ m_pixmap = 0;
}
@@ -70,7 +69,8 @@
if (resetCropRegion)
{
// first, let's see if we should rotate
- if (autoRotate) {
+ if (autoRotate)
+ {
if (m_photo->rotation == 0 && ((width > height &&
m_photo->thumbnail().height() > m_photo->thumbnail().width()) ||
(height > width &&
@@ -129,11 +129,12 @@
if (resetCropRegion)
{
m_cropRegion.setRect((this->width() / 2) - (w / 2), (this->height() / 2) - (h / 2), w, h);
-
m_photo->cropRegion = _screenToPhotoRect(m_cropRegion);
}
else
+ {
m_cropRegion = _photoToScreenRect(m_photo->cropRegion);
+ }
if (paint)
update();
@@ -221,7 +222,6 @@
void CropFrame::paintEvent (QPaintEvent *)
{
-
QPixmap bmp(this->width(), this->height());
QPainter p;
p.begin(&bmp);
@@ -255,7 +255,6 @@
m_mouseDown = true;
this->mouseMoveEvent(e);
}
-
}
void CropFrame::mouseReleaseEvent(QMouseEvent *e)
@@ -292,7 +291,8 @@
int newX = m_cropRegion.x();
int newY = m_cropRegion.y();
- switch (e->key()) {
+ switch (e->key())
+ {
case Qt::Key_Up : newY--;
break;
case Qt::Key_Down : newY++;
@@ -317,7 +317,6 @@
m_photo->cropRegion = _screenToPhotoRect(m_cropRegion);
update();
//repaint(m_cropRegion);
-
}
void CropFrame::setColor(QColor c)
--- trunk/extragear/graphics/kipi-plugins/printimages/cropframe.h #1185858:1185859
@@ -7,7 +7,7 @@
* Description : a kipi plugin to print images
*
* Copyright 2002-2003 by Todd Shoemaker <todd@theshoemakers.net>
- * Copyright 2007-2008 by 2007 Angelo Naselli <anaselli at linux dot it>
+ * Copyright 2007-2008 by Angelo Naselli <anaselli at linux dot it>
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
@@ -42,6 +42,7 @@
Q_OBJECT
public:
+
CropFrame(QWidget *parent);
~CropFrame();
void init(TPhoto *photo, int width, int height, bool autoRotate, bool paint = true);
@@ -49,7 +50,21 @@
QColor color();
void drawCropRectangle(bool draw=true) {m_drawRec=draw; };
+protected:
+
+ virtual void paintEvent(QPaintEvent*);
+ virtual void mousePressEvent(QMouseEvent*);
+ virtual void mouseReleaseEvent(QMouseEvent*);
+ virtual void mouseMoveEvent(QMouseEvent*);
+ virtual void keyPressEvent(QKeyEvent*);
+
private:
+
+ QRect _screenToPhotoRect(QRect r);
+ QRect _photoToScreenRect(QRect r);
+
+private:
+
TPhoto *m_photo;
bool m_mouseDown;
QPixmap *m_pixmap;
@@ -60,17 +75,6 @@
QRect m_cropRegion;
bool m_drawRec;
-
-
- QRect _screenToPhotoRect(QRect r);
- QRect _photoToScreenRect(QRect r);
-
- protected:
- virtual void paintEvent (QPaintEvent *);
- virtual void mousePressEvent(QMouseEvent *);
- virtual void mouseReleaseEvent(QMouseEvent *);
- virtual void mouseMoveEvent(QMouseEvent *);
- virtual void keyPressEvent(QKeyEvent *);
};
} // NameSpace KIPIPrintImagesPlugin
--- trunk/extragear/graphics/kipi-plugins/printimages/customdlg.cpp #1185858:1185859
@@ -23,7 +23,6 @@
// Local includes.
-#include "customdlg.h"
#include "customdlg.moc"
namespace KIPIPrintImagesPlugin
--- trunk/extragear/graphics/kipi-plugins/printimages/plugin_printimages.cpp #1185858:1185859
@@ -20,7 +20,6 @@
*
* ============================================================ */
-#include "plugin_printimages.h"
#include "plugin_printimages.moc"
// C ANSI includes
--- trunk/extragear/graphics/kipi-plugins/printimages/wizard.cpp #1185858:1185859
@@ -20,7 +20,6 @@
*
* ============================================================ */
-#include "wizard.h"
#include "wizard.moc"
// STD
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic