added about dialog

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@92 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
gsherman 2002-08-10 15:55:43 +00:00
parent 981fb56ea4
commit d4e9af7182
6 changed files with 326 additions and 9 deletions

View File

@ -1,6 +1,6 @@
#############################################################################
# Makefile for building: qgis
# Generated by qmake (1.03a) on: Fri Aug 9 07:30:20 2002
# Generated by qmake (1.03a) on: Sat Aug 10 07:25:33 2002
# Project: src.pro
# Template: app
# Command: $(QMAKE) src.pro
@ -95,19 +95,23 @@ OBJECTS = main.o \
qgsdbsourceselectbase.o \
qgisappbase.o \
qgsnewconnectionbase.o \
qgslegenditembase.o
qgslegenditembase.o \
qgsabout.o
FORMS = qgsdbsourceselectbase.ui \
qgisappbase.ui \
qgsnewconnectionbase.ui \
qgslegenditembase.ui
qgslegenditembase.ui \
qgsabout.ui
UICDECLS = qgsdbsourceselectbase.h \
qgisappbase.h \
qgsnewconnectionbase.h \
qgslegenditembase.h
qgslegenditembase.h \
qgsabout.h
UICIMPLS = qgsdbsourceselectbase.cpp \
qgisappbase.cpp \
qgsnewconnectionbase.cpp \
qgslegenditembase.cpp
qgslegenditembase.cpp \
qgsabout.cpp
SRCMOC = moc_qgisapp.cpp \
moc_qgsdatabaselayer.cpp \
moc_qgsmapcanvas.cpp \
@ -118,7 +122,8 @@ SRCMOC = moc_qgisapp.cpp \
moc_qgsdbsourceselectbase.cpp \
moc_qgisappbase.cpp \
moc_qgsnewconnectionbase.cpp \
moc_qgslegenditembase.cpp
moc_qgslegenditembase.cpp \
moc_qgsabout.cpp
OBJMOC = moc_qgisapp.o \
moc_qgsdatabaselayer.o \
moc_qgsmapcanvas.o \
@ -129,7 +134,8 @@ OBJMOC = moc_qgisapp.o \
moc_qgsdbsourceselectbase.o \
moc_qgisappbase.o \
moc_qgsnewconnectionbase.o \
moc_qgslegenditembase.o
moc_qgslegenditembase.o \
moc_qgsabout.o
DIST = src.pro
QMAKE_TARGET = qgis
DESTDIR =
@ -173,7 +179,7 @@ qmake:
@$(QMAKE) src.pro
dist:
@mkdir -p .tmp/qgis && $(COPY_FILE) --parents $(SOURCES) $(HEADERS) $(FORMS) $(DIST) .tmp/qgis/ && $(COPY_FILE) --parents qgsdbsourceselectbase.ui.h qgisappbase.ui.h .tmp/qgis/ && ( cd `dirname .tmp/qgis` && $(TAR) qgis.tar qgis && $(GZIP) qgis.tar ) && $(MOVE) `dirname .tmp/qgis`/qgis.tar.gz . && $(DEL_DIR) .tmp/qgis
@mkdir -p .tmp/qgis && $(COPY_FILE) --parents $(SOURCES) $(HEADERS) $(FORMS) $(DIST) .tmp/qgis/ && $(COPY_FILE) --parents qgsdbsourceselectbase.ui.h qgisappbase.ui.h qgsabout.ui.h .tmp/qgis/ && ( cd `dirname .tmp/qgis` && $(TAR) qgis.tar qgis && $(GZIP) qgis.tar ) && $(MOVE) `dirname .tmp/qgis`/qgis.tar.gz . && $(DEL_DIR) .tmp/qgis
mocclean:
-$(DEL_FILE) $(OBJMOC)
@ -317,6 +323,12 @@ qgslegenditembase.h: qgslegenditembase.ui
qgslegenditembase.cpp: qgslegenditembase.h qgslegenditembase.ui
$(UIC) qgslegenditembase.ui -i qgslegenditembase.h -o qgslegenditembase.cpp
qgsabout.h: qgsabout.ui
$(UIC) qgsabout.ui -o qgsabout.h
qgsabout.cpp: qgsabout.h qgsabout.ui
$(UIC) qgsabout.ui -i qgsabout.h -o qgsabout.cpp
qgsdbsourceselectbase.o: qgsdbsourceselectbase.cpp qgsdbsourceselectbase.ui.h \
qgsdbsourceselectbase.h
@ -327,6 +339,9 @@ qgsnewconnectionbase.o: qgsnewconnectionbase.cpp qgsnewconnectionbase.h
qgslegenditembase.o: qgslegenditembase.cpp qgslegenditembase.h
qgsabout.o: qgsabout.cpp qgsabout.ui.h \
qgsabout.h
moc_qgisapp.o: moc_qgisapp.cpp qgisapp.h qgisappbase.h
moc_qgsdatabaselayer.o: moc_qgsdatabaselayer.cpp qgsdatabaselayer.h qgsmaplayer.h \
@ -365,6 +380,8 @@ moc_qgsnewconnectionbase.o: moc_qgsnewconnectionbase.cpp qgsnewconnectionbase.h
moc_qgslegenditembase.o: moc_qgslegenditembase.cpp qgslegenditembase.h
moc_qgsabout.o: moc_qgsabout.cpp qgsabout.h
moc_qgisapp.cpp: $(MOC) qgisapp.h
$(MOC) qgisapp.h -o moc_qgisapp.cpp
@ -398,6 +415,9 @@ moc_qgsnewconnectionbase.cpp: $(MOC) qgsnewconnectionbase.h
moc_qgslegenditembase.cpp: $(MOC) qgslegenditembase.h
$(MOC) qgslegenditembase.h -o moc_qgslegenditembase.cpp
moc_qgsabout.cpp: $(MOC) qgsabout.h
$(MOC) qgsabout.h -o moc_qgsabout.cpp
####### Install
install: all

View File

@ -44,6 +44,7 @@
#include "qgsdbsourceselect.h"
#include "qgsdatabaselayer.h"
#include "qgsshapefilelayer.h"
#include "qgsabout.h"
#include "qgis.h"
#include "qgisapp.h"
#include "xpm/qgis.xpm"
@ -86,6 +87,24 @@ QgisApp::QgisApp (QWidget * parent, const char *name,
QgisApp::~QgisApp ()
{
}
void QgisApp::about(){
QgsAbout *abt = new QgsAbout();
QString versionString = "Version ";
versionString += QGis::qgisVersion;
abt->setVersion(versionString);
QString urls = "Web Page: http://qgis.sourceforge.net\nSourceforge Project Page: http://sourceforge.net/projects/qgis";
abt->setURLs(urls);
QString watsNew = "Version ";
watsNew += QGis::qgisVersion;
watsNew += "\n* Support for shapefiles and other vector formats\n"
"* Improved handling of extents when adding layers\n"
"* Primitive legend that allows control of layer visibility\n"
"* About Quantum GIS implemented\n"
"* Other internal changes";
abt->setWhatsNew(watsNew);
abt->exec();
}
void QgisApp::addLayer ()
{

View File

@ -61,6 +61,8 @@ public:
void drawLayers();
//! test function
void testButton();
//! About QGis
void about();
public slots:
void showMouseCoordinate(QgsPoint &);
private:

256
src/qgsabout.ui Normal file
View File

@ -0,0 +1,256 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>QgsAbout</class>
<widget class="QDialog">
<property name="name">
<cstring>QgsAbout</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>384</width>
<height>224</height>
</rect>
</property>
<property name="caption">
<string>About Quantum GIS</string>
</property>
<property name="sizeGripEnabled">
<bool>true</bool>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>7</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLayoutWidget" row="1" column="0">
<property name="name">
<cstring>Layout1</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<spacer>
<property name="name">
<cstring>Horizontal Spacing2</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
<widget class="QPushButton">
<property name="name">
<cstring>buttonCancel</cstring>
</property>
<property name="text">
<string>Ok</string>
</property>
<property name="accel">
<number>0</number>
</property>
<property name="autoDefault">
<bool>true</bool>
</property>
</widget>
</hbox>
</widget>
<widget class="QTabWidget" row="0" column="0">
<property name="name">
<cstring>tabWidget</cstring>
</property>
<widget class="QWidget">
<property name="name">
<cstring>Widget2</cstring>
</property>
<attribute name="title">
<string>About</string>
</attribute>
<widget class="QLabel">
<property name="name">
<cstring>lblVersion</cstring>
</property>
<property name="geometry">
<rect>
<x>35</x>
<y>40</y>
<width>286</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>Version</string>
</property>
<property name="alignment">
<set>AlignCenter</set>
</property>
</widget>
<widget class="QLabel">
<property name="name">
<cstring>TextLabel4</cstring>
</property>
<property name="geometry">
<rect>
<x>20</x>
<y>10</y>
<width>325</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>Quantum GIS (qgis)</string>
</property>
<property name="alignment">
<set>AlignCenter</set>
</property>
</widget>
<widget class="QTextEdit">
<property name="name">
<cstring>lblUrls</cstring>
</property>
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>15</x>
<y>75</y>
<width>330</width>
<height>70</height>
</rect>
</property>
<property name="maximumSize">
<size>
<width>32767</width>
<height>70</height>
</size>
</property>
<property name="paletteBackgroundColor">
<color>
<red>192</red>
<green>192</green>
<blue>192</blue>
</color>
</property>
<property name="backgroundOrigin">
<enum>WidgetOrigin</enum>
</property>
<property name="frameShape">
<enum>Panel</enum>
</property>
<property name="frameShadow">
<enum>Raised</enum>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</widget>
<widget class="QWidget">
<property name="name">
<cstring>Widget3</cstring>
</property>
<attribute name="title">
<string>What's New</string>
</attribute>
<widget class="QTextEdit">
<property name="name">
<cstring>txtWhatsNew</cstring>
</property>
<property name="geometry">
<rect>
<x>8</x>
<y>8</y>
<width>336</width>
<height>131</height>
</rect>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</widget>
<widget class="QWidget">
<property name="name">
<cstring>tabLicense</cstring>
</property>
<attribute name="title">
<string>License</string>
</attribute>
<widget class="QLabel">
<property name="name">
<cstring>TextLabel1</cstring>
</property>
<property name="geometry">
<rect>
<x>30</x>
<y>20</y>
<width>293</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Quantum GIS is licensed under the GNU General Public License</string>
</property>
</widget>
<widget class="QLabel">
<property name="name">
<cstring>TextLabel2</cstring>
</property>
<property name="geometry">
<rect>
<x>70</x>
<y>50</y>
<width>194</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>http://www.gnu.org/licenses</string>
</property>
<property name="alignment">
<set>AlignCenter</set>
</property>
</widget>
</widget>
</widget>
</grid>
</widget>
<connections>
<connection>
<sender>buttonCancel</sender>
<signal>clicked()</signal>
<receiver>QgsAbout</receiver>
<slot>reject()</slot>
</connection>
</connections>
<includes>
<include location="local" impldecl="in implementation">qgsabout.ui.h</include>
</includes>
<slots>
<slot>setVersion( QString v )</slot>
<slot>setURLs( QString urls )</slot>
<slot>setWhatsNew( QString txt )</slot>
</slots>
<layoutdefaults spacing="6" margin="11"/>
</UI>

16
src/qgsabout.ui.h Normal file
View File

@ -0,0 +1,16 @@
/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
** If you wish to add, delete or rename slots use Qt Designer which will
** update this file, preserving your code. Create an init() slot in place of
** a constructor, and a destroy() slot in place of a destructor.
*****************************************************************************/
void QgsAbout::setVersion(QString v){
lblVersion->setText(v) ;
}
void QgsAbout::setURLs(QString urls){
lblUrls->setText(urls);
}
void QgsAbout::setWhatsNew(QString txt){
txtWhatsNew->setText(txt);
}

View File

@ -30,7 +30,11 @@ HEADERS += qgsdbsourceselectbase.ui.h \
qgslegend.h \
qgslegenditem.h
INTERFACES += qgsdbsourceselectbase.ui qgisappbase.ui qgsnewconnectionbase.ui qgslegenditembase.ui
INTERFACES += qgsdbsourceselectbase.ui \
qgisappbase.ui \
qgsnewconnectionbase.ui \
qgslegenditembase.ui \
qgsabout.ui
SOURCES += main.cpp \
qgisapp.cpp \
qgsdatabaselayer.cpp \