summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-02-08 14:48:55 (UTC)
committer zautrix <zautrix>2005-02-08 14:48:55 (UTC)
commit584ed7893497b2adad5ba6c3e914d90b76973b92 (patch) (unidiff)
treea25b2c10338c32dc0a6bbf11e6bebeb059ec7bd0
parent41111b332c2a5f1b2ec152df309b9199f5e9c921 (diff)
downloadkdepimpi-584ed7893497b2adad5ba6c3e914d90b76973b92.zip
kdepimpi-584ed7893497b2adad5ba6c3e914d90b76973b92.tar.gz
kdepimpi-584ed7893497b2adad5ba6c3e914d90b76973b92.tar.bz2
fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 61c39f5..856f7db 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -2013,54 +2013,54 @@ void MainWindow::getFile( bool success )
2013 setCaption( i18n("Pi-Sync successful!") ); 2013 setCaption( i18n("Pi-Sync successful!") );
2014} 2014}
2015 2015
2016void MainWindow::printSel( ) 2016void MainWindow::printSel( )
2017{ 2017{
2018 mView->viewManager()->agendaView()->agenda()->printSelection(); 2018 mView->viewManager()->agendaView()->agenda()->printSelection();
2019} 2019}
2020 2020
2021void MainWindow::printCal() 2021void MainWindow::printCal()
2022{ 2022{
2023 mView->print();//mCp->showDialog(); 2023 mView->print();//mCp->showDialog();
2024} 2024}
2025 2025
2026 2026
2027#include "libkdepim/kdatepicker.h" 2027#include "libkdepim/kdatepicker.h"
2028#include <kdatetbl.h> 2028#include <kdatetbl.h>
2029void MainWindow::weekAction() 2029void MainWindow::weekAction()
2030{ 2030{
2031 int month; 2031 int month;
2032 KPopupFrame* popup = new KPopupFrame(this); 2032 KPopupFrame* popup = new KPopupFrame(this);
2033 KDateInternalWeekPicker* picker = new KDateInternalWeekPicker(10, popup); 2033 KDateInternalWeekPicker* picker = new KDateInternalWeekPicker(10, popup);
2034 // ----- 2034 // -----
2035 picker->resize(picker->sizeHint()); 2035 picker->resize(picker->sizeHint());
2036 popup->setMainWidget(picker); 2036 popup->setMainWidget(picker);
2037 picker->setFocus(); 2037 picker->setFocus();
2038 connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int))); 2038 connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int)));
2039 int x = 0; 2039 int x = 0;
2040 int y = iconToolBar->height(); 2040 int y = iconToolBar->height();
2041 int dX = 0; 2041 int dX = 0;
2042 int dY = 0; 2042 int dY = 0;
2043 if ( iconToolBar->orientation () == Qt:: Horizontal ) { 2043 if ( iconToolBar->orientation () == Qt:: Horizontal ) {
2044 if ( iconToolBar->y() > height()/2 ) { 2044 if ( iconToolBar->y() > height()/2 ) {
2045 dY = iconToolBar->height()+picker->sizeHint().height(); 2045 dY = picker->sizeHint().height()+8;
2046 y = 0; 2046 y = 0;
2047 } 2047 }
2048 } else { 2048 } else {
2049 if ( iconToolBar->x() > width()/2 ) { // right side 2049 if ( iconToolBar->x() > width()/2 ) { // right side
2050 x=0; 2050 x=0;
2051 dX= iconToolBar->width()+picker->sizeHint().width(); 2051 dX= picker->sizeHint().width()+8;
2052 y = 0; 2052 y = 0;
2053 } else { 2053 } else {
2054 x= iconToolBar->width(); 2054 x= iconToolBar->width();
2055 y = 0; 2055 y = 0;
2056 } 2056 }
2057 } 2057 }
2058 qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() ); 2058 //qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() );
2059 if(popup->exec(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY)))) 2059 if(popup->exec(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY))))
2060 { 2060 {
2061 month = picker->getResult(); 2061 month = picker->getResult();
2062 emit selectWeek ( month ); 2062 emit selectWeek ( month );
2063 //qDebug("weekSelected %d ", month); 2063 //qDebug("weekSelected %d ", month);
2064 } 2064 }
2065 delete popup; 2065 delete popup;
2066} 2066}