Restored help viewer after accidental overwrite

git-svn-id: http://svn.osgeo.org/qgis/trunk@647 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
gsherman 2004-01-30 23:43:47 +00:00
parent ee5d6ac313
commit 4cf974d6bc
2 changed files with 47 additions and 73 deletions

View File

@ -1,13 +1,23 @@
/**************************************************************************** /***************************************************************************
** Form implementation generated from reading ui file 'qgshelpviewer.ui' qgshelpviewer.cpp
** Simple help browser
** Created: Fre Jan 30 07:58:59 2004 -------------------
** by: The User Interface Compiler ($Id$) begin : 2004-01-28
** copyright : (C) 2004 by Gary E.Sherman
** WARNING! All changes made in this file will be lost! 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$ */
#include "qgshelpviewer.h"
#include <qvariant.h> #include <qvariant.h>
#include <qpushbutton.h> #include <qpushbutton.h>
@ -15,41 +25,11 @@
#include <qlayout.h> #include <qlayout.h>
#include <qtooltip.h> #include <qtooltip.h>
#include <qwhatsthis.h> #include <qwhatsthis.h>
#include "qgshelpviewer.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 ) QgsHelpViewer::QgsHelpViewer( QWidget* parent, const char* name, bool modal, WFlags fl )
: QDialog( parent, name, modal, fl ) : QgsHelpViewerBase( 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() ) );
} }
/* /*
@ -59,15 +39,8 @@ QgsHelpViewer::~QgsHelpViewer()
{ {
// no need to delete child widgets, Qt does it all for us // no need to delete child widgets, Qt does it all for us
} }
void QgsHelpViewer::showContent(QString path, QString doc){
/* textBrowser->mimeSourceFactory()->addFilePath(path);
* Sets the strings of the subwidgets using the current textBrowser->setSource(doc);
* language.
*/
void QgsHelpViewer::languageChange()
{
setCaption( tr( "QGIS Help" ) );
buttonCancel->setText( tr( "&Close" ) );
buttonCancel->setAccel( QKeySequence( tr( "Alt+C" ) ) );
} }

View File

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