author | zautrix <zautrix> | 2005-03-28 19:45:15 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-28 19:45:15 (UTC) |
commit | 4034290f894ff7d1b0cf1197078e0ed832566bb7 (patch) (unidiff) | |
tree | 21b7d2e2568f11079f705b8312e15146be4309ac /korganizer | |
parent | ea070abfcff313cac87dbb4d5c9410784740de21 (diff) | |
download | kdepimpi-4034290f894ff7d1b0cf1197078e0ed832566bb7.zip kdepimpi-4034290f894ff7d1b0cf1197078e0ed832566bb7.tar.gz kdepimpi-4034290f894ff7d1b0cf1197078e0ed832566bb7.tar.bz2 |
print fixes
-rw-r--r-- | korganizer/koagendaview.cpp | 5 | ||||
-rw-r--r-- | korganizer/koeventviewer.h | 8 |
2 files changed, 9 insertions, 4 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index f452db0..b9909d6 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -1049,48 +1049,52 @@ void KOAgendaView::showEvents(QPtrList<Event>) | |||
1049 | kdDebug() << "KOAgendaView::showEvents() is not yet implemented" << endl; | 1049 | kdDebug() << "KOAgendaView::showEvents() is not yet implemented" << endl; |
1050 | } | 1050 | } |
1051 | 1051 | ||
1052 | void KOAgendaView::changeEventDisplay(Event *, int) | 1052 | void KOAgendaView::changeEventDisplay(Event *, int) |
1053 | { | 1053 | { |
1054 | // qDebug("KOAgendaView::changeEventDisplay "); | 1054 | // qDebug("KOAgendaView::changeEventDisplay "); |
1055 | // kdDebug() << "KOAgendaView::changeEventDisplay" << endl; | 1055 | // kdDebug() << "KOAgendaView::changeEventDisplay" << endl; |
1056 | // this should be re-written to be MUCH smarter. Right now we | 1056 | // this should be re-written to be MUCH smarter. Right now we |
1057 | // are just playing dumb. | 1057 | // are just playing dumb. |
1058 | fillAgenda(); | 1058 | fillAgenda(); |
1059 | } | 1059 | } |
1060 | 1060 | ||
1061 | void KOAgendaView::fillAgenda(const QDate &) | 1061 | void KOAgendaView::fillAgenda(const QDate &) |
1062 | { | 1062 | { |
1063 | // qDebug("KOAgendaView::fillAgenda "); | 1063 | // qDebug("KOAgendaView::fillAgenda "); |
1064 | fillAgenda(); | 1064 | fillAgenda(); |
1065 | } | 1065 | } |
1066 | 1066 | ||
1067 | void KOAgendaView::fillAgenda() | 1067 | void KOAgendaView::fillAgenda() |
1068 | { | 1068 | { |
1069 | if ( globalFlagBlockStartup ) | 1069 | if ( globalFlagBlockStartup ) |
1070 | return; | 1070 | return; |
1071 | if ( globalFlagBlockAgenda == 1 ) | 1071 | if ( globalFlagBlockAgenda == 1 ) |
1072 | return; | 1072 | return; |
1073 | static bool onlyOne = false; | ||
1074 | if ( onlyOne ) | ||
1075 | return; | ||
1076 | onlyOne = true; | ||
1073 | //if ( globalFlagBlockAgenda == 2 ) | 1077 | //if ( globalFlagBlockAgenda == 2 ) |
1074 | //globalFlagBlockAgenda = 0; | 1078 | //globalFlagBlockAgenda = 0; |
1075 | // globalFlagBlockPainting = false; | 1079 | // globalFlagBlockPainting = false; |
1076 | if ( globalFlagBlockAgenda == 0 ) | 1080 | if ( globalFlagBlockAgenda == 0 ) |
1077 | globalFlagBlockAgenda = 1; | 1081 | globalFlagBlockAgenda = 1; |
1078 | // clearView(); | 1082 | // clearView(); |
1079 | //qDebug("fillAgenda()++++ "); | 1083 | //qDebug("fillAgenda()++++ "); |
1080 | globalFlagBlockAgendaItemPaint = 1; | 1084 | globalFlagBlockAgendaItemPaint = 1; |
1081 | 1085 | ||
1082 | mAllDayAgenda->changeColumns(mSelectedDates.count()); | 1086 | mAllDayAgenda->changeColumns(mSelectedDates.count()); |
1083 | mAgenda->changeColumns(mSelectedDates.count()); | 1087 | mAgenda->changeColumns(mSelectedDates.count()); |
1084 | qApp->processEvents(); | 1088 | qApp->processEvents(); |
1085 | mEventIndicatorTop->changeColumns(mSelectedDates.count()); | 1089 | mEventIndicatorTop->changeColumns(mSelectedDates.count()); |
1086 | mEventIndicatorBottom->changeColumns(mSelectedDates.count()); | 1090 | mEventIndicatorBottom->changeColumns(mSelectedDates.count()); |
1087 | setHolidayMasks(); | 1091 | setHolidayMasks(); |
1088 | 1092 | ||
1089 | //mAgenda->hideUnused(); | 1093 | //mAgenda->hideUnused(); |
1090 | //mAllDayAgenda->hideUnused(); | 1094 | //mAllDayAgenda->hideUnused(); |
1091 | 1095 | ||
1092 | // mAgenda->blockNextRepaint( false ); | 1096 | // mAgenda->blockNextRepaint( false ); |
1093 | // mAgenda->viewport()->repaint(); | 1097 | // mAgenda->viewport()->repaint(); |
1094 | // mAgenda->blockNextRepaint( true ); | 1098 | // mAgenda->blockNextRepaint( true ); |
1095 | mMinY.resize(mSelectedDates.count()); | 1099 | mMinY.resize(mSelectedDates.count()); |
1096 | mMaxY.resize(mSelectedDates.count()); | 1100 | mMaxY.resize(mSelectedDates.count()); |
@@ -1236,48 +1240,49 @@ void KOAgendaView::fillAgenda() | |||
1236 | mAllDayAgenda->hideUnused(); | 1240 | mAllDayAgenda->hideUnused(); |
1237 | mAgenda->checkScrollBoundaries(); | 1241 | mAgenda->checkScrollBoundaries(); |
1238 | 1242 | ||
1239 | deleteSelectedDateTime(); | 1243 | deleteSelectedDateTime(); |
1240 | 1244 | ||
1241 | createDayLabels(); | 1245 | createDayLabels(); |
1242 | emit incidenceSelected( 0 ); | 1246 | emit incidenceSelected( 0 ); |
1243 | 1247 | ||
1244 | if ( globalFlagBlockAgenda == 2 ) { | 1248 | if ( globalFlagBlockAgenda == 2 ) { |
1245 | if ( KOPrefs::instance()->mSetTimeToDayStartAt ) | 1249 | if ( KOPrefs::instance()->mSetTimeToDayStartAt ) |
1246 | setStartHour( KOPrefs::instance()->mDayBegins ); | 1250 | setStartHour( KOPrefs::instance()->mDayBegins ); |
1247 | else if ( KOPrefs::instance()->mCenterOnCurrentTime ) | 1251 | else if ( KOPrefs::instance()->mCenterOnCurrentTime ) |
1248 | setStartHour( QTime::currentTime ().hour() ); | 1252 | setStartHour( QTime::currentTime ().hour() ); |
1249 | // qApp->processEvents(); | 1253 | // qApp->processEvents(); |
1250 | } | 1254 | } |
1251 | qApp->processEvents(); | 1255 | qApp->processEvents(); |
1252 | //qDebug("qApp->processEvents(); END "); | 1256 | //qDebug("qApp->processEvents(); END "); |
1253 | globalFlagBlockAgenda = 0; | 1257 | globalFlagBlockAgenda = 0; |
1254 | 1258 | ||
1255 | // mAgenda->hideUnused(); | 1259 | // mAgenda->hideUnused(); |
1256 | //mAllDayAgenda->hideUnused(); | 1260 | //mAllDayAgenda->hideUnused(); |
1257 | mAllDayAgenda->drawContentsToPainter(); | 1261 | mAllDayAgenda->drawContentsToPainter(); |
1258 | mAgenda->drawContentsToPainter(); | 1262 | mAgenda->drawContentsToPainter(); |
1259 | repaintAgenda(); | 1263 | repaintAgenda(); |
1264 | onlyOne = false; | ||
1260 | // mAgenda->finishUpdate(); | 1265 | // mAgenda->finishUpdate(); |
1261 | //mAllDayAgenda->finishUpdate(); | 1266 | //mAllDayAgenda->finishUpdate(); |
1262 | 1267 | ||
1263 | // repaintAgenda(); | 1268 | // repaintAgenda(); |
1264 | //qApp->processEvents(); | 1269 | //qApp->processEvents(); |
1265 | // globalFlagBlockAgenda = 0; | 1270 | // globalFlagBlockAgenda = 0; |
1266 | } | 1271 | } |
1267 | void KOAgendaView::repaintAgenda() | 1272 | void KOAgendaView::repaintAgenda() |
1268 | { | 1273 | { |
1269 | // mAllDayAgenda->drawContentsToPainter(); | 1274 | // mAllDayAgenda->drawContentsToPainter(); |
1270 | // mAllDayAgenda->viewport()->repaint( false ); | 1275 | // mAllDayAgenda->viewport()->repaint( false ); |
1271 | // mAgenda->drawContentsToPainter(); | 1276 | // mAgenda->drawContentsToPainter(); |
1272 | // mAgenda->viewport()->repaint( false ); | 1277 | // mAgenda->viewport()->repaint( false ); |
1273 | // qApp->processEvents(); | 1278 | // qApp->processEvents(); |
1274 | 1279 | ||
1275 | //qDebug("KOAgendaView::repaintAgenda() "); | 1280 | //qDebug("KOAgendaView::repaintAgenda() "); |
1276 | //qApp->processEvents(); | 1281 | //qApp->processEvents(); |
1277 | mAgenda->viewport()->repaint( false ); | 1282 | mAgenda->viewport()->repaint( false ); |
1278 | mAllDayAgenda->viewport()->repaint( false ); | 1283 | mAllDayAgenda->viewport()->repaint( false ); |
1279 | mAgenda->finishUpdate(); | 1284 | mAgenda->finishUpdate(); |
1280 | mAllDayAgenda->finishUpdate(); | 1285 | mAllDayAgenda->finishUpdate(); |
1281 | } | 1286 | } |
1282 | 1287 | ||
1283 | 1288 | ||
diff --git a/korganizer/koeventviewer.h b/korganizer/koeventviewer.h index 6ecc233..1eeb8d1 100644 --- a/korganizer/koeventviewer.h +++ b/korganizer/koeventviewer.h | |||
@@ -27,66 +27,66 @@ | |||
27 | #include <libkcal/event.h> | 27 | #include <libkcal/event.h> |
28 | #include <libkcal/journal.h> | 28 | #include <libkcal/journal.h> |
29 | 29 | ||
30 | 30 | ||
31 | using namespace KCal; | 31 | using namespace KCal; |
32 | 32 | ||
33 | #ifdef DESKTOP_VERSION | 33 | #ifdef DESKTOP_VERSION |
34 | 34 | ||
35 | #include <qradiobutton.h> | 35 | #include <qradiobutton.h> |
36 | #include <qpushbutton.h> | 36 | #include <qpushbutton.h> |
37 | #include <qlayout.h> | 37 | #include <qlayout.h> |
38 | #include <qdialog.h> | 38 | #include <qdialog.h> |
39 | #include <qlabel.h> | 39 | #include <qlabel.h> |
40 | #include <qbuttongroup.h> | 40 | #include <qbuttongroup.h> |
41 | #include <kglobal.h> | 41 | #include <kglobal.h> |
42 | 42 | ||
43 | class KOPrintPrefs : public QDialog | 43 | class KOPrintPrefs : public QDialog |
44 | { | 44 | { |
45 | public: | 45 | public: |
46 | KOPrintPrefs( QWidget *parent=0, const char *name=0 ) : | 46 | KOPrintPrefs( QWidget *parent=0, const char *name=0 ) : |
47 | QDialog( parent, name, true ) | 47 | QDialog( parent, name, true ) |
48 | { | 48 | { |
49 | setCaption( i18n("KO/Pi Printout") ); | 49 | setCaption( i18n("KO/Pi Printout") ); |
50 | QVBoxLayout* lay = new QVBoxLayout( this ); | 50 | QVBoxLayout* lay = new QVBoxLayout( this ); |
51 | lay->setSpacing( 3 ); | 51 | lay->setSpacing( 9 ); |
52 | lay->setMargin( 3 ); | 52 | 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."), this ); | 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 ); |
54 | lay->addWidget( lab ); | 54 | lay->addWidget( lab ); |
55 | lab->setAlignment( AlignCenter ); | ||
55 | QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("Printout Mode"), this ); | 56 | QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("Printout Mode"), this ); |
56 | lay->addWidget( format ); | 57 | lay->addWidget( format ); |
57 | format->setExclusive ( true ) ; | 58 | format->setExclusive ( true ) ; |
58 | pmNo = new QRadioButton(i18n("Print unscaled"), format ); | 59 | pmNo = new QRadioButton(i18n("Print unscaled"), format ); |
59 | pmScaledDown = new QRadioButton(i18n("Print scaled down to fit one page"), format ); | 60 | 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 | new QRadioButton(i18n("Print scaled up/down to fit one page"), format ); |
61 | pmScaledDown->setChecked( true ); | 62 | pmScaledDown->setChecked( true ); |
62 | QPushButton * ok = new QPushButton( i18n("OK"), this ); | 63 | QPushButton * ok = new QPushButton( i18n("OK"), this ); |
63 | lay->addWidget( ok ); | 64 | lay->addWidget( ok ); |
64 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); | 65 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); |
65 | lay->addWidget( cancel ); | 66 | lay->addWidget( cancel ); |
66 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); | 67 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); |
67 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); | 68 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); |
68 | resize( 200, 200 ); | ||
69 | } | 69 | } |
70 | 70 | ||
71 | int printMode() | 71 | int printMode() |
72 | { | 72 | { |
73 | if ( pmNo->isChecked() ) | 73 | if ( pmNo->isChecked() ) |
74 | return 0; | 74 | return 0; |
75 | if ( pmScaledDown->isChecked() ) | 75 | if ( pmScaledDown->isChecked() ) |
76 | return 1; | 76 | return 1; |
77 | return 2; | 77 | return 2; |
78 | } | 78 | } |
79 | private: | 79 | private: |
80 | QRadioButton* pmNo; | 80 | QRadioButton* pmNo; |
81 | QRadioButton* pmScaledDown; | 81 | QRadioButton* pmScaledDown; |
82 | }; | 82 | }; |
83 | 83 | ||
84 | #endif | 84 | #endif |
85 | 85 | ||
86 | class KOEventViewer : public QTextBrowser { | 86 | class KOEventViewer : public QTextBrowser { |
87 | Q_OBJECT | 87 | Q_OBJECT |
88 | public: | 88 | public: |
89 | KOEventViewer(QWidget *parent=0,const char *name=0); | 89 | KOEventViewer(QWidget *parent=0,const char *name=0); |
90 | virtual ~KOEventViewer(); | 90 | virtual ~KOEventViewer(); |
91 | 91 | ||
92 | void setSource(const QString &); | 92 | void setSource(const QString &); |