[Kde-imaging] kdeextragear-libs-1/kipi-plugins/calendar

Renchi Raju renchi at pooh.tam.uiuc.edu
Tue Oct 5 04:17:25 CEST 2004


CVS commit by pahlibar: 


if you are modifying working code, make sure to test it before you make the
commits. 
fixed broken calendar plugin
CCMAIL: kde-imaging at kde.org


  M +15 -18    calwizard.cpp   1.14
  M +3 -1      calwizard.h   1.7


--- kdeextragear-libs-1/kipi-plugins/calendar/calwizard.cpp  #1.13:1.14
@@ -32,4 +32,5 @@
 #include <qframe.h>
 #include <qpixmap.h>
+#include <qvbox.h>
 
 // KDE includes.
@@ -85,10 +86,7 @@ CalWizard::CalWizard( KIPI::Interface* i
     // ---------------------------------------------------------------
 
-    QWidget *printWidget = new QWidget(this, "printWidget");
-    
-    QVBoxLayout *wprintLayout =
-        new QVBoxLayout(printWidget, 6, 11);
+    wPrint_ = new QVBox(this, "wPrint");
 
-    QFrame *headerFrame = new QFrame( printWidget );
+    QFrame *headerFrame = new QFrame( wPrint_ );
     headerFrame->setFrameStyle(QFrame::Panel|QFrame::Sunken);
     QHBoxLayout* layout = new QHBoxLayout( headerFrame );
@@ -101,17 +99,16 @@ CalWizard::CalWizard( KIPI::Interface* i
     layout->addWidget( labelTitle );
     layout->setStretchFactor( labelTitle, 1 );
-    wprintLayout->addWidget( headerFrame );
     pixmapLabelLeft->setPaletteBackgroundColor( QColor(201, 208, 255) );
     pixmapLabelLeft->setPixmap( QPixmap( directory + "banner_left.png" ) );
     labelTitle->setPaletteBackgroundColor( QColor(201, 208, 255) );
     
-    wPrint_ = new QLabel(printWidget, "wPrint");
-    wPrint_->setIndent(20);
-    wprintLayout->addWidget(wPrint_);
+    wPrintLabel_ = new QLabel(wPrint_, "wPrint");
+    wPrintLabel_->setIndent(20);
     
-    wprintLayout->addStretch();
+    wPrint_->setStretchFactor(headerFrame, 0);
+    wPrint_->setStretchFactor(wPrintLabel_, 2);
     
-    addPage(printWidget, i18n("Print"));
-    setHelpEnabled(printWidget, true);
+    addPage(wPrint_, i18n("Print"));
+    setHelpEnabled(wPrint_, true);
 
     // ---------------------------------------------------------------
@@ -230,5 +227,5 @@ void CalWizard::slotPageSelected(const Q
         if (!monthNumbers_.empty()) {
             QString year = QString::number(cSettings_->getYear());
-            wPrint_->setText(i18n("Click Next to start Printing\n\n"
+            wPrintLabel_->setText(i18n("Click Next to start Printing\n\n"
                                   "Following months will be printed for year %1:").arg(year)
                              + QString("\n")
@@ -237,5 +234,5 @@ void CalWizard::slotPageSelected(const Q
         }
         else {
-            wPrint_->setText(i18n("No valid images selected for months\n"
+            wPrintLabel_->setText(i18n("No valid images selected for months\n"
                                   "Click Back to select images"));
             setNextEnabled(wPrint_, false);

--- kdeextragear-libs-1/kipi-plugins/calendar/calwizard.h  #1.6:1.7
@@ -37,4 +37,5 @@
 
 class QLabel;
+class QVBox;
 class QPainter;
 class QProgressBar;
@@ -65,5 +66,6 @@ private:
     CalTemplate  *wTemplate_;
     CalSelect    *wSelect_;
-    QLabel       *wPrint_;
+    QVBox        *wPrint_;
+    QLabel       *wPrintLabel_;
     QWidget      *wFinish_;
     QLabel       *wFinishLabel_;




More information about the Kde-imaging mailing list