• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kviewshell

sizePreview.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 // SizePreview.h
00003 //
00004 // Part of KVIEWSHELL - A framework for multipage text/gfx viewers
00005 //
00006 // (C) 2002 Stefan Kebekus
00007 // Distributed under the GPL
00008 
00009 // Add header files alphabetically
00010 
00011 #ifndef SIZEPREVIEW_H
00012 #define SIZEPREVIEW_H
00013 
00014 #include <qpixmap.h>
00015 #include <qwidget.h>
00016 
00017 class SimplePageSize;
00018 
00019 class SizePreview : public QWidget
00020 {
00021   Q_OBJECT
00022 
00023 public:
00024   SizePreview( QWidget *parent, const char* name=0, WFlags f=0 );
00025 
00026 public slots:
00027   // Sets the size.
00028   void setSize(const SimplePageSize&);
00029 
00030   // or = 0 means "Portrait", anything else means "Landscape"
00031   void setOrientation(int ori); 
00032 
00033 protected:
00034   void paintEvent(QPaintEvent*);
00035   void resizeEvent(QResizeEvent*);
00036 
00037 private:
00038   int orientation; // 0 = portrait, other = landscape
00039 
00040   // Both must be positive at all times!
00041   float _width; // in mm
00042   float _height; // in mm
00043 
00044   QPixmap pixmap;
00045 };
00046 
00047 #endif

kviewshell

Skip menu "kviewshell"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

API Reference

Skip menu "API Reference"
  • kviewshell
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal