Skip to content
Permalink
Browse files

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
  • Loading branch information
g_j_m
g_j_m committed Dec 1, 2006
1 parent 9ca4093 commit f3d2a25fb17cdf6c74194b9e1605e37de681f60e
Showing with 55 additions and 19 deletions.
  1. +1 −0 resources/context_help/contextids.txt
  2. +13 −0 src/composer/qgscomposer.cpp
  3. +10 −0 src/composer/qgscomposer.h
  4. +31 −19 src/ui/qgscomposerbase.ui
@@ -10,3 +10,4 @@
1033030847_en_US QgsDelimitedTextPluginGui
863656587_en_US QgsMapserverExport
94000531_en_US QgsVectorLayerProperties
1212121212_en_US QgsComposer
@@ -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
@@ -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 @@ public slots:

//! Layout
QGridLayout *mItemOptionsLayout;

//! Help context id
static const int context_id = 1212121212; // CHANGE ME PLEASE GARY :)

};

#endif
@@ -1,15 +1,12 @@
<ui version="4.0" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>QgsComposerBase</class>
<widget class="QMainWindow" name="QgsComposerBase" >
<property name="geometry" >
<rect>
<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>

0 comments on commit f3d2a25

Please sign in to comment.
You can’t perform that action at this time.