mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-26 00:02:08 -05:00
set paper orientation in printer dialog from composition
git-svn-id: http://svn.osgeo.org/qgis/trunk@3045 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
870da8403e
commit
fe2b170ed0
@ -226,7 +226,12 @@ void QgsComposer::print(void)
|
||||
mPrinter->setFullPage ( true );
|
||||
mPrinter->setOutputToFile (true ) ;
|
||||
mPrinter->setOutputFileName ( QDir::convertSeparators ( QDir::home().path() + "/" + "qgis.eps") );
|
||||
mPrinter->setOrientation ( QPrinter::Landscape );
|
||||
|
||||
if ( mComposition->paperOrientation() == QgsComposition::Portrait ) {
|
||||
mPrinter->setOrientation ( QPrinter::Portrait );
|
||||
} else {
|
||||
mPrinter->setOrientation ( QPrinter::Landscape );
|
||||
}
|
||||
mPrinter->setColorMode ( QPrinter::Color );
|
||||
mPrinter->setPageSize ( QPrinter::A4 );
|
||||
}
|
||||
|
@ -550,6 +550,8 @@ double QgsComposition::paperWidth ( void ) { return mPaperWidth; }
|
||||
|
||||
double QgsComposition::paperHeight ( void ) { return mPaperHeight; }
|
||||
|
||||
int QgsComposition::paperOrientation ( void ) { return mPaperOrientation; }
|
||||
|
||||
int QgsComposition::resolution ( void ) { return mResolution; }
|
||||
|
||||
int QgsComposition::scale( void ) {
|
||||
|
@ -104,6 +104,9 @@ public:
|
||||
|
||||
/** \brief Get paper height */
|
||||
double paperHeight ( void );
|
||||
|
||||
/** \brief Get paper orientation */
|
||||
int paperOrientation ( void );
|
||||
|
||||
/** \brief Get resolutin */
|
||||
int resolution ( void );
|
||||
|
Loading…
x
Reference in New Issue
Block a user