[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/base/marble
From: Inge Wallin <inge () lysator ! liu ! se>
Date: 2007-04-29 16:59:34
Message-ID: 1177865974.860172.19185.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 659189 by ingwa:
Cleaned class KAtlasCrossHair
M +1 -0 ChangeLog
M +9 -5 src/CLEANING
M +20 -11 src/katlascrosshair.cpp
M +15 -11 src/katlascrosshair.h
--- trunk/playground/base/marble/ChangeLog #659188:659189
@@ -1,4 +1,5 @@
29.04.07 - ingwa
+ Cleaned katlascrosshair.{h,cpp}
Cleaned placemarkinfodialog.{h,cpp}
Cleaned maptheme.{h,cpp}
--- trunk/playground/base/marble/src/CLEANING #659188:659189
@@ -37,16 +37,20 @@
katlasglobe.h katlasglobe.cpp
katlasview.h katlasview.cpp
-Widgets:
---------
-katlascontrol.h katlascontrol.cpp
-
Dialogs:
--------
katlastilecreatordialog.h katlastilecreatordialog.cpp
placemarkinfodialog.h placemarkinfodialog.cpp
+Widgets:
+--------
+katlascontrol.h katlascontrol.cpp
+Items on the widget (QObjects):
+-------------------------------
+katlascrosshair.h katlascrosshair.cpp
+
+
DOING
=====
@@ -70,9 +74,9 @@
searchcombobox.h searchcombobox.cpp
searchlistview.h searchlistview.cpp
tinywebbrowser.h tinywebbrowser.cpp
+KdeMainWindow.h KdeMainWindow.cpp
Items on the widget (QObjects):
-katlascrosshair.h katlascrosshair.cpp
katlaswindrose.h katlaswindrose.cpp
katlasmapscale.h katlasmapscale.cpp
--- trunk/playground/base/marble/src/katlascrosshair.cpp #659188:659189
@@ -1,23 +1,32 @@
#include "katlascrosshair.h"
+
#include <QtCore/QDebug>
-KAtlasCrossHair::KAtlasCrossHair(QObject* parent) : QObject(parent) {
- m_enabled = false;
+
+KAtlasCrossHair::KAtlasCrossHair(QObject* parent)
+ : QObject(parent)
+{
+ m_enabled = false;
}
-void KAtlasCrossHair::paintCrossHair( QPainter* painter, int width, int height){
- if ( m_enabled == true ){
- int centerx = width / 2;
- int centery = height / 2;
- int halfsize = 5;
+void KAtlasCrossHair::paintCrossHair( QPainter* painter, int width, int height)
+{
- painter->setPen(QColor(Qt::white));
- painter->drawLine( centerx - halfsize, centery, centerx + halfsize , centery );
- painter->drawLine( centerx, centery - halfsize, centerx, centery + halfsize );
- }
+ if ( m_enabled ) {
+ int centerx = width / 2;
+ int centery = height / 2;
+ int halfsize = 5;
+
+ painter->setPen( QColor( Qt::white ) );
+ painter->drawLine( centerx - halfsize, centery,
+ centerx + halfsize, centery );
+ painter->drawLine( centerx, centery - halfsize,
+ centerx, centery + halfsize );
+ }
}
+
#ifndef Q_OS_MACX
#include "katlascrosshair.moc"
#endif
--- trunk/playground/base/marble/src/katlascrosshair.h #659188:659189
@@ -3,36 +3,40 @@
//
// Description: KAtlasCrossHair
-// KAtlasWindRose paints a crosshair
+// KAtlasCrossHair paints a crosshair
//
// Author: Torsten Rahn <tackat@kde.org>, (C) 2006
//
// Copyright: See COPYING file that comes with this distribution
+
#ifndef KATLASCROSSHAIR_H
#define KATLASCROSSHAIR_H
+
#include <QtCore/QObject>
#include <QtGui/QPainter>
+
/**
@author Torsten Rahn
*/
-class KAtlasCrossHair : public QObject {
+class KAtlasCrossHair : public QObject
+{
+ Q_OBJECT
-Q_OBJECT
+ public:
+ KAtlasCrossHair(QObject *parent = 0);
-public:
- KAtlasCrossHair(QObject *parent = 0);
+ void paintCrossHair( QPainter*, int, int );
- void paintCrossHair( QPainter*, int, int );
+ const bool enabled() const { return m_enabled; }
+ void setEnabled( bool enabled ) { m_enabled = enabled; }
- const bool isEnabled() const { return m_enabled; }
- void setEnabled( bool enabled ){ m_enabled = enabled; }
-
-protected:
- bool m_enabled;
+ protected:
+ bool m_enabled;
};
+
#endif // KATLASCROSSHAIR_H
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic