[QGIS Commit] r15313 - in trunk/qgis/src/plugins: . quick_print

svn_qgis at osgeo.org svn_qgis at osgeo.org
Wed Mar 2 16:15:46 EST 2011


Author: timlinux
Date: 2011-03-02 13:15:46 -0800 (Wed, 02 Mar 2011)
New Revision: 15313

Removed:
   trunk/qgis/src/plugins/quick_print/CMakeLists.txt
   trunk/qgis/src/plugins/quick_print/quick_print.png
   trunk/qgis/src/plugins/quick_print/quickprint.qrc
   trunk/qgis/src/plugins/quick_print/quickprintgui.cpp
   trunk/qgis/src/plugins/quick_print/quickprintgui.h
   trunk/qgis/src/plugins/quick_print/quickprintguibase.ui
   trunk/qgis/src/plugins/quick_print/quickprintplugin.cpp
   trunk/qgis/src/plugins/quick_print/quickprintplugin.h
Modified:
   trunk/qgis/src/plugins/CMakeLists.txt
Log:
Removed quick print plugin

Modified: trunk/qgis/src/plugins/CMakeLists.txt
===================================================================
--- trunk/qgis/src/plugins/CMakeLists.txt	2011-03-02 15:02:04 UTC (rev 15312)
+++ trunk/qgis/src/plugins/CMakeLists.txt	2011-03-02 21:15:46 UTC (rev 15313)
@@ -5,7 +5,6 @@
   scale_bar
   oracle_raster
   raster_terrain_analysis
-  quick_print
   coordinate_capture
   dxf2shp_converter
   ogr_converter

Deleted: trunk/qgis/src/plugins/quick_print/CMakeLists.txt
===================================================================
--- trunk/qgis/src/plugins/quick_print/CMakeLists.txt	2011-03-02 15:02:04 UTC (rev 15312)
+++ trunk/qgis/src/plugins/quick_print/CMakeLists.txt	2011-03-02 21:15:46 UTC (rev 15313)
@@ -1,56 +0,0 @@
-
-########################################################
-# Files
-
-SET (quickprint_SRCS
-     quickprintplugin.cpp
-     quickprintgui.cpp
-)
-
-SET (quickprint_UIS quickprintguibase.ui)
-
-SET (quickprint_MOC_HDRS
-     quickprintplugin.h
-     quickprintgui.h
-)
-
-SET (quickprint_RCCS  quickprint.qrc)
-
-########################################################
-# Build
-
-QT4_WRAP_UI (quickprint_UIS_H  ${quickprint_UIS})
-
-QT4_WRAP_CPP (quickprint_MOC_SRCS  ${quickprint_MOC_HDRS})
-
-QT4_ADD_RESOURCES(quickprint_RCC_SRCS ${quickprint_RCCS})
-
-ADD_LIBRARY (quickprintplugin MODULE 
-   ${quickprint_SRCS} 
-   ${quickprint_MOC_SRCS} 
-   ${quickprint_RCC_SRCS} 
-   ${quickprint_UIS_H})
-
-INCLUDE_DIRECTORIES(
-     ${CMAKE_CURRENT_BINARY_DIR}
-     ../../core 
-     ../../core/raster 
-     ../../core/renderer 
-     ../../core/symbology
-     ../../gui
-     ..
-)
-
-TARGET_LINK_LIBRARIES(quickprintplugin
-  qgis_core
-  qgis_gui
-)
-
-
-########################################################
-# Install
-
-INSTALL(TARGETS quickprintplugin
-  RUNTIME DESTINATION ${QGIS_PLUGIN_DIR}
-  LIBRARY DESTINATION ${QGIS_PLUGIN_DIR})
-

Deleted: trunk/qgis/src/plugins/quick_print/quick_print.png
===================================================================
(Binary files differ)

Deleted: trunk/qgis/src/plugins/quick_print/quickprint.qrc
===================================================================
--- trunk/qgis/src/plugins/quick_print/quickprint.qrc	2011-03-02 15:02:04 UTC (rev 15312)
+++ trunk/qgis/src/plugins/quick_print/quickprint.qrc	2011-03-02 21:15:46 UTC (rev 15313)
@@ -1,5 +0,0 @@
-<RCC>
-    <qresource prefix="/" >
-        <file>quick_print.png</file>
-    </qresource>
-</RCC>

Deleted: trunk/qgis/src/plugins/quick_print/quickprintgui.cpp
===================================================================
--- trunk/qgis/src/plugins/quick_print/quickprintgui.cpp	2011-03-02 15:02:04 UTC (rev 15312)
+++ trunk/qgis/src/plugins/quick_print/quickprintgui.cpp	2011-03-02 21:15:46 UTC (rev 15313)
@@ -1,163 +0,0 @@
-/***************************************************************************
- *   Copyright (C) 2003 by Tim Sutton                                      *
- *   tim at linfiniti.com                                                     *
- *                                                                         *
- *   This is a plugin generated from the QGIS plugin template              *
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- ***************************************************************************/
-#include "quickprintgui.h"
-#include <qgsquickprint.h>
-#include "qgscontexthelp.h"
-#include "qgsapplication.h"
-#include "qgslogger.h"
-
-//qt includes
-#include <QMessageBox>
-#include <QFileDialog>
-#include <QSettings>
-#include <QPrinter>
-
-//standard includes
-
-QuickPrintGui::QuickPrintGui( QgsMapCanvas * thepMapCanvas,
-                              QWidget* parent,  Qt::WFlags fl ) :
-    QDialog( parent, fl ), mpMapCanvas( thepMapCanvas )
-{
-  setupUi( this );
-  grpOuput->hide();  //until properly implemented
-  cboPageSize->addItem( "A0 (841 x 1189 mm)", "QPrinter::A0" );
-  cboPageSize->addItem( "A1 (594 x 841 mm)", "QPrinter::A1" );
-  cboPageSize->addItem( "A2 (420 x 594 mm)", "QPrinter::A2" );
-  cboPageSize->addItem( "A3 (297 x 420 mm)", "QPrinter::A3" );
-  cboPageSize->addItem( "A4 (210 x 297 mm, 8.26 x 11.69 inches)", "QPrinter::A4" );
-  cboPageSize->addItem( "A5 (148 x 210 mm)", "QPrinter::A5" );
-  cboPageSize->addItem( "A6 (105 x 148 mm)", "QPrinter::A6" );
-  cboPageSize->addItem( "A7 (74 x 105 mm)", "QPrinter::A7" );
-  cboPageSize->addItem( "A8 (52 x 74 mm)", "QPrinter::A8" );
-  cboPageSize->addItem( "A9 (37 x 52 mm)", "QPrinter::A9" );
-  cboPageSize->addItem( "B0 (1030 x 1456 mm)", "QPrinter::B0" );
-  cboPageSize->addItem( "B1 (728 x 1030 mm)", "QPrinter::B1" );
-  cboPageSize->addItem( "B10 (32 x 45 mm)", "QPrinter::B10" );
-  cboPageSize->addItem( "B2 (515 x 728 mm)", "QPrinter::B2" );
-  cboPageSize->addItem( "B3 (364 x 515 mm)", "QPrinter::B3" );
-  cboPageSize->addItem( "B4 (257 x 364 mm)", "QPrinter::B4" );
-  cboPageSize->addItem( "B5 (182 x 257 mm, 7.17 x 10.13 inches)", "QPrinter::B5" );
-  cboPageSize->addItem( "B6 (128 x 182 mm)", "QPrinter::B6" );
-  cboPageSize->addItem( "B7 (91 x 128 mm)", "QPrinter::B7" );
-  cboPageSize->addItem( "B8 (64 x 91 mm)", "QPrinter::B8" );
-  cboPageSize->addItem( "B9 (45 x 64 mm)", "QPrinter::B9" );
-  cboPageSize->addItem( "C5E (163 x 229 mm)", "QPrinter::C5E" );
-  cboPageSize->addItem( "Comm10E (105 x 241 mm, U.S. Common 10 Envelope)", "QPrinter::Comm10E" );
-  cboPageSize->addItem( "DLE (110 x 220 mm)", "QPrinter::DLE" );
-  cboPageSize->addItem( "Executive (7.5 x 10 inches, 191 x 254 mm)", "QPrinter::Executive" );
-  cboPageSize->addItem( "Folio (210 x 330 mm)", "QPrinter::Folio" );
-  cboPageSize->addItem( "Ledger (432 x 279 mm)", "QPrinter::Ledger" );
-  cboPageSize->addItem( "Legal (8.5 x 14 inches, 216 x 356 mm)", "QPrinter::Legal" );
-  cboPageSize->addItem( "Letter (8.5 x 11 inches, 216 x 279 mm)", "QPrinter::Letter" );
-  readSettings();
-}
-
-QuickPrintGui::~QuickPrintGui()
-{
-}
-void QuickPrintGui::readSettings()
-{
-  QSettings mySettings;
-  leMapTitle->setText( mySettings.value( "quickprint/mapTitle", "Quantum GIS" ).toString() );
-  leMapName->setText( mySettings.value( "quickprint/mapName", "Quick Print" ).toString() );
-  teCopyright->setText( mySettings.value( "quickprint/mapCopyright", "(c) QGIS 2008" ).toString() );
-  bool myIncrementLastFileFlag = mySettings.value( "quickprint/incrementLastFile", false ).toBool();
-  radUseIncrementedFileName->setChecked( myIncrementLastFileFlag );
-
-  QString myPageSize = mySettings.value( "quickprint/pageSize",
-                                         "QPrinter::A4" ).toString();
-  cboPageSize->setCurrentIndex( cboPageSize->findData( myPageSize ) );
-}
-
-void QuickPrintGui::writeSettings()
-{
-  QSettings mySettings;
-  mySettings.setValue( "quickprint/mapTitle", leMapTitle->text() );
-  mySettings.setValue( "quickprint/mapName", leMapName->text() );
-  mySettings.setValue( "quickprint/mapCopyright", teCopyright->toPlainText() );
-  mySettings.setValue( "quickprint/incrementLastFile", radUseIncrementedFileName->isChecked() );
-  mySettings.setValue( "quickprint/pageSize",
-                       cboPageSize->itemData( cboPageSize->currentIndex() ) );
-}
-
-
-void QuickPrintGui::on_buttonBox_accepted()
-{
-  writeSettings();
-  QSettings mySettings;  // where we keep last used filter in persistent state
-  QString myLastUsedDir = mySettings.value( "quickprint/lastSaveAsPdfDir", "." ).toString();
-
-  //create a file dialog
-  std::auto_ptr < QFileDialog > myFileDialog
-  (
-    new QFileDialog(
-      this,
-      QFileDialog::tr( "Save experiment report to portable document format (.pdf)" ),
-      myLastUsedDir,
-      tr( "Portable Document Format (*.pdf)" )
-    )
-  );
-  myFileDialog->setFileMode( QFileDialog::AnyFile );
-  myFileDialog->setAcceptMode( QFileDialog::AcceptSave );
-
-  //prompt the user for a file name
-  QString myOutputFileName;
-  if ( myFileDialog->exec() == QDialog::Accepted )
-  {
-    QStringList myFiles = myFileDialog->selectedFiles();
-    if ( !myFiles.isEmpty() )
-    {
-      myOutputFileName = myFiles[0];
-    }
-  }
-
-  if ( !myOutputFileName.isEmpty() )
-  {
-    if ( myFileDialog->selectedFilter() == tr( "Portable Document Format (*.pdf)" ) )
-    {
-      //ensure the user never omitted the extension from the file name
-      if ( !myOutputFileName.toUpper().endsWith( ".PDF" ) )
-      {
-        myOutputFileName += ".pdf";
-      }
-
-      // call plugin print method here
-      QString myNorthArrowFile = QgsApplication::pkgDataPath() + "/svg/north_arrows/default.svg";
-      QgsQuickPrint myQuickPrint;
-      myQuickPrint.setMapCanvas( mpMapCanvas );
-      myQuickPrint.setTitle( leMapTitle->text() );
-      myQuickPrint.setName( leMapName->text() );
-      myQuickPrint.setCopyright( teCopyright->toPlainText() );
-      myQuickPrint.setLogo1( QgsApplication::iconsPath() + "/qgis-icon.png" );
-      myQuickPrint.setNorthArrow( myNorthArrowFile );
-      myQuickPrint.setOutputPdf( myOutputFileName );
-      QString myPageSizeString = cboPageSize->itemData( cboPageSize->currentIndex() ).toString();
-      myQuickPrint.setPageSize( QgsQuickPrint::stringToPageSize( myPageSizeString ) );
-      QgsDebugMsg( QString( "Page size : %1" ).arg( myPageSizeString ) );
-      myQuickPrint.printMap();
-    }
-    else
-    {
-      QMessageBox::warning( this, tr( "quickprint" ),
-                            tr( "Unknown format: %1" ).arg( myFileDialog->selectedFilter() ) );
-    }
-    mySettings.setValue( "quickprint/lastSaveAsPdfDir", myFileDialog->directory().absolutePath() );
-  }
-
-  //close the dialog
-  accept();
-}
-
-void QuickPrintGui::on_buttonBox_rejected()
-{
-  reject();
-}

Deleted: trunk/qgis/src/plugins/quick_print/quickprintgui.h
===================================================================
--- trunk/qgis/src/plugins/quick_print/quickprintgui.h	2011-03-02 15:02:04 UTC (rev 15312)
+++ trunk/qgis/src/plugins/quick_print/quickprintgui.h	2011-03-02 21:15:46 UTC (rev 15313)
@@ -1,46 +0,0 @@
-/***************************************************************************
-  Quick Print is a plugin to quickly print a map with minimal effort.
-  -------------------
-         begin                : Jan 2008
-         copyright            : (c) Tim Sutton, 2008
-         email                : tim at linfiniti.com
-
- *   tim at linfiniti.com                                                     *
- *                                                                         *
- *   This is a plugin generated from the QGIS plugin template              *
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- ***************************************************************************/
-#ifndef QuickPrintGUI_H
-#define QuickPrintGUI_H
-
-#include <QDialog>
-#include <ui_quickprintguibase.h>
-#include "qgsmapcanvas.h"
-#include "qgscontexthelp.h"
-
-/**
- at author Tim Sutton
-*/
-class QuickPrintGui : public QDialog, private Ui::QuickPrintGuiBase
-{
-    Q_OBJECT
-
-  public:
-    QuickPrintGui( QgsMapCanvas * thepMapCanvas, QWidget* parent = 0,  Qt::WFlags fl = 0 );
-    ~QuickPrintGui();
-  private:
-    void readSettings();
-    void writeSettings();
-    QgsMapCanvas * mpMapCanvas;
-  private slots:
-    void on_buttonBox_accepted();
-    void on_buttonBox_rejected();
-    void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
-
-};
-
-#endif

Deleted: trunk/qgis/src/plugins/quick_print/quickprintguibase.ui
===================================================================
--- trunk/qgis/src/plugins/quick_print/quickprintguibase.ui	2011-03-02 15:02:04 UTC (rev 15312)
+++ trunk/qgis/src/plugins/quick_print/quickprintguibase.ui	2011-03-02 21:15:46 UTC (rev 15313)
@@ -1,151 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>QuickPrintGuiBase</class>
- <widget class="QDialog" name="QuickPrintGuiBase">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>427</width>
-    <height>338</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>QGIS Quick Print Plugin</string>
-  </property>
-  <property name="windowIcon">
-   <iconset>
-    <normaloff>:/quickprint/quickprint.png</normaloff>:/quickprint/quickprint.png</iconset>
-  </property>
-  <layout class="QGridLayout" name="gridLayout">
-   <item row="1" column="0">
-    <widget class="QLabel" name="lblMapTitle">
-     <property name="text">
-      <string>Map title</string>
-     </property>
-     <property name="buddy">
-      <cstring>leMapTitle</cstring>
-     </property>
-    </widget>
-   </item>
-   <item row="1" column="2">
-    <widget class="QLineEdit" name="leMapTitle"/>
-   </item>
-   <item row="2" column="0">
-    <widget class="QLabel" name="lblMapName">
-     <property name="text">
-      <string>Map name</string>
-     </property>
-     <property name="buddy">
-      <cstring>leMapName</cstring>
-     </property>
-    </widget>
-   </item>
-   <item row="2" column="2">
-    <widget class="QLineEdit" name="leMapName"/>
-   </item>
-   <item row="3" column="0">
-    <widget class="QLabel" name="lblCopyright">
-     <property name="text">
-      <string>Copyright</string>
-     </property>
-     <property name="buddy">
-      <cstring>teCopyright</cstring>
-     </property>
-    </widget>
-   </item>
-   <item row="4" column="0">
-    <widget class="QLabel" name="label_2">
-     <property name="text">
-      <string>Page size</string>
-     </property>
-     <property name="buddy">
-      <cstring>cboPageSize</cstring>
-     </property>
-    </widget>
-   </item>
-   <item row="4" column="2">
-    <widget class="QComboBox" name="cboPageSize"/>
-   </item>
-   <item row="5" column="0" colspan="3">
-    <widget class="QGroupBox" name="grpOuput">
-     <property name="title">
-      <string>Output</string>
-     </property>
-     <layout class="QGridLayout">
-      <property name="margin">
-       <number>11</number>
-      </property>
-      <property name="spacing">
-       <number>6</number>
-      </property>
-      <item row="0" column="0">
-       <widget class="QRadioButton" name="radUseIncrementedFileName">
-        <property name="text">
-         <string>Use last filename but incremented.</string>
-        </property>
-       </widget>
-      </item>
-      <item row="1" column="0">
-       <widget class="QLabel" name="lblIncrementedFilename">
-        <property name="text">
-         <string>last used filename but incremented will be shown here</string>
-        </property>
-        <property name="wordWrap">
-         <bool>true</bool>
-        </property>
-       </widget>
-      </item>
-      <item row="2" column="0">
-       <widget class="QRadioButton" name="radPromptForFileName">
-        <property name="text">
-         <string>Prompt for file name</string>
-        </property>
-        <property name="checked">
-         <bool>true</bool>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </widget>
-   </item>
-   <item row="6" column="0" colspan="3">
-    <widget class="QLabel" name="label">
-     <property name="text">
-      <string>Note: If you want more control over the map layout please use the map composer function in QGIS.</string>
-     </property>
-     <property name="wordWrap">
-      <bool>true</bool>
-     </property>
-    </widget>
-   </item>
-   <item row="7" column="0" colspan="3">
-    <widget class="QDialogButtonBox" name="buttonBox">
-     <property name="orientation">
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="standardButtons">
-      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok</set>
-     </property>
-    </widget>
-   </item>
-   <item row="3" column="2">
-    <widget class="QTextEdit" name="teCopyright"/>
-   </item>
-  </layout>
- </widget>
- <layoutdefault spacing="6" margin="11"/>
- <tabstops>
-  <tabstop>leMapName</tabstop>
-  <tabstop>leMapTitle</tabstop>
-  <tabstop>teCopyright</tabstop>
-  <tabstop>cboPageSize</tabstop>
-  <tabstop>radUseIncrementedFileName</tabstop>
-  <tabstop>radPromptForFileName</tabstop>
-  <tabstop>buttonBox</tabstop>
- </tabstops>
- <resources>
-  <include location="quickprint.qrc"/>
- </resources>
- <connections/>
-</ui>

Deleted: trunk/qgis/src/plugins/quick_print/quickprintplugin.cpp
===================================================================
--- trunk/qgis/src/plugins/quick_print/quickprintplugin.cpp	2011-03-02 15:02:04 UTC (rev 15312)
+++ trunk/qgis/src/plugins/quick_print/quickprintplugin.cpp	2011-03-02 21:15:46 UTC (rev 15313)
@@ -1,199 +0,0 @@
-/***************************************************************************
-  quickprint.cpp
-  Quick Print is a plugin to quickly print a map with minimal effort.
-  -------------------
-         begin                : Jan 2008
-         copyright            : (c) Tim Sutton, 2008
-         email                : tim at linfiniti.com
-
- ***************************************************************************
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- ***************************************************************************/
-/*  $Id: plugin.cpp 7796 2007-12-16 22:11:38Z homann $ */
-
-//
-// QGIS Specific includes
-//
-
-#include <qgisinterface.h>
-#include <qgisgui.h>
-#include "quickprintplugin.h"
-#include "quickprintgui.h"
-#include <qgsapplication.h>
-
-//
-// Qt4 Related Includes
-//
-
-#include <QAction>
-#include <QFile>
-#include <QToolBar>
-
-
-static const char * const sIdent = "$Id: plugin.cpp 7796 2007-12-16 22:11:38Z homann $";
-static const QString sName = QObject::tr( "Quick Print" );
-static const QString sDescription = QObject::tr( "Quick Print is a plugin to quickly print a map with minimal effort." );
-static const QString sPluginVersion = QObject::tr( "Version 0.1" );
-static const QgisPlugin::PLUGINTYPE sPluginType = QgisPlugin::UI;
-static const QString sPluginIcon = ":/quick_print.png";
-
-//////////////////////////////////////////////////////////////////////
-//
-// THE FOLLOWING METHODS ARE MANDATORY FOR ALL PLUGINS
-//
-//////////////////////////////////////////////////////////////////////
-
-/**
- * Constructor for the plugin. The plugin is passed a pointer
- * an interface object that provides access to exposed functions in QGIS.
- * @param theQGisInterface - Pointer to the QGIS interface object
- */
-QuickPrintPlugin::QuickPrintPlugin( QgisInterface * theQgisInterface ):
-    QgisPlugin( sName, sDescription, sPluginVersion, sPluginType ),
-    mQGisIface( theQgisInterface )
-{
-  mpMapCanvas = mQGisIface->mapCanvas();
-}
-
-QuickPrintPlugin::~QuickPrintPlugin()
-{
-
-}
-
-/*
- * Initialize the GUI interface for the plugin - this is only called once when the plugin is
- * added to the plugin registry in the QGIS application.
- */
-void QuickPrintPlugin::initGui()
-{
-
-  // Create the action for tool
-  mQActionPointer = new QAction( QIcon(), tr( "Quick Print" ), this );
-  // Set the icon
-  setCurrentTheme( "" );
-  // Set the what's this text
-  mQActionPointer->setWhatsThis( tr( "Provides a way to quickly produce a map with minimal user input." ) );
-  // Connect the action to the run
-  connect( mQActionPointer, SIGNAL( triggered() ), this, SLOT( run() ) );
-  // Add the icon to the toolbar
-  mQGisIface->addToolBarIcon( mQActionPointer );
-  mQGisIface->addPluginToMenu( tr( "&Quick Print" ), mQActionPointer );
-
-  // this is called when the icon theme is changed
-  connect( mQGisIface, SIGNAL( currentThemeChanged( QString ) ), this, SLOT( setCurrentTheme( QString ) ) );
-}
-//method defined in interface
-void QuickPrintPlugin::help()
-{
-  //implement me!
-}
-
-// Slot called when the menu item is activated
-// If you created more menu items / toolbar buttons in initiGui, you should
-// create a separate handler for each action - this single run() method will
-// not be enough
-void QuickPrintPlugin::run()
-{
-  QuickPrintGui *mypPluginGui = new QuickPrintGui(
-    mpMapCanvas,
-    mQGisIface->mainWindow(),
-    QgisGui::ModalDialogFlags );
-  mypPluginGui->setAttribute( Qt::WA_DeleteOnClose );
-  mypPluginGui->exec(); //gui will decide when to call print
-
-}
-
-// Unload the plugin by cleaning up the GUI
-void QuickPrintPlugin::unload()
-{
-  // remove the GUI
-  mQGisIface->removePluginMenu( "&Quick Print", mQActionPointer );
-  mQGisIface->removeToolBarIcon( mQActionPointer );
-  delete mQActionPointer;
-}
-
-//! Set icons to the current theme
-void QuickPrintPlugin::setCurrentTheme( QString theThemeName )
-{
-  QString myCurThemePath = QgsApplication::activeThemePath() + "/plugins/quick_print.png";
-  QString myDefThemePath = QgsApplication::defaultThemePath() + "/plugins/quick_print.png";
-  QString myQrcPath = ":/quick_print.png";
-  if ( QFile::exists( myCurThemePath ) )
-  {
-    mQActionPointer->setIcon( QIcon( myCurThemePath ) );
-  }
-  else if ( QFile::exists( myDefThemePath ) )
-  {
-    mQActionPointer->setIcon( QIcon( myDefThemePath ) );
-  }
-  else if ( QFile::exists( myQrcPath ) )
-  {
-    mQActionPointer->setIcon( QIcon( myQrcPath ) );
-  }
-  else
-  {
-    mQActionPointer->setIcon( QIcon() );
-  }
-}
-
-//////////////////////////////////////////////////////////////////////////
-//
-//
-//  THE FOLLOWING CODE IS AUTOGENERATED BY THE PLUGIN BUILDER SCRIPT
-//    YOU WOULD NORMALLY NOT NEED TO MODIFY THIS, AND YOUR PLUGIN
-//      MAY NOT WORK PROPERLY IF YOU MODIFY THIS INCORRECTLY
-//
-//
-//////////////////////////////////////////////////////////////////////////
-
-
-/**
- * Required extern functions needed  for every plugin
- * These functions can be called prior to creating an instance
- * of the plugin class
- */
-// Class factory to return a new instance of the plugin class
-QGISEXTERN QgisPlugin * classFactory( QgisInterface * theQgisInterfacePointer )
-{
-  return new QuickPrintPlugin( theQgisInterfacePointer );
-}
-// Return the name of the plugin - note that we do not user class members as
-// the class may not yet be insantiated when this method is called.
-QGISEXTERN QString name()
-{
-  return sName;
-}
-
-// Return the description
-QGISEXTERN QString description()
-{
-  return sDescription;
-}
-
-// Return the type (either UI or MapLayer plugin)
-QGISEXTERN int type()
-{
-  return sPluginType;
-}
-
-// Return the version number for the plugin
-QGISEXTERN QString version()
-{
-  return sPluginVersion;
-}
-
-QGISEXTERN QString icon()
-{
-  return sPluginIcon;
-}
-
-// Delete ourself
-QGISEXTERN void unload( QgisPlugin * thePluginPointer )
-{
-  delete thePluginPointer;
-}

Deleted: trunk/qgis/src/plugins/quick_print/quickprintplugin.h
===================================================================
--- trunk/qgis/src/plugins/quick_print/quickprintplugin.h	2011-03-02 15:02:04 UTC (rev 15312)
+++ trunk/qgis/src/plugins/quick_print/quickprintplugin.h	2011-03-02 21:15:46 UTC (rev 15313)
@@ -1,111 +0,0 @@
-/***************************************************************************
-    quickprint.h
-    -------------------
-    begin                : Jan 21, 2004
-    copyright            : (C) 2004 by Tim Sutton
-    email                : tim at linfiniti.com
-
- ***************************************************************************/
-
-/***************************************************************************
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- ***************************************************************************/
-/*  $Id: plugin.h 7796 2007-12-16 22:11:38Z homann $ */
-/***************************************************************************
- *   QGIS Programming conventions:
- *
- *   mVariableName - a class level member variable
- *   sVariableName - a static class level member variable
- *   variableName() - accessor for a class member (no 'get' in front of name)
- *   setVariableName() - mutator for a class member (prefix with 'set')
- *
- *   Additional useful conventions:
- *
- *   theVariableName - a method parameter (prefix with 'the')
- *   myVariableName - a locally declared variable within a method ('my' prefix)
- *
- *   DO: Use mixed case variable names - myVariableName
- *   DON'T: separate variable names using underscores: my_variable_name (NO!)
- *
- * **************************************************************************/
-#ifndef QuickPrint_H
-#define QuickPrint_H
-
-//QT4 includes
-#include <QObject>
-
-//QGIS includes
-#include "qgisplugin.h"
-#include <qgsmaprenderer.h>
-#include <qgsmapcanvas.h>
-
-//forward declarations
-class QAction;
-class QToolBar;
-
-class QgisInterface;
-
-/**
-* \class Plugin
-* \brief [name] plugin for QGIS
-* [description]
-*/
-class QuickPrintPlugin: public QObject, public QgisPlugin
-{
-    Q_OBJECT
-  public:
-
-    //////////////////////////////////////////////////////////////////////
-    //
-    //                MANDATORY PLUGIN METHODS FOLLOW
-    //
-    //////////////////////////////////////////////////////////////////////
-
-    /**
-    * Constructor for a plugin. The QgisInterface pointer is passed by
-    * QGIS when it attempts to instantiate the plugin.
-    * @param theInterface Pointer to the QgisInterface object.
-     */
-    QuickPrintPlugin( QgisInterface * theInterface );
-    //! Destructor
-    virtual ~QuickPrintPlugin();
-
-  public slots:
-    //! init the gui
-    virtual void initGui();
-    //! Show the dialog box
-    void run();
-    //! unload the plugin
-    void unload();
-    //! show the help document
-    void help();
-    //! update the plugins theme when the app tells us its theme is changed
-    void setCurrentTheme( QString theThemeName );
-  private:
-
-    QgsMapCanvas * mpMapCanvas;
-
-    ////////////////////////////////////////////////////////////////////
-    //
-    // MANDATORY PLUGIN PROPERTY DECLARATIONS  .....
-    //
-    ////////////////////////////////////////////////////////////////////
-
-    int mPluginType;
-    //! Pointer to the QGIS interface object
-    QgisInterface *mQGisIface;
-    //!pointer to the qaction for this plugin
-    QAction * mQActionPointer;
-    ////////////////////////////////////////////////////////////////////
-    //
-    // ADD YOUR OWN PROPERTY DECLARATIONS AFTER THIS POINT.....
-    //
-    ////////////////////////////////////////////////////////////////////
-};
-
-#endif //QuickPrint_H



More information about the QGIS-commit mailing list