mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Merge branch 'master' of github.com:qgis/Quantum-GIS
This commit is contained in:
commit
ffed1d7702
4
.gitignore
vendored
4
.gitignore
vendored
@ -30,3 +30,7 @@ ms-windows/untgz/
|
||||
scripts/astyle.exe
|
||||
# vim temporary files
|
||||
.*.swp
|
||||
*.aux
|
||||
*.out
|
||||
*.tex
|
||||
*.toc
|
||||
|
@ -46,6 +46,14 @@ MACRO(ADD_TXT2TAGS_FILES _sources)
|
||||
COMMENT "Building ${_out}.html from ${_in}"
|
||||
)
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${_out}.tex
|
||||
COMMAND ${TXT2TAGS_EXECUTABLE}
|
||||
ARGS -o${_out}.tex -t tex ${_in}
|
||||
DEPENDS ${_in}
|
||||
COMMENT "Building ${_out}.tex from ${_in}"
|
||||
)
|
||||
|
||||
SET(${_sources} ${${_sources}} ${_out} ${_out}.html)
|
||||
ENDFOREACH (_current_FILE)
|
||||
ENDMACRO(ADD_TXT2TAGS_FILES)
|
||||
|
@ -12,11 +12,37 @@ Developers guide for QGIS
|
||||
%! PostProc(txt): '(?i)(\t)' ' '
|
||||
%! encoding: iso-8859-1
|
||||
|
||||
%
|
||||
% Tex processing
|
||||
%
|
||||
% Make sure this is first
|
||||
%! PostProc(tex): '\\includegraphics' '\\includegraphics[width=100mm]'
|
||||
% scartcl is from the koma script document class (apt-get install texlive-latex-recommended ttf-komatuna)
|
||||
% setlength parindent suppresses first line of paragraph idents
|
||||
% parskip puts blank space between paragraphs
|
||||
% title pic stuff used to put a logo on the front page
|
||||
%! PostProc(tex): '\\documentclass{article}' '\\documentclass{scrartcl}\n\\setlength{\\parindent}{0pt}\n\\setlength{\\parskip}{2ex}'
|
||||
% use the color table and table packages so we can pimp the tables a little
|
||||
%! PostProc(tex): '\\usepackage{style.css} % user defined' '\\usepackage{fancyvrb}\n\\usepackage{colortbl} \n\\usepackage [table]{xcolor}\n\\definecolor{tableShade}{HTML}{cecece}\n\\definecolor{qgis-green}{HTML}{0E7300}\n\\usepackage{wallpaper}\n\\LRCornerWallPaper{1}{WALLPAPER-IMAGE}\n\\usepackage{hyperref}\n\\hypersetup{linkcolor=qgis-green,urlcolor=qgis-green}\\renewcommand\\thesection{\\color{qgis-green}\\thechapter\\arabic{section}}'
|
||||
% Make the header row of tables have a dark background. light text
|
||||
%! PostProc(tex): '\\hline \\textbf' '\\hline \\rowcolor[rgb]{0,0,0} \\color{white} \\textbf'
|
||||
%! PostProc(tex): '& \\textbf' '& \\color{white} \\textbf'
|
||||
% Make verbatim text a little smaller and use fancyvrb package to draw it in a box
|
||||
% Note Verbatim with capital V for fancyvrb to work
|
||||
%! PostProc(tex): '\\begin{verbatim}' '{\\scriptsize\\begin{Verbatim}[frame=single,rulecolor=\\color{qgis-green}, framesep=4mm, label=\\fbox{\\small\\emph{Listing}}]'
|
||||
%! PostProc(tex): '\\end{verbatim}' '\\end{Verbatim}\n}'
|
||||
%! PostProc(tex): '\\section' '\\newpage\\section'
|
||||
%! PostProc(tex): 'section{' 'section{\\color{qgis-green}'
|
||||
%! PostProc(tex): NEWPAGE '\\newpage'
|
||||
% Give alternating table rows different colours and use a smaller font in tables (\tiny)
|
||||
%! PostProc(tex): '\\begin{tabular}' '\\rowcolors{2}{tableShade}{white} \n\\tiny\\begin{tabular}'
|
||||
%! encoding: iso-8859-1
|
||||
|
||||
%! PostProc(tex): WALLPAPER-IMAGE 'qgis-footer.png'
|
||||
% These are comments and will not be generated in any output
|
||||
% -------------------
|
||||
|
||||
%This document is in text2tags format. You can generate html, plain text and
|
||||
%This document is in txt2tags format. You can generate html, plain text and
|
||||
%moinmoin formatted documentation by running txt2tags on this document. See the
|
||||
%txt2tags home page for more details. Please insert manual line breaks in this
|
||||
%document as it makes diffing for changes much easier. To do this in vim
|
||||
@ -26,12 +52,13 @@ Developers guide for QGIS
|
||||
|
||||
% To generate the text version of this document:
|
||||
% txt2tags -t txt -o CODING CODING.t2t
|
||||
% To generate the moinmoin version of this document:
|
||||
% txt2tags -t moin -o CODING.moin CODING.t2t
|
||||
% To generate the mediawiki version of this document:
|
||||
% txt2tags -t wiki --no-enum-title -o CODING.wiki CODING.t2t
|
||||
% To generate the html version of this document:
|
||||
% txt2tags -t html -o CODING.html CODING.t2t
|
||||
% To generate the LaTeX version of this document:
|
||||
% txt2tags -t tex -o CODING.tex CODING.t2t
|
||||
% txt2tags -t tex -o CODING.tex CODING.t2t; pdflatex CODING.tex
|
||||
|
||||
%
|
||||
% End of comments
|
||||
% -------------------
|
||||
|
@ -1,7 +1,6 @@
|
||||
Quantum GIS (QGIS)
|
||||
|
||||
Building QGIS from source - step by step
|
||||
|
||||
%%date(%A %B %d, %Y)
|
||||
|
||||
%! target : html
|
||||
%! style : style.css
|
||||
@ -12,6 +11,33 @@ Building QGIS from source - step by step
|
||||
% Next line will replace tabs with 2 spaces in txt generated outputs
|
||||
%! PostProc(txt): '(?i)(\t)' ' '
|
||||
%! encoding: iso-8859-1
|
||||
%
|
||||
% Tex processing
|
||||
%
|
||||
% Make sure this is first
|
||||
%! PostProc(tex): '\\includegraphics' '\\includegraphics[width=100mm]'
|
||||
% scartcl is from the koma script document class (apt-get install texlive-latex-recommended ttf-komatuna)
|
||||
% setlength parindent suppresses first line of paragraph idents
|
||||
% parskip puts blank space between paragraphs
|
||||
% title pic stuff used to put a logo on the front page
|
||||
%! PostProc(tex): '\\documentclass{article}' '\\documentclass{scrartcl}\n\\setlength{\\parindent}{0pt}\n\\setlength{\\parskip}{2ex}'
|
||||
% use the color table and table packages so we can pimp the tables a little
|
||||
%! PostProc(tex): '\\usepackage{style.css} % user defined' '\\usepackage{fancyvrb}\n\\usepackage{colortbl} \n\\usepackage [table]{xcolor}\n\\definecolor{tableShade}{HTML}{cecece}\n\\definecolor{qgis-green}{HTML}{0E7300}\n\\usepackage{wallpaper}\n\\LRCornerWallPaper{1}{WALLPAPER-IMAGE}\n\\usepackage{hyperref}\n\\hypersetup{linkcolor=qgis-green,urlcolor=qgis-green}\\renewcommand\\thesection{\\color{qgis-green}\\thechapter\\arabic{section}}'
|
||||
% Make the header row of tables have a dark background. light text
|
||||
%! PostProc(tex): '\\hline \\textbf' '\\hline \\rowcolor[rgb]{0,0,0} \\color{white} \\textbf'
|
||||
%! PostProc(tex): '& \\textbf' '& \\color{white} \\textbf'
|
||||
% Make verbatim text a little smaller and use fancyvrb package to draw it in a box
|
||||
% Note Verbatim with capital V for fancyvrb to work
|
||||
%! PostProc(tex): '\\begin{verbatim}' '{\\scriptsize\\begin{Verbatim}[frame=single,rulecolor=\\color{qgis-green}, framesep=4mm, label=\\fbox{\\small\\emph{Listing}}]'
|
||||
%! PostProc(tex): '\\end{verbatim}' '\\end{Verbatim}\n}'
|
||||
%! PostProc(tex): '\\section' '\\newpage\\section'
|
||||
%! PostProc(tex): 'section{' 'section{\\color{qgis-green}'
|
||||
%! PostProc(tex): NEWPAGE '\\newpage'
|
||||
% Give alternating table rows different colours and use a smaller font in tables (\tiny)
|
||||
%! PostProc(tex): '\\begin{tabular}' '\\rowcolors{2}{tableShade}{white} \n\\tiny\\begin{tabular}'
|
||||
%! encoding: iso-8859-1
|
||||
|
||||
%! PostProc(tex): WALLPAPER-IMAGE 'qgis-footer.png'
|
||||
% These are comments and will not be generated in any output
|
||||
% -------------------
|
||||
|
||||
@ -30,13 +56,13 @@ Building QGIS from source - step by step
|
||||
% To generate the html version of this document:
|
||||
% txt2tags -t html -o INSTALL.html INSTALL.t2t
|
||||
% To generate the LaTeX version of this document:
|
||||
% txt2tags -t tex -o INSTALL.tex INSTALL.t2t
|
||||
% txt2tags -t tex -o INSTALL.tex INSTALL.t2t; pdflatex INSTALL.tex
|
||||
|
||||
% End of comments
|
||||
% -------------------
|
||||
|
||||
Last update: %%date
|
||||
Last change: %%mtime
|
||||
Last Updated: %%date(%A %B %d, %Y)
|
||||
Last Change : %%mtime(%A %B %d, %Y)
|
||||
|
||||
%%toc
|
||||
|
||||
|
@ -26,3 +26,6 @@ The following people have contributed to this document:
|
||||
- GNU/Linux Section
|
||||
- Tim Sutton 2006
|
||||
- Debian package section: Juergen Fischer 2008
|
||||
|
||||
- Latex Generator
|
||||
- Tim Sutton 2011
|
||||
|
BIN
doc/qgis-footer.png
Normal file
BIN
doc/qgis-footer.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 109 KiB |
BIN
doc/qgis-footer.xcf
Normal file
BIN
doc/qgis-footer.xcf
Normal file
Binary file not shown.
@ -253,6 +253,9 @@ class QgsComposerItem: QObject, QGraphicsRectItem
|
||||
|
||||
double rotation() const;
|
||||
|
||||
/**Updates item, with the possibility to do custom update for subclasses*/
|
||||
virtual void updateItem();
|
||||
|
||||
public slots:
|
||||
virtual void setRotation( double r);
|
||||
|
||||
|
@ -94,7 +94,7 @@ class QgsComposerMap : QgsComposerItem
|
||||
/**Sets new Extent and changes width, height (and implicitely also scale)*/
|
||||
void setNewExtent( const QgsRectangle& extent );
|
||||
|
||||
PreviewMode previewMode();
|
||||
PreviewMode previewMode() const;
|
||||
void setPreviewMode( PreviewMode m );
|
||||
|
||||
/**Getter for flag that determines if the stored layer set should be used or the current layer set of the qgis mapcanvas
|
||||
@ -222,6 +222,10 @@ class QgsComposerMap : QgsComposerItem
|
||||
void setCrossLength(double l);
|
||||
double crossLength();
|
||||
|
||||
void setMapRotation( double r );
|
||||
|
||||
void updateItem();
|
||||
|
||||
public slots:
|
||||
|
||||
/**Called if map canvas has changed*/
|
||||
|
@ -371,16 +371,6 @@ void QgsComposer::changeEvent( QEvent* event )
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void QgsComposer::showEvent( QShowEvent *event )
|
||||
{
|
||||
QMainWindow::showEvent( event );
|
||||
// add to menu if (re)opening window (event not due to unminimize)
|
||||
if ( !event->spontaneous() )
|
||||
{
|
||||
QgisApp::instance()->addWindow( mWindowAction );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void QgsComposer::setTitle( const QString& title )
|
||||
@ -1123,6 +1113,30 @@ void QgsComposer::resizeEvent( QResizeEvent *e )
|
||||
saveWindowState();
|
||||
}
|
||||
|
||||
void QgsComposer::showEvent( QShowEvent* event )
|
||||
{
|
||||
if ( event->spontaneous() ) //event from the window system
|
||||
{
|
||||
//go through maps and restore original preview modes (show on demand after loading from project file)
|
||||
QMap< QgsComposerMap*, QgsComposerMap::PreviewMode >::iterator mapIt = mMapsToRestore.begin();
|
||||
for ( ; mapIt != mMapsToRestore.end(); ++mapIt )
|
||||
{
|
||||
mapIt.key()->setPreviewMode( mapIt.value() );
|
||||
mapIt.key()->cache();
|
||||
mapIt.key()->update();
|
||||
}
|
||||
mMapsToRestore.clear();
|
||||
}
|
||||
|
||||
#ifdef Q_WS_MAC
|
||||
// add to menu if (re)opening window (event not due to unminimize)
|
||||
if ( !event->spontaneous() )
|
||||
{
|
||||
QgisApp::instance()->addWindow( mWindowAction );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void QgsComposer::saveWindowState()
|
||||
{
|
||||
QSettings settings;
|
||||
@ -1169,6 +1183,14 @@ void QgsComposer::writeXML( QDomNode& parentNode, QDomDocument& doc )
|
||||
QDomElement composerElem = doc.createElement( "Composer" );
|
||||
composerElem.setAttribute( "title", mTitle );
|
||||
|
||||
//change preview mode of minimised / hidden maps before saving XML (show contents only on demand)
|
||||
QMap< QgsComposerMap*, QgsComposerMap::PreviewMode >::iterator mapIt = mMapsToRestore.begin();
|
||||
for ( ; mapIt != mMapsToRestore.end(); ++mapIt )
|
||||
{
|
||||
mapIt.key()->setPreviewMode( mapIt.value() );
|
||||
}
|
||||
mMapsToRestore.clear();
|
||||
|
||||
//store if composer is open or closed
|
||||
if ( isVisible() )
|
||||
{
|
||||
@ -1283,6 +1305,20 @@ void QgsComposer::readXML( const QDomElement& composerElem, const QDomDocument&
|
||||
QDomElement currentComposerMapElem = composerMapList.at( i ).toElement();
|
||||
QgsComposerMap* newMap = new QgsComposerMap( mComposition );
|
||||
newMap->readXML( currentComposerMapElem, doc );
|
||||
|
||||
if ( fromTemplate ) //show map directly if loaded from template
|
||||
{
|
||||
newMap->updateItem();
|
||||
}
|
||||
else //show map only on demand if loaded from project
|
||||
{
|
||||
if ( newMap->previewMode() != QgsComposerMap::Rectangle )
|
||||
{
|
||||
mMapsToRestore.insert( newMap, newMap->previewMode() );
|
||||
newMap->setPreviewMode( QgsComposerMap::Rectangle );
|
||||
}
|
||||
}
|
||||
|
||||
addComposerMap( newMap );
|
||||
mComposition->addItem( newMap );
|
||||
mComposition->update();
|
||||
@ -1518,6 +1554,12 @@ void QgsComposer::deleteItem( QgsComposerItem* item )
|
||||
//the item itself is not deleted here (usually, this is done in the destructor of QgsAddRemoveItemCommand)
|
||||
delete( it.value() );
|
||||
mItemWidgetMap.remove( it.key() );
|
||||
|
||||
QgsComposerMap* map = dynamic_cast<QgsComposerMap*>( item );
|
||||
if ( map )
|
||||
{
|
||||
mMapsToRestore.remove( map );
|
||||
}
|
||||
}
|
||||
|
||||
void QgsComposer::setSelectionTool()
|
||||
|
@ -18,7 +18,7 @@
|
||||
#ifndef QGSCOMPOSER_H
|
||||
#define QGSCOMPOSER_H
|
||||
#include "ui_qgscomposerbase.h"
|
||||
#include "qgscomposeritem.h"
|
||||
#include "qgscomposermap.h"
|
||||
#include "qgscontexthelp.h"
|
||||
#include <QPrinter>
|
||||
|
||||
@ -26,7 +26,6 @@ class QgisApp;
|
||||
class QgsComposerArrow;
|
||||
class QgsComposerLabel;
|
||||
class QgsComposerLegend;
|
||||
class QgsComposerMap;
|
||||
class QgsComposerPicture;
|
||||
class QgsComposerScaleBar;
|
||||
class QgsComposerShape;
|
||||
@ -93,12 +92,11 @@ class QgsComposer: public QMainWindow, private Ui::QgsComposerBase
|
||||
//! Resize event
|
||||
virtual void resizeEvent( QResizeEvent * );
|
||||
|
||||
virtual void showEvent( QShowEvent* event );
|
||||
|
||||
#ifdef Q_WS_MAC
|
||||
//! Change event (update window menu on ActivationChange)
|
||||
virtual void changeEvent( QEvent * );
|
||||
|
||||
//! Show event (add window to menu)
|
||||
virtual void showEvent( QShowEvent * );
|
||||
#endif
|
||||
|
||||
signals:
|
||||
@ -321,6 +319,9 @@ class QgsComposer: public QMainWindow, private Ui::QgsComposerBase
|
||||
QPrinter mPrinter;
|
||||
|
||||
QUndoView* mUndoView;
|
||||
|
||||
//! We load composer map content from project xml only on demand. Therefore we need to store the real preview mode type
|
||||
QMap< QgsComposerMap*, QgsComposerMap::PreviewMode > mMapsToRestore;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -269,10 +269,12 @@ void QgsComposerMapWidget::updateGuiElements()
|
||||
if ( previewMode == QgsComposerMap::Cache )
|
||||
{
|
||||
index = mPreviewModeComboBox->findText( tr( "Cache" ) );
|
||||
mUpdatePreviewButton->setEnabled( true );
|
||||
}
|
||||
else if ( previewMode == QgsComposerMap::Render )
|
||||
{
|
||||
index = mPreviewModeComboBox->findText( tr( "Render" ) );
|
||||
mUpdatePreviewButton->setEnabled( true );
|
||||
}
|
||||
else if ( previewMode == QgsComposerMap::Rectangle )
|
||||
{
|
||||
|
@ -568,6 +568,7 @@ void QgsComposerItem::changeItemRectangle( const QPointF& currentPosition, const
|
||||
changeComposerItem->setSceneRect( QRectF( originalItem->transform().dx() + moveRectX,
|
||||
originalItem->transform().dy() + moveRectY,
|
||||
originalItem->rect().width(), originalItem->rect().height() ) );
|
||||
changeComposerItem->updateItem();
|
||||
}
|
||||
}
|
||||
return;
|
||||
@ -587,6 +588,7 @@ void QgsComposerItem::changeItemRectangle( const QPointF& currentPosition, const
|
||||
{
|
||||
changeComposerItem->setSceneRect( QRectF( originalItem->transform().dx() + mx, originalItem->transform().dy() + my,
|
||||
originalItem->rect().width() + rx, originalItem->rect().height() + ry ) );
|
||||
changeComposerItem->updateItem();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -217,6 +217,9 @@ class CORE_EXPORT QgsComposerItem: public QObject, public QGraphicsRectItem
|
||||
|
||||
double rotation() const {return mRotation;}
|
||||
|
||||
/**Updates item, with the possibility to do custom update for subclasses*/
|
||||
virtual void updateItem() { QGraphicsRectItem::update(); }
|
||||
|
||||
public slots:
|
||||
virtual void setRotation( double r );
|
||||
void repaint();
|
||||
|
@ -390,6 +390,7 @@ void QgsComposerMap::resize( double dx, double dy )
|
||||
QRectF currentRect = rect();
|
||||
QRectF newSceneRect = QRectF( transform().dx(), transform().dy(), currentRect.width() + dx, currentRect.height() + dy );
|
||||
setSceneRect( newSceneRect );
|
||||
updateItem();
|
||||
}
|
||||
|
||||
void QgsComposerMap::moveContent( double dx, double dy )
|
||||
@ -489,10 +490,6 @@ void QgsComposerMap::setSceneRect( const QRectF& rectangle )
|
||||
mExtent = QgsRectangle( mExtent.xMinimum(), mExtent.yMinimum(), mExtent.xMaximum(), mExtent.yMinimum() + newHeight );
|
||||
mCacheUpdated = false;
|
||||
|
||||
if ( mPreviewMode != Rectangle )
|
||||
{
|
||||
cache();
|
||||
}
|
||||
updateBoundingRect();
|
||||
update();
|
||||
emit itemChanged();
|
||||
@ -513,6 +510,7 @@ void QgsComposerMap::setNewExtent( const QgsRectangle& extent )
|
||||
double newHeight = currentRect.width() * extent.height() / extent.width();
|
||||
|
||||
setSceneRect( QRectF( transform().dx(), transform().dy(), currentRect.width(), newHeight ) );
|
||||
updateItem();
|
||||
}
|
||||
|
||||
void QgsComposerMap::setNewScale( double scaleDenominator )
|
||||
@ -533,6 +531,12 @@ void QgsComposerMap::setNewScale( double scaleDenominator )
|
||||
emit extentChanged();
|
||||
}
|
||||
|
||||
void QgsComposerMap::setPreviewMode( PreviewMode m )
|
||||
{
|
||||
mPreviewMode = m;
|
||||
emit itemChanged();
|
||||
}
|
||||
|
||||
void QgsComposerMap::setOffset( double xOffset, double yOffset )
|
||||
{
|
||||
mXOffset = xOffset;
|
||||
@ -543,6 +547,16 @@ void QgsComposerMap::setMapRotation( double r )
|
||||
{
|
||||
setRotation( r );
|
||||
emit rotationChanged( r );
|
||||
emit itemChanged();
|
||||
}
|
||||
|
||||
void QgsComposerMap::updateItem()
|
||||
{
|
||||
if ( mPreviewMode != QgsComposerMap::Rectangle && !mCacheUpdated )
|
||||
{
|
||||
cache();
|
||||
}
|
||||
QgsComposerItem::updateItem();
|
||||
}
|
||||
|
||||
bool QgsComposerMap::containsWMSLayer() const
|
||||
|
@ -125,8 +125,8 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
|
||||
/**Sets new Extent and changes width, height (and implicitely also scale)*/
|
||||
void setNewExtent( const QgsRectangle& extent );
|
||||
|
||||
PreviewMode previewMode() {return mPreviewMode;}
|
||||
void setPreviewMode( PreviewMode m ) {mPreviewMode = m;}
|
||||
PreviewMode previewMode() const {return mPreviewMode;}
|
||||
void setPreviewMode( PreviewMode m );
|
||||
|
||||
/**Getter for flag that determines if the stored layer set should be used or the current layer set of the qgis mapcanvas
|
||||
@note this function was added in version 1.2*/
|
||||
@ -254,6 +254,8 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
|
||||
|
||||
void setMapRotation( double r );
|
||||
|
||||
void updateItem();
|
||||
|
||||
/**Sets canvas pointer (necessary to query and draw map canvas items)*/
|
||||
void setMapCanvas( QGraphicsView* canvas ) { mMapCanvas = canvas; }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user