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

List:       kde-commits
Subject:    koffice/kspread
From:       Ariya Hidayat <ariya () kde ! org>
Date:       2004-01-26 16:06:29
Message-ID: 20040126160629.F3C0A8FED () office ! kde ! org
[Download RAW message or body]

CVS commit by ariya: 

action to show/hide the formula bar


  M +2 -1      kspread.rc   1.117
  M +15 -1     kspread_view.cc   1.756
  M +5 -0      kspread_view.h   1.243


--- koffice/kspread/kspread.rc  #1.116:1.117
@@ -1,3 +1,3 @@
-<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd" ><kpartgui name="KSpread" version="21">
+<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd" ><kpartgui name="KSpread" version="22">
 <MenuBar>
  <Menu name="file"><text>&amp;File</text>
@@ -151,4 +151,5 @@
   <Action name="showStatusBar" />
   <Action name="showTabBar" />
+  <Action name="showFormulaBar"/>
   <Separator group="settings_show"/>
   <Action name="preference" group="settings_configure"/>

--- koffice/kspread/kspread_view.cc  #1.755:1.756
@@ -554,4 +554,5 @@ public:
     KToggleAction* showStatusBar;
     KToggleAction* showTabBar;
+    KToggleAction* showFormulaBar;
     KToggleAction* showCommentIndicator;
     KAction* preference;
@@ -1170,4 +1171,10 @@ void ViewPrivate::initActions()
   actions->showTabBar->setToolTip(i18n("Show the tab bar."));
 
+  actions->showFormulaBar = new KToggleAction( i18n("Show Formula Bar"), 
+      0, ac, "showFormulaBar" );
+  QObject::connect( actions->showFormulaBar, SIGNAL( toggled( bool ) ),
+      view, SLOT( showFormulaBar( bool ) ) );
+  actions->showFormulaBar->setToolTip(i18n("Show the formula bar."));
+
   actions->showCommentIndicator = new KToggleAction( i18n("Show Comment Indicator"), 
       0, ac, "showCommentIndicator" );
@@ -1347,4 +1354,5 @@ void ViewPrivate::adjustActions( bool mo
   actions->showStatusBar->setChecked( doc->showStatusBar() );  
   actions->showTabBar->setChecked( doc->showTabBar() );  
+  actions->showFormulaBar->setChecked( doc->showFormulaBar() );  
   actions->showCommentIndicator->setChecked( doc->showCommentIndicator() );  
   
@@ -4636,4 +4644,10 @@ void KSpreadView::showTabBar( bool b )
 }
 
+void KSpreadView::showFormulaBar( bool b )
+{
+  d->doc->setShowFormulaBar( b );
+  refreshView();
+}
+
 void KSpreadView::showCommentIndicator( bool b )
 {
@@ -4863,5 +4877,5 @@ void KSpreadView::refreshView()
     d->actions->alignRight->setEnabled( !active );
   }
-  active = d->doc->getShowFormulaBar();
+  active = d->doc->showFormulaBar();
   editWidget()->showEditWidget( active );
 

--- koffice/kspread/kspread_view.h  #1.242:1.243
@@ -459,4 +459,9 @@ public slots:
     
     /**
+     * Shows the formula bar if b is true, otherwise the formula bar will be hidden.
+     */
+    void showFormulaBar( bool b );
+    
+    /**
      * If b is true, a red triangle is displayed on the corner of cells
      * which have comments.


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

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