[go: up one dir, main page]

File: todebugwatch.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 (136 lines) | stat: -rw-r--r-- 4,699 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
/****************************************************************************
** Form implementation generated from reading ui file 'todebugwatch.ui'
**
** Created: Mon Feb 20 12:46:38 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 "todebugwatch.h"

#include <qvariant.h>
#include <qpushbutton.h>
#include <qcombobox.h>
#include <qlabel.h>
#include <qbuttongroup.h>
#include <qradiobutton.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>

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

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

    toDebugWatchUILayout->addWidget( PushButton1_2, 3, 1 );

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

    toDebugWatchUILayout->addWidget( PushButton1, 3, 0 );

    Name = new QComboBox( FALSE, this, "Name" );
    Name->setEditable( TRUE );
    Name->setDuplicatesEnabled( FALSE );

    toDebugWatchUILayout->addMultiCellWidget( Name, 2, 2, 0, 1 );

    TextLabel1 = new QLabel( this, "TextLabel1" );
    TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) );

    toDebugWatchUILayout->addMultiCellWidget( TextLabel1, 1, 1, 0, 1 );

    Scope = new QButtonGroup( this, "Scope" );
    Scope->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)7, 0, 0, Scope->sizePolicy().hasHeightForWidth() ) );
    Scope->setColumnLayout(0, Qt::Vertical );
    Scope->layout()->setSpacing( 6 );
    Scope->layout()->setMargin( 11 );
    ScopeLayout = new QGridLayout( Scope->layout() );
    ScopeLayout->setAlignment( Qt::AlignTop );

    GlobalScope = new QRadioButton( Scope, "GlobalScope" );
    Scope->insert( GlobalScope, 4 );

    ScopeLayout->addWidget( GlobalScope, 3, 0 );

    LocalScope = new QRadioButton( Scope, "LocalScope" );
    LocalScope->setChecked( FALSE );
    Scope->insert( LocalScope, 1 );

    ScopeLayout->addWidget( LocalScope, 1, 0 );

    LocalScope_2 = new QRadioButton( Scope, "LocalScope_2" );
    LocalScope_2->setChecked( TRUE );
    Scope->insert( LocalScope_2, 5 );

    ScopeLayout->addWidget( LocalScope_2, 0, 0 );

    Package = new QRadioButton( Scope, "Package" );
    Scope->insert( Package, 3 );

    ScopeLayout->addWidget( Package, 2, 0 );

    toDebugWatchUILayout->addMultiCellWidget( Scope, 0, 0, 0, 1 );
    languageChange();
    resize( QSize(188, 228).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

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

    // tab order
    setTabOrder( LocalScope_2, Name );
    setTabOrder( Name, PushButton1 );
    setTabOrder( PushButton1, PushButton1_2 );
    setTabOrder( PushButton1_2, LocalScope );
    setTabOrder( LocalScope, Package );
    setTabOrder( Package, GlobalScope );

    // buddies
    TextLabel1->setBuddy( Name );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void toDebugWatchUI::languageChange()
{
    setCaption( tr( "Add variable watch" ) );
    PushButton1_2->setText( tr( "Cancel" ) );
    PushButton1->setText( tr( "&Ok" ) );
    TextLabel1->setText( tr( "&Variable name" ) );
    QToolTip::add( TextLabel1, tr( "Variable name to watch." ) );
    Scope->setTitle( tr( "&Scope" ) );
    GlobalScope->setText( tr( "&Global" ) );
    QToolTip::add( GlobalScope, tr( "Global scope of variable." ) );
    LocalScope->setText( tr( "&Local" ) );
    QToolTip::add( LocalScope, tr( "Currently running scope." ) );
    LocalScope_2->setText( tr( "&Autodetect" ) );
    QToolTip::add( LocalScope_2, tr( "Currently running scope." ) );
    Package->setText( tr( "&Package" ) );
    QToolTip::add( Package, tr( "The scope of the file in the body editor." ) );
}