summaryrefslogtreecommitdiffabout
path: root/korganizer/koeventviewer.h
Unidiff
Diffstat (limited to 'korganizer/koeventviewer.h') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeventviewer.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/korganizer/koeventviewer.h b/korganizer/koeventviewer.h
index ca5bc15..6ecc233 100644
--- a/korganizer/koeventviewer.h
+++ b/korganizer/koeventviewer.h
@@ -30,6 +30,59 @@
30 30
31using namespace KCal; 31using namespace KCal;
32 32
33#ifdef DESKTOP_VERSION
34
35#include <qradiobutton.h>
36#include <qpushbutton.h>
37#include <qlayout.h>
38#include <qdialog.h>
39#include <qlabel.h>
40#include <qbuttongroup.h>
41#include <kglobal.h>
42
43class KOPrintPrefs : public QDialog
44{
45 public:
46 KOPrintPrefs( QWidget *parent=0, const char *name=0 ) :
47 QDialog( parent, name, true )
48 {
49 setCaption( i18n("KO/Pi Printout") );
50 QVBoxLayout* lay = new QVBoxLayout( this );
51 lay->setSpacing( 3 );
52 lay->setMargin( 3 );
53 QLabel * lab = new QLabel( i18n("This prints the view as you see it.\n(With the complete content, of course.)\nYou may change the print layout by resizing the view.\nPrint unscaled may print several pages\ndepending on the amount of data.\nPrint scaled down will print all on one page.\nPrint scaled up/down will print all on one page,\nbut will scale up the text to page boundaries,\nif the text is smaller than the page.\nYou can select page geometry setup in the next dialog."), this );
54 lay->addWidget( lab );
55 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("Printout Mode"), this );
56 lay->addWidget( format );
57 format->setExclusive ( true ) ;
58 pmNo = new QRadioButton(i18n("Print unscaled"), format );
59 pmScaledDown = new QRadioButton(i18n("Print scaled down to fit one page"), format );
60 new QRadioButton(i18n("Print scaled up/down to fit one page"), format );
61 pmScaledDown->setChecked( true );
62 QPushButton * ok = new QPushButton( i18n("OK"), this );
63 lay->addWidget( ok );
64 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
65 lay->addWidget( cancel );
66 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
67 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
68 resize( 200, 200 );
69 }
70
71 int printMode()
72 {
73 if ( pmNo->isChecked() )
74 return 0;
75 if ( pmScaledDown->isChecked() )
76 return 1;
77 return 2;
78 }
79private:
80 QRadioButton* pmNo;
81 QRadioButton* pmScaledDown;
82};
83
84#endif
85
33class KOEventViewer : public QTextBrowser { 86class KOEventViewer : public QTextBrowser {
34 Q_OBJECT 87 Q_OBJECT
35 public: 88 public: