added line style icons. todo: use line style and pattern icons also in the renderer dialogs

git-svn-id: http://svn.osgeo.org/qgis/trunk@646 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
mhugent 2004-01-30 10:35:34 +00:00
parent 17e12153ef
commit ee5d6ac313
4 changed files with 111 additions and 54 deletions

View File

@ -1374,7 +1374,7 @@ void QgisApp::helpContents(){
// find the installed location of the help files
// open index.html using browser
helpViewer = new QgsHelpViewer(this,"helpviewer",false);
helpViewer->showContent(appDir +"/share/doc","index.html");
//helpViewer->showContent(appDir +"/share/doc","index.html");
helpViewer->show();
}
/** Get a pointer to the currently selected map layer */

View File

@ -1,22 +1,11 @@
/***************************************************************************
qgshelpviewer.cpp
Simple help browser
-------------------
begin : 2004-01-28
copyright : (C) 2004 by Gary E.Sherman
email : sherman at mrcc.com
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
/* $Id$ */
/****************************************************************************
** Form implementation generated from reading ui file 'qgshelpviewer.ui'
**
** Created: Fre Jan 30 07:58:59 2004
** by: The User Interface Compiler ($Id$)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "qgshelpviewer.h"
@ -27,10 +16,40 @@
#include <qtooltip.h>
#include <qwhatsthis.h>
/*
* Constructs a QgsHelpViewer as a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
QgsHelpViewer::QgsHelpViewer( QWidget* parent, const char* name, bool modal, WFlags fl )
: QgsHelpViewerBase( parent, name, modal, fl )
: QDialog( parent, name, modal, fl )
{
if ( !name )
setName( "QgsHelpViewer" );
setSizeGripEnabled( TRUE );
QgsHelpViewerLayout = new QGridLayout( this, 1, 1, 2, 0, "QgsHelpViewerLayout");
Layout1 = new QHBoxLayout( 0, 0, 6, "Layout1");
Horizontal_Spacing2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
Layout1->addItem( Horizontal_Spacing2 );
buttonCancel = new QPushButton( this, "buttonCancel" );
buttonCancel->setAutoDefault( TRUE );
Layout1->addWidget( buttonCancel );
QgsHelpViewerLayout->addLayout( Layout1, 1, 0 );
textBrowser = new QTextBrowser( this, "textBrowser" );
QgsHelpViewerLayout->addWidget( textBrowser, 0, 0 );
languageChange();
resize( QSize(511, 574).expandedTo(minimumSizeHint()) );
clearWState( WState_Polished );
// signals and slots connections
connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
}
/*
@ -40,8 +59,15 @@ QgsHelpViewer::~QgsHelpViewer()
{
// no need to delete child widgets, Qt does it all for us
}
void QgsHelpViewer::showContent(QString path, QString doc){
textBrowser->mimeSourceFactory()->addFilePath(path);
textBrowser->setSource(doc);
/*
* Sets the strings of the subwidgets using the current
* language.
*/
void QgsHelpViewer::languageChange()
{
setCaption( tr( "QGIS Help" ) );
buttonCancel->setText( tr( "&Close" ) );
buttonCancel->setAccel( QKeySequence( tr( "Alt+C" ) ) );
}

View File

@ -1,21 +1,11 @@
/***************************************************************************
qgshelpviewer.h
Simple help browser
-------------------
begin : 2004-01-28
copyright : (C) 2004 by Gary E.Sherman
email : sherman at mrcc.com
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
/* $Id$ */
/****************************************************************************
** Form interface generated from reading ui file 'qgshelpviewer.ui'
**
** Created: Fre Jan 30 07:57:36 2004
** by: The User Interface Compiler ($Id$)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#ifndef QGSHELPVIEWER_H
#define QGSHELPVIEWER_H
@ -26,19 +16,28 @@
class QVBoxLayout;
class QHBoxLayout;
class QGridLayout;
class QSpacerItem;
class QPushButton;
class QTextBrowser;
class QString;
#include "qgshelpviewerbase.h"
class QgsHelpViewer : public QgsHelpViewerBase
class QgsHelpViewer : public QDialog
{
Q_OBJECT
public:
QgsHelpViewer( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~QgsHelpViewer();
void showContent(QString path, QString doc);
QPushButton* buttonCancel;
QTextBrowser* textBrowser;
protected:
QGridLayout* QgsHelpViewerLayout;
QHBoxLayout* Layout1;
QSpacerItem* Horizontal_Spacing2;
protected slots:
virtual void languageChange();
};

View File

@ -8,8 +8,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>354</width>
<height>219</height>
<width>327</width>
<height>242</height>
</rect>
</property>
<property name="caption">
@ -38,7 +38,10 @@
<cstring>solid</cstring>
</property>
<property name="text">
<string>solid</string>
<string></string>
</property>
<property name="pixmap">
<pixmap>image0</pixmap>
</property>
<property name="toggleButton">
<bool>true</bool>
@ -49,7 +52,10 @@
<cstring>dash</cstring>
</property>
<property name="text">
<string>dash</string>
<string></string>
</property>
<property name="pixmap">
<pixmap>image1</pixmap>
</property>
<property name="toggleButton">
<bool>true</bool>
@ -60,7 +66,10 @@
<cstring>dot</cstring>
</property>
<property name="text">
<string>dot</string>
<string></string>
</property>
<property name="pixmap">
<pixmap>image2</pixmap>
</property>
<property name="toggleButton">
<bool>true</bool>
@ -71,7 +80,10 @@
<cstring>dashdot</cstring>
</property>
<property name="text">
<string>dashdot</string>
<string></string>
</property>
<property name="pixmap">
<pixmap>image3</pixmap>
</property>
<property name="toggleButton">
<bool>true</bool>
@ -82,7 +94,10 @@
<cstring>dashdotdot</cstring>
</property>
<property name="text">
<string>dashdotdot</string>
<string></string>
</property>
<property name="pixmap">
<pixmap>image4</pixmap>
</property>
<property name="toggleButton">
<bool>true</bool>
@ -142,5 +157,22 @@
</widget>
</grid>
</widget>
<images>
<image name="image0">
<data format="XPM.GZ" length="1762">789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade65232335030325330513054d2e1524a544856f0cbcf4b05b19591d87a48ec24205bd90008924dc152cae443b0957ae4c351fb47ed4fa2000c07fd031dfea3f68fda3f60f6d75a7301002beea187</data>
</image>
<image name="image1">
<data format="XPM.GZ" length="1762">789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade65232335030325330513054d2e1524a544856f0cbcf4b05b19591d87a48ec24205bd90008924dc152cae443b0957ae4c351fb47eda7d4fe242400361559006c0b6e15e8fac1a6220b806dc1ad6230d83fd0e13f6affa8fd64db5f6bcd0500ea7197ed</data>
</image>
<image name="image2">
<data format="XPM.GZ" length="1762">789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade65232335030325330513054d2e1524a544856f0cbcf4b05b19591d87a48ec24205bd90008924dc152cae443b0957ae4c351fb47eda7d4fe24200099450e0dd30f328b1c7a30d83fd0e13f6affa8fd64db5f6bcd0500a41b8f27</data>
</image>
<image name="image3">
<data format="XPM.GZ" length="1762">789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade65232335030325330513054d2e1524a544856f0cbcf4b05b19591d87a48ec24205bd90008924dc152cae443b0957ae4c351fb47eda7d4fe24240032139926248eae1f6426324d487c30d83fd0e13f6affa8fd64db5f6bcd0500f2ce9707</data>
</image>
<image name="image4">
<data format="XPM.GZ" length="1777">789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade65232335030325330553054d2e1524a544856f0cbcf4b05b19591d87a486ca0190aca0640906c0ae22681b869600056a94c3e04bb408f7c386affa8fd49140070ea46022033b1d1b8e4d1f583fc848dc6253f18ec1feaf13f6aff08b6bfd69a0b00d61fa689</data>
</image>
</images>
<layoutdefaults spacing="6" margin="11"/>
</UI>