author | zautrix <zautrix> | 2005-06-04 12:58:17 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-04 12:58:17 (UTC) |
commit | 790b8c38e1305b2f5ee4485e59a3ecd01e5b6f75 (patch) (side-by-side diff) | |
tree | 7779130ff5f142e1eaf2989e8540cbedc9ea0cb1 | |
parent | a7939017000e165e711e3f0cffeab46852a9fb2e (diff) | |
download | kdepimpi-790b8c38e1305b2f5ee4485e59a3ecd01e5b6f75.zip kdepimpi-790b8c38e1305b2f5ee4485e59a3ecd01e5b6f75.tar.gz kdepimpi-790b8c38e1305b2f5ee4485e59a3ecd01e5b6f75.tar.bz2 |
pic fix
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 1 | ||||
-rw-r--r-- | kaddressbook/imagewidget.cpp | 21 | ||||
-rw-r--r-- | kaddressbook/imagewidget.h | 2 |
3 files changed, 5 insertions, 19 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 93edc59..6e3b886 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt @@ -1,61 +1,62 @@ Info about the changes in new versions of KDE-Pim/Pi ********** VERSION 2.1.5 ************ This is the new stable version. Bugfix: Fixed a problem with agenda popup on the desktop in KO/Pi. Fixed a crash when reloading file, e.g. after a passive pi-sync synchronization. Added config option to not display completed todos in agenda view. Addressee view is now using the formatted name, if defined. That makes it possible to display "lastname, firstname" in that view now. To set the formatted name for all contacts, please use menu: Edit->Change->Set formatted name. +Fixed the bug in KA/Pi that is was not possible to add images to a contact on Windows. ********** VERSION 2.1.4 ************ Fixed two more bugs in the KA/Pi CSV import dialog: Made it possible to read multi-line fields and import it to the "Note" field. Fixed a problem in mapping custom fields, whatever a custem field is... ********** VERSION 2.1.3 ************ Changed the menu structure of the alarm applet: Moved "Simulate" to " Play Beeps" submenu and re-added "Todo List". Fixed several problems in the KA/Pi CSV import dialog: Added "Category", made codec configureable and made it possible to map many fields to the "Note" field. ********** VERSION 2.1.2 ************ Fixed a problem closing the alarm dialog on Zaurus with "OK" button. Fixed a problem when importing data from Outlook with mutiple categories set. Changed display of days in datenavigator: Birthdays are now blue, not dark green. When todo view is shown, no birtdays are shown and days with due todos are shown blue. When journal view is shown, only holidays are shown and days with journals are blue. Added Backup options to global config: You can create now x-daily backups for KO/Pi, KA/Pi (for file resources only, file resource is the standard type) and PwM/Pi ( all files you will open ). It is recommended to use another HDD/Memory card for the backup directory. If (very useful on the Zaurus) the specified backup directory does not exist you are asked if you want to try again to create a backup. That makes it possible to insert your memory card in the Zaurus and then trying again. The backup is created when the application wants to save for the first time on a backup-day. You can specify the amount of backups and the day interval of backups. ********** VERSION 2.1.1 ************ Stable release 2.1.1! KO/Pi: Fixed one problem in the layout of the edit dialogs on the Zaurus with 640x480 display. ********** VERSION 2.1.0 ************ Stable release 2.1.0! Summary of changes/fixes compared to version 2.0.6: Many bugs of version 2.0.6 fixed. Most of them were small bugs, but some of them were important. It is recommended to use version 2.1.0 and not version 2.0.6. diff --git a/kaddressbook/imagewidget.cpp b/kaddressbook/imagewidget.cpp index d0f52ea..eec5e08 100644 --- a/kaddressbook/imagewidget.cpp +++ b/kaddressbook/imagewidget.cpp @@ -236,77 +236,62 @@ KABC::Picture ImageWidget::logo() const if ( px ) { #ifndef KAB_EMBEDDED if ( px->height() > px->width() ) logo.setData( px->convertToImage().scaleHeight( 140 ) ); else logo.setData( px->convertToImage().scaleWidth( 100 ) ); #else //KAB_EMBEDDED if (px->isNull() != true ) logo.setData( px->convertToImage() ); #endif //KAB_EMBEDDED logo.setType( "PNG" ); } } return logo; } void ImageWidget::removePhoto() { setPhoto(KABC::Picture() ); } void ImageWidget::removeLogo() { setLogo(KABC::Picture() ); } void ImageWidget::loadPhoto() { mPhotoLabel->setPixmap( loadPixmap( mPhotoUrl->url() ) ); } void ImageWidget::loadLogo() { mLogoLabel->setPixmap( loadPixmap( mLogoUrl->url() ) ); } void ImageWidget::updateGUI() { KURLRequester *ptr = (KURLRequester*)sender(); if ( ptr == mPhotoUrl ) mUsePhotoUrl->setEnabled( true ); else if ( ptr == mLogoUrl ) mUseLogoUrl->setEnabled( true ); } -QPixmap ImageWidget::loadPixmap( const KURL &url ) +QPixmap ImageWidget::loadPixmap( const QString &url ) { - QString tempFile; + QPixmap pixmap; if ( url.isEmpty() ) return pixmap; - - if ( url.isLocalFile() ) - pixmap = QPixmap( url.path() ); - else - { -#ifndef KAB_EMBEDDED - if ( KIO::NetAccess::download( url, tempFile ) ) { - pixmap = QPixmap( tempFile ); - KIO::NetAccess::removeTempFile( tempFile ); - } -#else //KAB_EMBEDDED - qDebug("ImageWidget::loadPixmap : only local pixmaps are allowed"); -#endif //KAB_EMBEDDED - - } - + pixmap.load( url ); return pixmap; } #ifndef KAB_EMBEDDED #include "imagewidget.moc" #endif //KAB_EMBEDDED diff --git a/kaddressbook/imagewidget.h b/kaddressbook/imagewidget.h index afb9aa7..bbfba58 100644 --- a/kaddressbook/imagewidget.h +++ b/kaddressbook/imagewidget.h @@ -29,60 +29,60 @@ #include <kabc/picture.h> #include <kdialogbase.h> class KURL; class KURLRequester; class QCheckBox; class QLabel; class ImageWidget : public QWidget { Q_OBJECT public: ImageWidget( QWidget *parent, const char *name = 0 ); ~ImageWidget(); /** Sets the photo object. */ void setPhoto( const KABC::Picture &photo ); /** Returns a photo object. */ KABC::Picture photo() const; /** Sets the logo object. */ void setLogo( const KABC::Picture &photo ); /** Returns a logo object. */ KABC::Picture logo() const; signals: void changed(); private slots: void loadPhoto(); void loadLogo(); void removePhoto(); void removeLogo(); void updateGUI(); private: - QPixmap loadPixmap( const KURL &url ); + QPixmap loadPixmap( const QString &url ); KURLRequester *mPhotoUrl; KURLRequester *mLogoUrl; QCheckBox *mUsePhotoUrl; QCheckBox *mUseLogoUrl; QLabel *mPhotoLabel; QLabel *mLogoLabel; }; #endif |