SVN commit 555353 by cgilles:
digikam from trunk : GPSWidget : size of map is 256*128 instead 300*150 to reduce at minimum lenght of right sidebar. We cannot reduce again this size because this is dependiong of histogram size now from Color tab. This is suitable and enought for 0.9.0. Later 0.9.0 release a new GPS position editor will be add and the map in sidebar will use a QScrollView CCMAIL: [hidden email] BUG: 127584 M +33 -13 worldmapwidget.cpp M +4 -5 worldmapwidget.h --- trunk/extragear/graphics/digikam/libs/widgets/metadata/worldmapwidget.cpp #555352:555353 @@ -23,6 +23,7 @@ #include <qimage.h> #include <qpainter.h> #include <qstring.h> +#include <qpixmap.h> // KDE includes. @@ -37,43 +38,62 @@ namespace Digikam { -WorldMapWidget::WorldMapWidget( QWidget *parent, const char *name ) - : QWidget( parent, name ), m_latitude( 0 ), m_longitude( 0 ) +class WorldMapWidgetPriv { + +public: + + WorldMapWidgetPriv() + { + latitude = 0; + longitude = 0; + } + + double latitude; + double longitude; + + QPixmap worldMap; +}; + +WorldMapWidget::WorldMapWidget( QWidget *parent, const char *name, int mapLenght ) + : QWidget( parent, name ) +{ + d = new WorldMapWidgetPriv; KGlobal::dirs()->addResourceType("worldmap", KGlobal::dirs()->kde_default("data") + "digikam/data"); QString directory = KGlobal::dirs()->findResourceDir("worldmap", "worldmap.png"); QImage map(directory + "worldmap.png"); - m_worldMap = QPixmap(map.scale(300, 150)); + d->worldMap = QPixmap(map.scale(mapLenght, mapLenght/2)); setBackgroundMode( Qt::NoBackground ); - setFixedSize( m_worldMap.size() ); + setFixedSize( d->worldMap.size() ); update(); } WorldMapWidget::~WorldMapWidget() { + delete d; } double WorldMapWidget::getLatitude(void) { - return m_latitude; + return d->latitude; } double WorldMapWidget::getLongitude(void) { - return m_longitude; + return d->longitude; } void WorldMapWidget::setGPSPosition(double lat, double lng) { - m_latitude = lat; - m_longitude = lng; + d->latitude = lat; + d->longitude = lng; repaint(false); } void WorldMapWidget::paintEvent( QPaintEvent* ) { - QPixmap pm( m_worldMap ); + QPixmap pm( d->worldMap ); if (isEnabled()) { @@ -81,13 +101,13 @@ p.begin( &pm, this ); double latMid = height() / 2.0; - double longMid = width() / 2.0; + double longMid = width() / 2.0; - double latOffset = ( m_latitude * latMid ) / 90.0; - double longOffset = ( m_longitude * longMid ) / 180.0; + double latOffset = ( d->latitude * latMid ) / 90.0; + double longOffset = ( d->longitude * longMid ) / 180.0; int xPos = (int)(longMid + longOffset); - int yPos = (int)(latMid - latOffset); + int yPos = (int)(latMid - latOffset); p.setPen(QPen(Qt::white, 0, Qt::SolidLine)); p.drawLine(xPos, 0, xPos, height()); --- trunk/extragear/graphics/digikam/libs/widgets/metadata/worldmapwidget.h #555352:555353 @@ -24,7 +24,6 @@ // Qt includes. #include <qwidget.h> -#include <qpixmap.h> // Local includes @@ -33,13 +32,15 @@ namespace Digikam { +class WorldMapWidgetPriv; + class DIGIKAM_EXPORT WorldMapWidget : public QWidget { Q_OBJECT public: - WorldMapWidget( QWidget *parent, const char *name = 0 ); + WorldMapWidget( QWidget *parent, const char *name = 0, int mapLenght=256 ); ~WorldMapWidget(); void setGPSPosition(double lat, double lng); @@ -53,10 +54,8 @@ private: - double m_latitude; - double m_longitude; + WorldMapWidgetPriv *d; - QPixmap m_worldMap; }; } // namespace Digikam _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Am Dienstag, 27. Juni 2006 07:53 schrieb Gilles Caulier:
> SVN commit 555353 by cgilles: [...] > reduce at minimum lenght of right sidebar. We cannot reduce again this size > because this is dependiong of histogram size now from Color tab. This is > suitable and enought for 0.9.0. Hi Gilles, is it possible to implement for 0.9.0 an easy wordwrapping for long text in a small sidebar? Bye Thorsten _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
On Tuesday 27 June 2006 10:02, Thorsten Schnebeck wrote:
> Am Dienstag, 27. Juni 2006 07:53 schrieb Gilles Caulier: > > SVN commit 555353 by cgilles: > > [...] > > > reduce at minimum lenght of right sidebar. We cannot reduce again this > > size because this is dependiong of histogram size now from Color tab. > > This is suitable and enought for 0.9.0. > > Hi Gilles, > > is it possible to implement for 0.9.0 an easy wordwrapping for long text in > a small sidebar? Sorry, but i don't understand what you mean by an "easy wordwrapping for long text"... What do want to do exactly ? Gilles _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
> Sorry, but i don't understand what you mean by an "easy wordwrapping for
> long text"... What do want to do exactly ? When I have text in a small sidebar some informations can not be shown (please look at the attached screenshot, some lines end with "..."). To get these informations I have to resize the sidebar but it would be nicer to make a line break and write the text into the next line. Better looking than a plain line break would be word wrapping so the line break happens on a word boundary. Bye Thorsten _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel wordwrap.jpg (20K) Download Attachment |
On Tuesday 27 June 2006 12:33, Thorsten Schnebeck wrote:
> > Sorry, but i don't understand what you mean by an "easy wordwrapping for > > long text"... What do want to do exactly ? > > When I have text in a small sidebar some informations can not be shown > (please look at the attached screenshot, some lines end with "..."). To get > these informations I have to resize the sidebar but it would be nicer to > make a line break and write the text into the next line. Better looking > than a plain line break would be word wrapping so the line break happens on > a word boundary. > There is nothing todo especially for that : 1 - go to Kcontrol center and enable tootips everywhere. In digiKam, when you put the mouse cursor over a cropped text, a tip will be displayed like this : http://digikam3rdparty.free.fr/Screenshots/tipsonsidebar1.png 2 - On a tag, just press SHIFT+F1 and a full description will be displayed : http://digikam3rdparty.free.fr/Screenshots/tipsonsidebar2.png Regards Gilles _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Am Dienstag 27 Juni 2006 13:27 schrieb Gilles Caulier:
> There is nothing todo especially for that : > > 1 - go to Kcontrol center and enable tootips everywhere. In digiKam, when > you put the mouse cursor over a cropped text, a tip will be displayed like > this : > http://digikam3rdparty.free.fr/Screenshots/tipsonsidebar1.png > 2 - On a tag, just press SHIFT+F1 and a full description will be displayed > http://digikam3rdparty.free.fr/Screenshots/tipsonsidebar2.png > Hmm, ok, I think I have to use it a while before I start to like it this way ;-) Bye Thorsten _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |