[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdeedu/marble/src/lib [POSSIBLY UNSAFE]
From:       Torsten Rahn <tackat () kde ! org>
Date:       2009-03-31 22:33:53
Message-ID: 1238538833.157994.3940.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 947627 by rahn:


- Another patch by Harshit Jain: No population on Moon and Mars. Use diameter instead \
...



 M  +21 -4     PlacemarkInfoDialog.cpp   [POSSIBLY UNSAFE: system]
 M  +42 -53    PlacemarkInfoDialog.ui  


--- trunk/KDE/kdeedu/marble/src/lib/PlacemarkInfoDialog.cpp #947626:947627
@@ -50,7 +50,6 @@
         QTextFrameFormat format = \
description_val_browser->document()->rootFrame()->frameFormat();  format.setMargin( \
                12) ;
         description_val_browser->document()->rootFrame()->setFrameFormat( format );
-
 }
 
 
@@ -63,7 +62,6 @@
 
     name_val_lbl->setText( "<H1><b>" + m_index.data().toString() + "</b></H1>" );
     altername_val_lbl->setText( "" );
-
     QString  rolestring;
     switch ( m_index.data( MarblePlacemarkModel::GeoTypeRole ).toChar().toLatin1() ) \
{  case 'C':
@@ -108,6 +106,18 @@
     case 'A':
         rolestring = tr("Astronomical observatory");
         break;
+    case 'a':
+        rolestring = tr("Maria");
+        break;
+    case 'c':
+        rolestring = tr("Crater");
+        break;
+    case 'h':
+    case 'r':
+    case 'u':
+    case 'i':
+        rolestring = tr("Landing Site");
+        break;
     default:
         rolestring = tr("Other Place");
     }
@@ -117,6 +127,7 @@
     m_flagcreator = new DeferredFlag( this );
     requestFlag( m_index.data( MarblePlacemarkModel::CountryCodeRole ).toString() );
 
+
     const QString description = m_index.data( MarblePlacemarkModel::DescriptionRole \
).toString();  
     description_val_browser->setEnabled( false );
@@ -132,7 +143,6 @@
     const qreal area = m_index.data( MarblePlacemarkModel::AreaRole ).toDouble();
     const qreal altitude = m_index.data( MarblePlacemarkModel::CoordinateRole \
).value<GeoDataCoordinates>().altitude();  
-
     area_lbl->setText( tr("Area:") );
     if ( area < 10000000 )
         area_val_lbl->setText( tr("%1 sq km").arg( QLocale::system().toString( area \
) ) ); @@ -147,6 +157,7 @@
             .arg( QLocale::system().toString( population / 1000000.0, 'g', 4 ) ) );
 
     elevation_val_lbl->setText( tr("%1 m").arg( QLocale::system().toString( altitude \
) ) ); +    diameter_val_lbl->setText( tr("%1 km").arg( QLocale::system().toString( \
population / 1000.0, 'g', 4 ) ) );  
     const QChar role = m_index.data( MarblePlacemarkModel::GeoTypeRole ).toChar();
 
@@ -158,11 +169,13 @@
     area_val_lbl->setVisible( true );
     population_lbl->setVisible( true );
     population_val_lbl->setVisible( true );
+    diameter_lbl->setVisible( false );
+    diameter_val_lbl->setVisible( false );
 
     if ( altitude <= 0 )
         elevation_val_lbl->setText( tr("-") );
 
-    if ( role == 'O' ) {
+    if ( role == 'O' ||  role == 'o' || role == 'v' || role == 'h' || role == 'u' || \
role == 'i' || role == 'r' || role == 'a' || role == 'c' || role == 'm') {  \
population_val_lbl->setVisible( false );  population_lbl->setVisible( false );
         country_lbl->setVisible( false );
@@ -173,6 +186,10 @@
         country_lbl->setVisible( false );
         country_val_lbl->setVisible( false );
     }
+    if ( (role == 'a' || role == 'c' || role == 'm') && m_index.data( \
MarblePlacemarkModel::PopularityRole ).toInt() > 0) { +        \
diameter_lbl->setVisible( true ); +        diameter_val_lbl->setVisible( true );
+    }
 
     if ( role == 'H' || role == 'V' || role == 'W') {
         population_val_lbl->setVisible( false );
--- trunk/KDE/kdeedu/marble/src/lib/PlacemarkInfoDialog.ui #947626:947627
@@ -16,18 +16,9 @@
    <property name="spacing" >
     <number>6</number>
    </property>
-   <property name="leftMargin" >
+   <property name="margin" >
     <number>9</number>
    </property>
-   <property name="topMargin" >
-    <number>9</number>
-   </property>
-   <property name="rightMargin" >
-    <number>9</number>
-   </property>
-   <property name="bottomMargin" >
-    <number>9</number>
-   </property>
    <item>
     <widget class="QTabWidget" name="m_pTabWidget" >
      <property name="currentIndex" >
@@ -40,24 +31,12 @@
       <layout class="QVBoxLayout" >
        <item>
         <layout class="QGridLayout" >
-         <property name="leftMargin" >
+         <property name="margin" >
           <number>0</number>
          </property>
-         <property name="topMargin" >
-          <number>0</number>
-         </property>
-         <property name="rightMargin" >
-          <number>0</number>
-         </property>
-         <property name="bottomMargin" >
-          <number>0</number>
-         </property>
-         <property name="horizontalSpacing" >
+         <property name="spacing" >
           <number>6</number>
          </property>
-         <property name="verticalSpacing" >
-          <number>6</number>
-         </property>
          <item row="0" column="0" >
           <widget class="QLabel" name="name_val_lbl" >
            <property name="toolTip" >
@@ -82,7 +61,7 @@
            <property name="orientation" >
             <enum>Qt::Vertical</enum>
            </property>
-           <property name="sizeHint" >
+           <property name="sizeHint" stdset="0" >
             <size>
              <width>20</width>
              <height>16</height>
@@ -168,7 +147,8 @@
           <string>Description field</string>
          </property>
          <property name="html" >
-          <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" \
/>&lt;style type="text/css"> +          <string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD \
HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> \
+&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css"> \
p, li { white-space: pre-wrap; }  &lt;/style>&lt;/head>&lt;body style=" \
font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;">  \
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; font-size:9pt;">No description available.&lt;/p> \
@@ -185,7 +165,7 @@  <property name="sizeType" >
           <enum>QSizePolicy::Fixed</enum>
          </property>
-         <property name="sizeHint" >
+         <property name="sizeHint" stdset="0" >
           <size>
            <width>330</width>
            <height>16</height>
@@ -240,7 +220,7 @@
             <property name="orientation" >
              <enum>Qt::Horizontal</enum>
             </property>
-            <property name="sizeHint" >
+            <property name="sizeHint" stdset="0" >
              <size>
               <width>40</width>
               <height>20</height>
@@ -352,6 +332,29 @@
             </property>
            </widget>
           </item>
+          <item row="5" column="0" >
+           <widget class="QLabel" name="diameter_lbl" >
+            <property name="text" >
+             <string>Diameter:</string>
+            </property>
+            <property name="alignment" >
+             <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+            </property>
+            <property name="textInteractionFlags" >
+             <set>Qt::TextSelectableByMouse</set>
+            </property>
+           </widget>
+          </item>
+          <item row="5" column="1" >
+           <widget class="QLabel" name="diameter_val_lbl" >
+            <property name="text" >
+             <string>TextLabel</string>
+            </property>
+            <property name="alignment" >
+             <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+            </property>
+           </widget>
+          </item>
          </layout>
         </widget>
        </item>
@@ -362,41 +365,24 @@
        <string>Wikipedia</string>
       </attribute>
       <attribute name="icon" >
-       <iconset resource="../marble.qrc" >:/icons/wikipedia.png</iconset>
+       <iconset resource="../marble.qrc" >
+        <normaloff>:/icons/wikipedia.png</normaloff>:/icons/wikipedia.png</iconset>
       </attribute>
       <layout class="QVBoxLayout" >
        <property name="spacing" >
         <number>6</number>
        </property>
-       <property name="leftMargin" >
+       <property name="margin" >
         <number>9</number>
        </property>
-       <property name="topMargin" >
-        <number>9</number>
-       </property>
-       <property name="rightMargin" >
-        <number>9</number>
-       </property>
-       <property name="bottomMargin" >
-        <number>9</number>
-       </property>
        <item>
         <layout class="QHBoxLayout" >
          <property name="spacing" >
           <number>6</number>
          </property>
-         <property name="leftMargin" >
+         <property name="margin" >
           <number>0</number>
          </property>
-         <property name="topMargin" >
-          <number>0</number>
-         </property>
-         <property name="rightMargin" >
-          <number>0</number>
-         </property>
-         <property name="bottomMargin" >
-          <number>0</number>
-         </property>
          <item>
           <widget class="QToolButton" name="m_pBackButton" >
            <property name="enabled" >
@@ -412,7 +398,8 @@
             <string>Back</string>
            </property>
            <property name="icon" >
-            <iconset>../../../../../../../../.designer/backup</iconset>
+            <iconset>
+             <normaloff>../../../../../../../../.designer/backup</normaloff>../../../../../../../../.designer/backup</iconset>
  </property>
            <property name="toolButtonStyle" >
             <enum>Qt::ToolButtonTextBesideIcon</enum>
@@ -434,7 +421,8 @@
             <string>...</string>
            </property>
            <property name="icon" >
-            <iconset>../../../../../../../../.designer/backup</iconset>
+            <iconset>
+             <normaloff>../../../../../../../../.designer/backup</normaloff>../../../../../../../../.designer/backup</iconset>
  </property>
           </widget>
          </item>
@@ -444,7 +432,8 @@
             <string>Print Page</string>
            </property>
            <property name="icon" >
-            <iconset resource="../marble.qrc" >:/icons/document-print.png</iconset>
+            <iconset resource="../marble.qrc" >
+             <normaloff>:/icons/document-print.png</normaloff>:/icons/document-print.png</iconset>
  </property>
            <property name="toolButtonStyle" >
             <enum>Qt::ToolButtonTextBesideIcon</enum>
@@ -456,7 +445,7 @@
            <property name="orientation" >
             <enum>Qt::Horizontal</enum>
            </property>
-           <property name="sizeHint" >
+           <property name="sizeHint" stdset="0" >
             <size>
              <width>281</width>
              <height>31</height>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic