[go: up one dir, main page]

File: toaboutui.cpp

package info (click to toggle)
tora 1.3.23-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 15,984 kB
  • ctags: 14,460
  • sloc: cpp: 123,554; sh: 16,181; makefile: 966; xml: 69
file content (78 lines) | stat: -rw-r--r-- 2,364 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/****************************************************************************
** Form implementation generated from reading ui file 'toaboutui.ui'
**
** Created by: The User Interface Compiler ($Id: qt/main.cpp   3.3.6   edited Aug 31 2005 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "toaboutui.h"

#include <qvariant.h>
#include <qtextview.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>

/*
 *  Constructs a toAboutUI 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.
 */
toAboutUI::toAboutUI( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "toAboutUI" );
    toAboutUILayout = new QGridLayout( this, 1, 1, 11, 6, "toAboutUILayout"); 

    TextView = new QTextView( this, "TextView" );
    TextView->setTextFormat( QTextView::RichText );

    toAboutUILayout->addMultiCellWidget( TextView, 0, 0, 0, 3 );

    OkButton = new QPushButton( this, "OkButton" );
    OkButton->setDefault( TRUE );

    toAboutUILayout->addWidget( OkButton, 1, 2 );

    CancelButton = new QPushButton( this, "CancelButton" );

    toAboutUILayout->addWidget( CancelButton, 1, 3 );
    Spacer1 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    toAboutUILayout->addItem( Spacer1, 1, 1 );
    languageChange();
    resize( QSize(475, 400).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( OkButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
    connect( CancelButton, SIGNAL( clicked() ), this, SLOT( reject() ) );

    // tab order
    setTabOrder( TextView, OkButton );
    setTabOrder( OkButton, CancelButton );
}

/*
 *  Destroys the object and frees any allocated resources
 */
toAboutUI::~toAboutUI()
{
    // no need to delete child widgets, Qt does it all for us
}

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void toAboutUI::languageChange()
{
    setCaption( tr( "toAboutUI" ) );
    OkButton->setText( tr( "&Ok" ) );
    CancelButton->setText( tr( "Cancel" ) );
}