summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/GraphicWin.h
authorpohly <pohly>2004-08-24 20:52:45 (UTC)
committer pohly <pohly>2004-08-24 20:52:45 (UTC)
commit73253e93327cf4ef0932de1b4afb56af22a0f37e (patch) (side-by-side diff)
tree1c9a7a6dd3341e036a894d348a3372525d29acec /noncore/apps/opie-reader/GraphicWin.h
parente90847c784c48bd21bf8768cb38edb853b832697 (diff)
downloadopie-73253e93327cf4ef0932de1b4afb56af22a0f37e.zip
opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.tar.gz
opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.tar.bz2
updated source to opie-reader 0.7g
Diffstat (limited to 'noncore/apps/opie-reader/GraphicWin.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/GraphicWin.h79
1 files changed, 35 insertions, 44 deletions
diff --git a/noncore/apps/opie-reader/GraphicWin.h b/noncore/apps/opie-reader/GraphicWin.h
index 31811d2..70d5f7e 100644
--- a/noncore/apps/opie-reader/GraphicWin.h
+++ b/noncore/apps/opie-reader/GraphicWin.h
@@ -3,63 +3,54 @@
#include <qscrollview.h>
#include <qpixmap.h>
+#include <qimage.h>
#include <qpushbutton.h>
#include <qlayout.h>
+#include <qwmatrix.h>
class GraphicScroll : public QScrollView
{
- Q_OBJECT
- QWidget* m_picture;
+ Q_OBJECT
+ QWidget* m_picture;
protected:
- void hideEvent( QHideEvent * p)
- {
- m_picture->setFixedSize(1,1);
- }
+ void hideEvent( QHideEvent * p)
+ {
+ m_picture->setFixedSize(1,1);
+ }
public:
- GraphicScroll( QWidget *parent=0, const char *name=0, WFlags f = 0)
- : QScrollView(parent, name, f)
- {
- m_picture = new QWidget(viewport());
- addChild(m_picture);
- }
- void setPixmap(QPixmap& pm)
- {
- m_picture->setFixedSize(pm.size());
- m_picture->setBackgroundPixmap(pm);
- }
-/*
- private slots:
- void graphicClose() { emit Close(); }
- signals:
- void Close();
-*/
-
+ GraphicScroll( QWidget *parent=0, const char *name=0, WFlags f = 0)
+ : QScrollView(parent, name, f)
+ {
+ m_picture = new QWidget(viewport());
+ addChild(m_picture);
+ }
+ void setPixmap(QPixmap& pm)
+ {
+ m_picture->setFixedSize(pm.size());
+ m_picture->setBackgroundPixmap(pm);
+ }
};
class GraphicWin : public QWidget
{
- Q_OBJECT
+ Q_OBJECT
- GraphicScroll* m_scroll;
- signals:
- void Closed();
- private slots:
- void slotClosed() { emit Closed(); }
-
- public:
-
- void setPixmap(QPixmap& pm) { m_scroll->setPixmap(pm); }
- GraphicWin( QWidget *parent=0, const char *name=0, WFlags f = 0)
- : QWidget(parent, name, f)
- {
- QVBoxLayout* grid = new QVBoxLayout(this);
- m_scroll = new GraphicScroll(this);
- QPushButton* exitButton = new QPushButton("Close", this);
- connect(exitButton, SIGNAL( released() ), this, SLOT( slotClosed() ) );
- grid->addWidget(m_scroll,1);
- grid->addWidget(exitButton);
- }
+ GraphicScroll* m_scroll;
+ QImage m_im;
+ QImage resizeimage(int w, int h);
+ void resetpm();
+ bool m_isFitted, m_isRotated;
+signals:
+ void Closed();
+private slots:
+ void slotClosed() { emit Closed(); }
+ void slotFit();
+ void slotRotate();
+public:
+ void setPixmap(QPixmap& pm) { m_scroll->setPixmap(pm); }
+ void setImage(QImage& im);
+ GraphicWin( QWidget *parent=0, const char *name=0, WFlags f = 0);
};
#endif