mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Add size grip so Composer window can be resized by Mac OS X. Also delete rather than hide the status bar since it isn't used at all.
The size grip was previously provided by the status bar which was recently hidden to make room for buttons. git-svn-id: http://svn.osgeo.org/qgis/trunk@6283 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
7c5e9af681
commit
ec8f060c1f
@ -40,6 +40,7 @@
|
||||
#include <QToolBar>
|
||||
#include <QImageWriter>
|
||||
#include <QCheckBox>
|
||||
#include <QSizeGrip>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
@ -74,6 +75,11 @@ QgsComposer::QgsComposer( QgisApp *qgis): QMainWindow()
|
||||
mComposition = new QgsComposition( this, 1 );
|
||||
mComposition->setActive ( true );
|
||||
|
||||
// Create size grip (needed by Mac OS X for QMainWindow if QStatusBar is not visible)
|
||||
mSizeGrip = new QSizeGrip(this);
|
||||
mSizeGrip->resize(mSizeGrip->sizeHint());
|
||||
mSizeGrip->move(rect().bottomRight() - mSizeGrip->rect().bottomRight());
|
||||
|
||||
if ( ! connect( mQgis, SIGNAL( projectRead() ), this, SLOT( projectRead()) ) ) {
|
||||
qDebug( "unable to connect to projectRead" );
|
||||
}
|
||||
@ -87,8 +93,6 @@ QgsComposer::QgsComposer( QgisApp *qgis): QMainWindow()
|
||||
restoreWindowState();
|
||||
|
||||
selectItem(); // Set selection tool
|
||||
|
||||
statusBar()->setHidden(true);
|
||||
}
|
||||
|
||||
QgsComposer::~QgsComposer()
|
||||
@ -858,7 +862,14 @@ void QgsComposer::on_mActionAddImage_activated(void)
|
||||
}
|
||||
|
||||
void QgsComposer::moveEvent ( QMoveEvent *e ) { saveWindowState(); }
|
||||
void QgsComposer::resizeEvent ( QResizeEvent *e ) { saveWindowState(); }
|
||||
|
||||
void QgsComposer::resizeEvent ( QResizeEvent *e )
|
||||
{
|
||||
// Move size grip when window is resized
|
||||
mSizeGrip->move(rect().bottomRight() - mSizeGrip->rect().bottomRight());
|
||||
|
||||
saveWindowState();
|
||||
}
|
||||
|
||||
void QgsComposer::saveWindowState()
|
||||
{
|
||||
|
@ -31,6 +31,7 @@ class QDomDocument;
|
||||
class QMoveEvent;
|
||||
class QResizeEvent;
|
||||
class QFile;
|
||||
class QSizeGrip;
|
||||
|
||||
/* The constructor creates empty composer, without compositions and mFirstTime set to true.
|
||||
* - if signal projectRead() is recieved all old compositions are deleted and
|
||||
@ -193,6 +194,9 @@ private:
|
||||
//! Layout
|
||||
QGridLayout *mItemOptionsLayout;
|
||||
|
||||
//! Size grip
|
||||
QSizeGrip *mSizeGrip;
|
||||
|
||||
//! Help context id
|
||||
static const int context_id = 985715179;
|
||||
|
||||
|
@ -52,6 +52,7 @@
|
||||
#include <QProgressBar>
|
||||
#include <QSettings>
|
||||
#include <QSplashScreen>
|
||||
#include <QStatusBar>
|
||||
#include <QStringList>
|
||||
#include <QTcpSocket>
|
||||
#include <QTextStream>
|
||||
|
@ -221,7 +221,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusbar" />
|
||||
<widget class="QToolBar" name="toolBar" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
|
Loading…
x
Reference in New Issue
Block a user