[QGIS Commit] r9353 - trunk/qgis/src/app/composer
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Fri Sep 19 03:50:18 EDT 2008
Author: mhugent
Date: 2008-09-19 03:50:17 -0400 (Fri, 19 Sep 2008)
New Revision: 9353
Modified:
trunk/qgis/src/app/composer/qgscomposer.cpp
trunk/qgis/src/app/composer/qgscomposer.h
Log:
More cleanups
Modified: trunk/qgis/src/app/composer/qgscomposer.cpp
===================================================================
--- trunk/qgis/src/app/composer/qgscomposer.cpp 2008-09-19 07:37:54 UTC (rev 9352)
+++ trunk/qgis/src/app/composer/qgscomposer.cpp 2008-09-19 07:50:17 UTC (rev 9353)
@@ -834,87 +834,6 @@
close();
}
-void QgsComposer::projectRead( void )
-{
- QgsDebugMsg( "entered." );
- //if ( mComposition ) delete mComposition;
- //mComposition = new QgsComposition( this, 1 );
-
- // Read composition if it is defined in project
- QStringList l = QgsProject::instance()->subkeyList( "Compositions", "" );
-
- bool found = false;
- for ( QStringList::iterator it = l.begin(); it != l.end(); ++it )
- {
- QgsDebugMsg( QString( "key: %1" ).arg(( *it ) ) );
- if (( *it ).compare( "composition_1" ) == 0 )
- {
- found = true;
- break;
- }
- }
-
- if ( found )
- {
- //mComposition->readSettings ( );
- mFirstTime = false;
- }
- else
- {
- if ( isVisible() )
- {
- //mComposition->createDefault();
- mFirstTime = false;
- }
- else
- {
- mFirstTime = true;
- }
- }
-
- //mComposition->setActive ( true );
-}
-
-void QgsComposer::newProject( void )
-{
- QgsDebugMsg( "entered." );
- //if ( mComposition ) delete mComposition;
-
- //mComposition = new QgsComposition( this, 1 );
- //mComposition->setActive ( true );
-
- // If composer is visible, create default immediately, otherwise wait for the first open()
- if ( isVisible() )
- {
- //mComposition->createDefault();
- mFirstTime = false;
- }
- else
- {
- mFirstTime = true;
- }
-}
-
-bool QgsComposer::writeSettings( void )
-{
-#ifdef WIN32
- bool ok = true;
-#else
- bool ok = false;
-#endif
- return ok;
-}
-
-bool QgsComposer::readSettings( void )
-{
-#ifdef WIN32
- bool ok = true;
-#else
- bool ok = false;
-#endif
- return ok;
-}
-
void QgsComposer::writeXML( QDomDocument& doc )
{
QDomNodeList nl = doc.elementsByTagName( "qgis" );
@@ -1084,6 +1003,8 @@
mComposition->sortZList();
mView->setComposition( mComposition );
+
+ setSelectionTool();
}
void QgsComposer::addComposerMap( QgsComposerMap* map )
Modified: trunk/qgis/src/app/composer/qgscomposer.h
===================================================================
--- trunk/qgis/src/app/composer/qgscomposer.h 2008-09-19 07:37:54 UTC (rev 9352)
+++ trunk/qgis/src/app/composer/qgscomposer.h 2008-09-19 07:50:17 UTC (rev 9353)
@@ -41,18 +41,6 @@
/** \ingroup MapComposer
* \brief A gui for composing a printable map.
- * The constructor creates empty composer, without compositions and mFirstTime set to true.
- * - if signal projectRead() is received all old compositions are deleted and
- * - if the composition exists in project it is created from project settings (mFirstTime set to false)
- * - if the composition does not exist in project
- * - if the composer is visible new default composition is created (mFirstTime set to false)
- * - if the composer is not visible the composer is left empty (mFirstTime set to true)
- * - if signal newProject() is received all old compositions are deleted and
- * - if the composer is visible a new default composition is created (mFirstTime set to false)
- * - if the composer is not visible the composer is left empty (mFirstTime set to true)
- *
- * If open() is called and mFirstTime == true, a new default composition is created.
- *
*/
class QgsComposer: public QMainWindow, private Ui::QgsComposerBase
{
@@ -80,12 +68,6 @@
//! Show composition options in widget
void showCompositionOptions( QWidget *w );
- /** \brief stores statei in project */
- bool writeSettings( void );
-
- /** \brief read state from project */
- bool readSettings( void );
-
//! Restore the window and toolbar state
void restoreWindowState();
@@ -168,12 +150,6 @@
//!Move selected items to bottom
void moveSelectedItemsToBottom();
- //! read project
- void projectRead();
-
- //! New project
- void newProject();
-
//! Save window state
void saveWindowState();
More information about the QGIS-commit
mailing list