~ubuntu-branches/ubuntu/hardy/qgis/hardy

« back to all changes in this revision

Viewing changes to plugins/spit/qgsmessageviewerbase.cpp

  • Committer: Bazaar Package Importer
  • Author(s): William Grant
  • Date: 2007-05-06 13:42:32 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20070506134232-pyli6t388w5asd8x
Tags: 0.8.0-3ubuntu1
* Merge from Debian unstable. Remaining Ubuntu changes:
  - debian/rules, debian/qgis.install, debian/qgis.dirs debian/qgis.desktop:
    Add and install .desktop.
* debian/qgis.desktop: Remove Applications category; it's not real.
* Modify Maintainer value to match Debian-Maintainer-Field Spec

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/****************************************************************************
2
 
** Form implementation generated from reading ui file 'qgsmessageviewerbase.ui'
3
 
**
4
 
** Created: Fri Nov 4 14:21:28 2005
5
 
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.4   edited Nov 24 2003 $)
6
 
**
7
 
** WARNING! All changes made in this file will be lost!
8
 
****************************************************************************/
9
 
 
10
 
#include "qgsmessageviewerbase.h"
11
 
 
12
 
#include <qvariant.h>
13
 
#include <qtextedit.h>
14
 
#include <qpushbutton.h>
15
 
#include <qlayout.h>
16
 
#include <qtooltip.h>
17
 
#include <qwhatsthis.h>
18
 
 
19
 
/*
20
 
 *  Constructs a QgsMessageViewerBase as a child of 'parent', with the
21
 
 *  name 'name' and widget flags set to 'f'.
22
 
 *
23
 
 *  The dialog will by default be modeless, unless you set 'modal' to
24
 
 *  TRUE to construct a modal dialog.
25
 
 */
26
 
QgsMessageViewerBase::QgsMessageViewerBase( QWidget* parent, const char* name, bool modal, WFlags fl )
27
 
    : QDialog( parent, name, modal, fl )
28
 
{
29
 
    if ( !name )
30
 
        setName( "QgsMessageViewerBase" );
31
 
    setAcceptDrops( FALSE );
32
 
    QgsMessageViewerBaseLayout = new QGridLayout( this, 1, 1, 11, 6, "QgsMessageViewerBaseLayout"); 
33
 
 
34
 
    txtMessage = new QTextEdit( this, "txtMessage" );
35
 
    txtMessage->setReadOnly( TRUE );
36
 
 
37
 
    QgsMessageViewerBaseLayout->addMultiCellWidget( txtMessage, 0, 0, 0, 2 );
38
 
 
39
 
    btnClose = new QPushButton( this, "btnClose" );
40
 
 
41
 
    QgsMessageViewerBaseLayout->addWidget( btnClose, 1, 1 );
42
 
    spacer1 = new QSpacerItem( 191, 31, QSizePolicy::Expanding, QSizePolicy::Minimum );
43
 
    QgsMessageViewerBaseLayout->addItem( spacer1, 1, 0 );
44
 
    languageChange();
45
 
    resize( QSize(499, 285).expandedTo(minimumSizeHint()) );
46
 
    clearWState( WState_Polished );
47
 
 
48
 
    // signals and slots connections
49
 
    connect( btnClose, SIGNAL( clicked() ), this, SLOT( reject() ) );
50
 
}
51
 
 
52
 
/*
53
 
 *  Destroys the object and frees any allocated resources
54
 
 */
55
 
QgsMessageViewerBase::~QgsMessageViewerBase()
56
 
{
57
 
    // no need to delete child widgets, Qt does it all for us
58
 
}
59
 
 
60
 
/*
61
 
 *  Sets the strings of the subwidgets using the current
62
 
 *  language.
63
 
 */
64
 
void QgsMessageViewerBase::languageChange()
65
 
{
66
 
    setCaption( tr( "SPIT Message" ) );
67
 
    btnClose->setText( tr( "Close" ) );
68
 
}
69
 
 
70
 
void QgsMessageViewerBase::setMessage(QString)
71
 
{
72
 
    qWarning( "QgsMessageViewerBase::setMessage(QString): Not implemented yet" );
73
 
}
74