[go: up one dir, main page]

File: tohelpsetupui.cpp

package info (click to toggle)
tora 1.3.21-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 14,252 kB
  • ctags: 10,397
  • sloc: cpp: 108,822; sh: 10,861; makefile: 766; xml: 69; perl: 6
file content (108 lines) | stat: -rw-r--r-- 3,959 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/****************************************************************************
** Form implementation generated from reading ui file 'tohelpsetupui.ui'
**
** Created: Mon Feb 20 12:46:40 2006
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.4   edited Nov 24 2003 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "tohelpsetupui.h"

#include <qvariant.h>
#include <qheader.h>
#include <qlistview.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>

/*
 *  Constructs a toHelpSetupUI as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
toHelpSetupUI::toHelpSetupUI( QWidget* parent, const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    if ( !name )
	setName( "toHelpSetupUI" );
    toHelpSetupUILayout = new QGridLayout( this, 1, 1, 0, 6, "toHelpSetupUILayout"); 

    FileList = new QListView( this, "FileList" );
    FileList->addColumn( tr( "Title" ) );
    FileList->addColumn( tr( "Filename" ) );
    FileList->setAllColumnsShowFocus( TRUE );

    toHelpSetupUILayout->addMultiCellWidget( FileList, 0, 0, 0, 4 );

    AddButton = new QPushButton( this, "AddButton" );
    AddButton->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, AddButton->sizePolicy().hasHeightForWidth() ) );

    toHelpSetupUILayout->addWidget( AddButton, 1, 4 );
    Spacer2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    toHelpSetupUILayout->addItem( Spacer2, 1, 3 );

    RemoveButton = new QPushButton( this, "RemoveButton" );
    RemoveButton->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, RemoveButton->sizePolicy().hasHeightForWidth() ) );

    toHelpSetupUILayout->addWidget( RemoveButton, 1, 0 );

    AddOracle = new QPushButton( this, "AddOracle" );
    AddOracle->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, AddOracle->sizePolicy().hasHeightForWidth() ) );

    toHelpSetupUILayout->addWidget( AddOracle, 1, 2 );
    Spacer2_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    toHelpSetupUILayout->addItem( Spacer2_2, 1, 1 );
    languageChange();
    resize( QSize(506, 448).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( AddButton, SIGNAL( clicked() ), this, SLOT( addFile() ) );
    connect( RemoveButton, SIGNAL( clicked() ), this, SLOT( delFile() ) );
    connect( AddOracle, SIGNAL( clicked() ), this, SLOT( oracleManuals() ) );

    // tab order
    setTabOrder( FileList, AddButton );
    setTabOrder( AddButton, RemoveButton );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void toHelpSetupUI::languageChange()
{
    setCaption( tr( "Form1" ) );
    QToolTip::add( this, tr( "Add manuals from an Oracle index page." ) );
    QWhatsThis::add( this, tr( "Add manuals from an Oracle index page. This is the index page that links to the actual manuals. Not the master index page that links to different categories of manuals." ) );
    FileList->header()->setLabel( 0, tr( "Title" ) );
    FileList->header()->setLabel( 1, tr( "Filename" ) );
    AddButton->setText( tr( "&Add Manual" ) );
    RemoveButton->setText( tr( "&Remove Manual" ) );
    AddOracle->setText( tr( "&Oracle Manuals" ) );
}

void toHelpSetupUI::addFile()
{
    qWarning( "toHelpSetupUI::addFile(): Not implemented yet" );
}

void toHelpSetupUI::delFile()
{
    qWarning( "toHelpSetupUI::delFile(): Not implemented yet" );
}

void toHelpSetupUI::oracleManuals()
{
    qWarning( "toHelpSetupUI::oracleManuals(): Not implemented yet" );
}