Fix for ticket #404 (print composer needs a help button).

git-svn-id: http://svn.osgeo.org/qgis/trunk@6164 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
g_j_m 2006-12-01 09:27:40 +00:00
parent 9ca4093eb0
commit f3d2a25fb1
4 changed files with 55 additions and 19 deletions

View File

@ -10,3 +10,4 @@
1033030847_en_US QgsDelimitedTextPluginGui
863656587_en_US QgsMapserverExport
94000531_en_US QgsVectorLayerProperties
1212121212_en_US QgsComposer

View File

@ -23,6 +23,7 @@
#include "qgsexception.h"
#include "qgsproject.h"
#include "qgsmessageviewer.h"
#include "qgscontexthelp.h"
#include <QDesktopWidget>
#include <QFileDialog>
@ -86,6 +87,8 @@ QgsComposer::QgsComposer( QgisApp *qgis): QMainWindow()
restoreWindowState();
selectItem(); // Set selection tool
statusBar()->setHidden(true);
}
QgsComposer::~QgsComposer()
@ -839,6 +842,16 @@ void QgsComposer::restoreWindowState()
mSplitter->setSizes ( list );
}
void QgsComposer::on_helpPButton_clicked()
{
QgsContextHelp::run(context_id);
}
void QgsComposer::on_closePButton_clicked()
{
close();
}
void QgsComposer::projectRead(void)
{
#ifdef QGISDEBUG

View File

@ -146,6 +146,12 @@ public slots:
//! Save window state
void saveWindowState();
//! Slot for when the help button is clicked
void on_helpPButton_clicked();
//! Slot for when the close button is clicked
void on_closePButton_clicked();
private:
//! Set teh pixmap / icons on the toolbar buttons
void setupTheme();
@ -175,6 +181,10 @@ private:
//! Layout
QGridLayout *mItemOptionsLayout;
//! Help context id
static const int context_id = 1212121212; // CHANGE ME PLEASE GARY :)
};
#endif

View File

@ -1,7 +1,4 @@
<ui version="4.0" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>QgsComposerBase</class>
<widget class="QMainWindow" name="QgsComposerBase" >
<property name="geometry" >
@ -9,7 +6,7 @@
<x>0</x>
<y>0</y>
<width>800</width>
<height>600</height>
<height>609</height>
</rect>
</property>
<property name="windowTitle" >
@ -23,7 +20,7 @@
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="0" >
<item row="0" column="0" colspan="3" >
<widget class="QSplitter" name="mSplitter" >
<property name="sizePolicy" >
<sizepolicy>
@ -195,18 +192,36 @@
</widget>
</widget>
</item>
<item row="1" column="2" >
<widget class="QPushButton" name="closePButton" >
<property name="text" >
<string>Close</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QPushButton" name="helpPButton" >
<property name="text" >
<string>Help</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QStatusBar" name="statusbar" >
<property name="geometry" >
<rect>
<x>0</x>
<y>578</y>
<width>800</width>
<height>22</height>
</rect>
</property>
</widget>
<widget class="QStatusBar" name="statusbar" />
<widget class="QToolBar" name="toolBar" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
@ -227,7 +242,6 @@
<addaction name="separator" />
<addaction name="mActionAddNewMap" />
<addaction name="mActionAddNewLabel" />
<addaction name="mActionAddImage" />
<addaction name="mActionAddNewVectLegend" />
<addaction name="mActionAddNewScalebar" />
<addaction name="mActionSelectMoveItem" />
@ -353,14 +367,12 @@
</property>
</action>
</widget>
<pixmapfunction></pixmapfunction>
<customwidgets>
<customwidget>
<class>Q3Frame</class>
<extends></extends>
<extends>QFrame</extends>
<header>Qt3Support/Q3Frame</header>
<container>1</container>
<pixmap></pixmap>
</customwidget>
</customwidgets>
<tabstops>