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

List:       kde-commits
Subject:    koffice/plugins/chartshape
From:       Johannes Simon <johannes.simon () gmail ! com>
Date:       2010-10-16 17:15:02
Message-ID: 20101016171502.EE83FAC89A () svn ! kde ! org
[Download RAW message or body]

SVN commit 1186493 by jsimon:

Remove choices "use first row/col as label" from chart table editor. Unchecking this \
makes no sense as there would be no way anymore to modify labels. If they're *really* \
not needed, the first row and column can simply be left as is and ignored by the \
user. This as a nice side-effect makes the chart table editor a bit less wide.

 M  +0 -17     ChartTool.cpp  
 M  +0 -2      ChartTool.h  
 M  +3 -26     dialogs/ChartTableEditor.ui  
 M  +1 -15     dialogs/TableEditorDialog.cpp  


--- trunk/koffice/plugins/chartshape/ChartTool.cpp #1186492:1186493
@@ -522,24 +522,7 @@
     d->shape->relayout();
 }
 
-void ChartTool::setFirstRowIsLabel( bool b )
-{
-    Q_ASSERT( d->shape );
-    if ( d->shape != 0 )
-        d->shape->proxyModel()->setFirstRowIsLabel( b );
-    d->shape->relayout();
-}
 
-void ChartTool::setFirstColumnIsLabel( bool b )
-{
-    Q_ASSERT( d->shape );
-    if ( d->shape != 0 )
-        d->shape->proxyModel()->setFirstColumnIsLabel( b );
-
-    d->shape->relayout();
-}
-
-
 void ChartTool::setLegendTitle( const QString &title )
 {
     Q_ASSERT( d->shape );
--- trunk/koffice/plugins/chartshape/ChartTool.h #1186492:1186493
@@ -68,8 +68,6 @@
     void setChartSubType( ChartSubtype subtype );
     void setThreeDMode( bool threeD );
     void setDataDirection( Qt::Orientation );
-    void setFirstRowIsLabel( bool b );
-    void setFirstColumnIsLabel( bool b );
     void setShowTitle( bool show );
     void setShowSubTitle( bool show );
     void setShowFooter( bool show );
--- trunk/koffice/plugins/chartshape/dialogs/ChartTableEditor.ui #1186492:1186493
@@ -6,7 +6,7 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>531</width>
+    <width>506</width>
     <height>368</height>
    </rect>
   </property>
@@ -14,33 +14,10 @@
    <string>Dialog</string>
   </property>
   <layout class="QGridLayout">
-   <item row="1" column="1">
-    <widget class="QGroupBox" name="groupBox">
-     <property name="title">
-      <string>Data Area</string>
-     </property>
-     <layout class="QGridLayout" name="gridLayout">
-      <item row="0" column="1">
-       <widget class="QCheckBox" name="firstRowIsLabel">
-        <property name="text">
-         <string>Use first row for labels</string>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="1">
-       <widget class="QCheckBox" name="firstColumnIsLabel">
-        <property name="text">
-         <string>Use first column for labels</string>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </widget>
-   </item>
-   <item row="0" column="0" colspan="3">
+   <item row="0" column="0" colspan="2">
     <layout class="QVBoxLayout" name="tableViewContainer"/>
    </item>
-   <item row="1" column="2">
+   <item row="1" column="1">
     <widget class="QGroupBox" name="groupBox_2">
      <property name="title">
       <string>Data Format</string>
--- trunk/koffice/plugins/chartshape/dialogs/TableEditorDialog.cpp #1186492:1186493
@@ -120,14 +120,7 @@
         return;
 
     // Disconnect the old proxy model.
-    if ( m_proxyModel ) {
-        disconnect( m_proxyModel,    SIGNAL( modelReset() ),
-                    this,            SLOT( updateDialog() ) );
-        disconnect( firstRowIsLabel, SIGNAL( clicked( bool ) ),
-                    m_proxyModel,    SLOT( setFirstRowIsLabel( bool ) ) );
-        disconnect( firstColumnIsLabel, SIGNAL( clicked( bool ) ),
-                    m_proxyModel,       SLOT( setFirstColumnIsLabel( bool ) ) );
-    }
+    m_proxyModel->disconnect( this );
 
     m_proxyModel = proxyModel;
 
@@ -135,10 +128,6 @@
     if ( m_proxyModel ) {
         connect( m_proxyModel,       SIGNAL( modelReset() ),
                  this,               SLOT( updateDialog() ) );
-        connect( firstRowIsLabel,    SIGNAL( clicked( bool ) ),
-                 m_proxyModel,       SLOT( setFirstRowIsLabel( bool ) ) );
-        connect( firstColumnIsLabel, SIGNAL( clicked( bool ) ),
-                 m_proxyModel,       SLOT( setFirstColumnIsLabel( bool ) ) );
     }
 
     updateDialog();
@@ -154,9 +143,6 @@
     if ( !m_proxyModel )
         return;
 
-    firstRowIsLabel->setChecked( m_proxyModel->firstRowIsLabel() );
-    firstColumnIsLabel->setChecked( m_proxyModel->firstColumnIsLabel() );
-
     switch ( m_proxyModel->dataDirection() ) {
     case Qt::Horizontal:
         dataSetsInRows->setChecked( true );


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

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