-rw-r--r-- | korganizer/koeventviewer.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/korganizer/koeventviewer.h b/korganizer/koeventviewer.h index 64eb4ff..3df667f 100644 --- a/korganizer/koeventviewer.h +++ b/korganizer/koeventviewer.h | |||
@@ -19,13 +19,16 @@ | |||
19 | #ifndef KOEVENTVIEWER_H | 19 | #ifndef KOEVENTVIEWER_H |
20 | #define KOEVENTVIEWER_H | 20 | #define KOEVENTVIEWER_H |
21 | // | 21 | // |
22 | // Viewer widget for events. | 22 | // Viewer widget for events. |
23 | // | 23 | // |
24 | 24 | ||
25 | #include <qtextbrowser.h> | 25 | #include <q3textbrowser.h> |
26 | //Added by qt3to4: | ||
27 | #include <Q3VBoxLayout> | ||
28 | #include <QKeyEvent> | ||
26 | 29 | ||
27 | #include <libkcal/event.h> | 30 | #include <libkcal/event.h> |
28 | #include <libkcal/journal.h> | 31 | #include <libkcal/journal.h> |
29 | 32 | ||
30 | 33 | ||
31 | using namespace KCal; | 34 | using namespace KCal; |
@@ -34,29 +37,29 @@ using namespace KCal; | |||
34 | 37 | ||
35 | #include <qradiobutton.h> | 38 | #include <qradiobutton.h> |
36 | #include <qpushbutton.h> | 39 | #include <qpushbutton.h> |
37 | #include <qlayout.h> | 40 | #include <qlayout.h> |
38 | #include <qdialog.h> | 41 | #include <qdialog.h> |
39 | #include <qlabel.h> | 42 | #include <qlabel.h> |
40 | #include <qbuttongroup.h> | 43 | #include <q3buttongroup.h> |
41 | #include <kglobal.h> | 44 | #include <kglobal.h> |
42 | 45 | ||
43 | class KOPrintPrefs : public QDialog | 46 | class KOPrintPrefs : public QDialog |
44 | { | 47 | { |
45 | public: | 48 | public: |
46 | KOPrintPrefs( QWidget *parent=0, const char *name=0 ) : | 49 | KOPrintPrefs( QWidget *parent=0, const char *name=0 ) : |
47 | QDialog( parent, name, true ) | 50 | QDialog( parent, name, true ) |
48 | { | 51 | { |
49 | setCaption( i18n("KO/Pi Printout") ); | 52 | setCaption( i18n("KO/Pi Printout") ); |
50 | QVBoxLayout* lay = new QVBoxLayout( this ); | 53 | Q3VBoxLayout* lay = new Q3VBoxLayout( this ); |
51 | lay->setSpacing( 9 ); | 54 | lay->setSpacing( 9 ); |
52 | lay->setMargin( 9 ); | 55 | lay->setMargin( 9 ); |
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.\n"), this ); | 56 | 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.\n"), this ); |
54 | lay->addWidget( lab ); | 57 | lay->addWidget( lab ); |
55 | lab->setAlignment( AlignCenter ); | 58 | lab->setAlignment( Qt::AlignCenter ); |
56 | QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("Printout Mode"), this ); | 59 | Q3ButtonGroup* format = new Q3ButtonGroup( 1, Qt::Horizontal, i18n("Printout Mode"), this ); |
57 | lay->addWidget( format ); | 60 | lay->addWidget( format ); |
58 | format->setExclusive ( true ) ; | 61 | format->setExclusive ( true ) ; |
59 | pmNo = new QRadioButton(i18n("Print unscaled"), format ); | 62 | pmNo = new QRadioButton(i18n("Print unscaled"), format ); |
60 | pmScaledDown = new QRadioButton(i18n("Print scaled down to fit one page"), format ); | 63 | pmScaledDown = new QRadioButton(i18n("Print scaled down to fit one page"), format ); |
61 | new QRadioButton(i18n("Print scaled up/down to fit one page"), format ); | 64 | new QRadioButton(i18n("Print scaled up/down to fit one page"), format ); |
62 | pmScaledDown->setChecked( true ); | 65 | pmScaledDown->setChecked( true ); |
@@ -80,13 +83,13 @@ private: | |||
80 | QRadioButton* pmNo; | 83 | QRadioButton* pmNo; |
81 | QRadioButton* pmScaledDown; | 84 | QRadioButton* pmScaledDown; |
82 | }; | 85 | }; |
83 | 86 | ||
84 | #endif | 87 | #endif |
85 | 88 | ||
86 | class KOEventViewer : public QTextBrowser { | 89 | class KOEventViewer : public Q3TextBrowser { |
87 | Q_OBJECT | 90 | Q_OBJECT |
88 | public: | 91 | public: |
89 | KOEventViewer(QWidget *parent=0,const char *name=0); | 92 | KOEventViewer(QWidget *parent=0,const char *name=0); |
90 | virtual ~KOEventViewer(); | 93 | virtual ~KOEventViewer(); |
91 | 94 | ||
92 | void setSource(const QString &); | 95 | void setSource(const QString &); |
@@ -114,13 +117,13 @@ class KOEventViewer : public QTextBrowser { | |||
114 | void formatCategories(Incidence *event); | 117 | void formatCategories(Incidence *event); |
115 | void formatAttendees(Incidence *event); | 118 | void formatAttendees(Incidence *event); |
116 | void formatReadOnly(Incidence *event); | 119 | void formatReadOnly(Incidence *event); |
117 | void keyPressEvent ( QKeyEvent * e ); | 120 | void keyPressEvent ( QKeyEvent * e ); |
118 | 121 | ||
119 | private: | 122 | private: |
120 | QTextBrowser *mEventTextView; | 123 | Q3TextBrowser *mEventTextView; |
121 | bool mSyncMode; | 124 | bool mSyncMode; |
122 | QString deTag(QString text); | 125 | QString deTag(QString text); |
123 | 126 | ||
124 | QString mText; | 127 | QString mText; |
125 | QString mMailSubject; | 128 | QString mMailSubject; |
126 | Incidence* mCurrentIncidence; | 129 | Incidence* mCurrentIncidence; |