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

List:       kde-commits
Subject:    branches/work/kalzium-new-features/src
From:       Johannes Simon <johannes.simon () gmail ! com>
Date:       2007-09-22 8:16:56
Message-ID: 1190449016.961979.25110.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 715513 by jsimon:

Initial implementation of the export dialog.


 M  +2 -0      CMakeLists.txt  
 A             exportdialog.cpp   [License: no copyright]
 A             exportdialog.h   [License: no copyright]
 A             exportdialog.ui  
 M  +13 -0     kalzium.cpp  
 M  +6 -0      kalzium.h  
 M  +1 -0      kalziumui.rc  
 M  +1 -0      kalziumutils.cpp  


--- branches/work/kalzium-new-features/src/CMakeLists.txt #715512:715513
@@ -64,6 +64,7 @@
    searchwidget.cpp
    rsdialog.cpp
    legendwidget.cpp
+   exportdialog.cpp
    #tableinfowidget.cpp #will readd in KDE4.1
    #spectrumviewimpl.cpp #will readd in KDE4.1
    #spectrumwidget.cpp #will readd in KDE4.1
@@ -96,6 +97,7 @@
    rswidget.ui
    timewidget.ui
    isotopedialog.ui
+   exportdialog.ui
 )
 
 kde4_add_kcfg_files(kalzium_SRCS prefs.kcfgc )
--- branches/work/kalzium-new-features/src/kalzium.cpp #715512:715513
@@ -37,6 +37,7 @@
 #include "rsdialog.h"
 #include "tablesdialog.h"
 #include "legendwidget.h"
+#include "exportdialog.h"
 
 //TODO KDE 4.1
 //#include "tableinfowidget.h" 
@@ -133,6 +134,7 @@
 
 	m_infoDialog = 0;
 	m_toolboxCurrent = 0;
+    m_exportDialog = 0;
 	m_prevNormalMode = KalziumPainter::NORMAL;
 
 	connect( m_PeriodicTableView, SIGNAL( ElementClicked( int ) ), this, SLOT( \
openInformationDialog( int ) )); @@ -176,6 +178,10 @@
 
 void Kalzium::setupActions()
 {
+    export_action = actionCollection()->add<QAction>( "file_exporter" );
+    export_action->setText( "&Export Data..." );
+    connect( export_action, SIGNAL( triggered( bool ) ), this, SLOT( \
slotShowExportDialog() ) ); +
     // the action for swiching look: color schemes and gradients
     QStringList looklist;
     QStringList schemes = KalziumSchemeTypeFactory::instance()->schemes();
@@ -576,6 +582,13 @@
 {
 }
 
+void Kalzium::slotShowExportDialog()
+{
+    if(!m_exportDialog)
+        m_exportDialog = new ExportDialog( this );
+    m_exportDialog->show();
+}
+
 void Kalzium::setupStatusBar()
 {
 	statusBar()->insertItem( "", 0, 0 );
--- branches/work/kalzium-new-features/src/kalzium.h #715512:715513
@@ -33,6 +33,7 @@
 class QKeyEvent;
 class LegendWidget;
 class TableInfoWidget;
+class ExportDialog;
 
 #include "kalziumpainter.h"
 
@@ -103,6 +104,7 @@
         QAction *m_pMoleculesviewer;
         QAction *m_pOBConverterAction;
         QAction *m_EQSolverAction;
+        QAction *export_action;
 
         QAction *m_legendAction;
 
@@ -129,6 +131,8 @@
 
         SearchWidget *m_searchWidget;
 
+        ExportDialog *m_exportDialog;
+
         KalziumPainter::MODE m_prevNormalMode;
 
         public slots:
@@ -180,6 +184,8 @@
 
         void slotUpdateSettings();
 
+        void slotShowExportDialog();
+
         /**
          * These slots are for the standard actions
          */
--- branches/work/kalzium-new-features/src/kalziumui.rc #715512:715513
@@ -19,6 +19,7 @@
     <Action name="tools_rs" />
     <Action name="tools_tables" />
     <Action name="tools_moleculeviewer" />
+    <Action name="file_exporter" />
   </Menu>
 </MenuBar>
 
--- branches/work/kalzium-new-features/src/kalziumutils.cpp #715512:715513
@@ -199,6 +199,7 @@
             }
         default:
             {
+                result = el->dataAsVariant( kind ).toString();
             }
     }
 


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

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