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