[go: up one dir, main page]

File: totoolsettingui.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 (99 lines) | stat: -rw-r--r-- 3,135 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
/****************************************************************************
** Form implementation generated from reading ui file 'totoolsettingui.ui'
**
** Created: Mon Feb 20 12:46:42 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 "totoolsettingui.h"

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

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

    Enabled = new QListView( this, "Enabled" );
    Enabled->addColumn( tr( "Tool" ) );
    Enabled->setSelectionMode( QListView::Multi );

    toToolSettingUILayout->addWidget( Enabled, 2, 0 );

    DefaultTool = new QComboBox( FALSE, this, "DefaultTool" );

    toToolSettingUILayout->addWidget( DefaultTool, 4, 0 );

    TextLabel2 = new QLabel( this, "TextLabel2" );

    toToolSettingUILayout->addWidget( TextLabel2, 3, 0 );

    TextLabel1 = new QLabel( this, "TextLabel1" );

    toToolSettingUILayout->addWidget( TextLabel1, 1, 0 );

    TextLabel3 = new QLabel( this, "TextLabel3" );
    QFont TextLabel3_font(  TextLabel3->font() );
    TextLabel3_font.setBold( TRUE );
    TextLabel3->setFont( TextLabel3_font ); 
    TextLabel3->setAlignment( int( QLabel::AlignCenter ) );

    toToolSettingUILayout->addWidget( TextLabel3, 0, 0 );
    languageChange();
    resize( QSize(592, 480).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( Enabled, SIGNAL( selectionChanged() ), this, SLOT( changeEnable() ) );

    // tab order
    setTabOrder( Enabled, DefaultTool );

    // buddies
    TextLabel2->setBuddy( DefaultTool );
    TextLabel1->setBuddy( Enabled );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void toToolSettingUI::languageChange()
{
    setCaption( tr( "Form1" ) );
    Enabled->header()->setLabel( 0, tr( "Tool" ) );
    TextLabel2->setText( tr( "&Default tool" ) );
    QToolTip::add( TextLabel2, tr( "Select the default tool to pop up when opening a new connection." ) );
    TextLabel1->setText( tr( "&Enabled tools" ) );
    QToolTip::add( TextLabel1, tr( "Select which tools should show up in the menu and toolbar." ) );
    TextLabel3->setText( tr( "You must restart for any of these changes to have effect." ) );
}

void toToolSettingUI::changeEnable()
{
    qWarning( "toToolSettingUI::changeEnable(): Not implemented yet" );
}