~ubuntu-branches/ubuntu/wily/tora/wily-proposed

« back to all changes in this revision

Viewing changes to tosecurityquotaui.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Albin Tonnerre
  • Date: 2007-05-29 13:13:36 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070529131336-85ygaddivvmkd3xc
Tags: 1.3.21pre22-1ubuntu1
* Merge from Debian unstable. Remaining Ubuntu changes:
  - debian/rules: call dh_iconcache
  - Remove g++ build dependency
* 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 'tosecurityquotaui.ui'
3
 
**
4
 
** Created: Mon Feb 20 12:46:40 2006
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 "tosecurityquotaui.h"
11
 
 
12
 
#include <qvariant.h>
13
 
#include <qpushbutton.h>
14
 
#include <qheader.h>
15
 
#include <qlistview.h>
16
 
#include <qbuttongroup.h>
17
 
#include <qradiobutton.h>
18
 
#include <qlabel.h>
19
 
#include <qlayout.h>
20
 
#include <qtooltip.h>
21
 
#include <qwhatsthis.h>
22
 
#include "tofilesize.h"
23
 
 
24
 
/*
25
 
 *  Constructs a toSecurityQuotaUI as a child of 'parent', with the
26
 
 *  name 'name' and widget flags set to 'f'.
27
 
 */
28
 
toSecurityQuotaUI::toSecurityQuotaUI( QWidget* parent, const char* name, WFlags fl )
29
 
    : QWidget( parent, name, fl )
30
 
{
31
 
    if ( !name )
32
 
        setName( "toSecurityQuotaUI" );
33
 
    toSecurityQuotaUILayout = new QGridLayout( this, 1, 1, 0, 0, "toSecurityQuotaUILayout"); 
34
 
 
35
 
    Tablespaces = new QListView( this, "Tablespaces" );
36
 
    Tablespaces->addColumn( tr( "Tablespace" ) );
37
 
    Tablespaces->addColumn( tr( "Quota Size" ) );
38
 
    Tablespaces->addColumn( tr( "Used Size" ) );
39
 
    Tablespaces->setAllColumnsShowFocus( TRUE );
40
 
 
41
 
    toSecurityQuotaUILayout->addWidget( Tablespaces, 1, 0 );
42
 
 
43
 
    SizeGroup = new QButtonGroup( this, "SizeGroup" );
44
 
    SizeGroup->setEnabled( FALSE );
45
 
    SizeGroup->setLineWidth( 0 );
46
 
    SizeGroup->setColumnLayout(0, Qt::Vertical );
47
 
    SizeGroup->layout()->setSpacing( 6 );
48
 
    SizeGroup->layout()->setMargin( 0 );
49
 
    SizeGroupLayout = new QGridLayout( SizeGroup->layout() );
50
 
    SizeGroupLayout->setAlignment( Qt::AlignTop );
51
 
 
52
 
    Size = new toFilesize( SizeGroup, "Size" );
53
 
    Size->setFocusPolicy( toFilesize::TabFocus );
54
 
 
55
 
    SizeGroupLayout->addMultiCellWidget( Size, 1, 1, 0, 2 );
56
 
 
57
 
    Unlimited = new QRadioButton( SizeGroup, "Unlimited" );
58
 
 
59
 
    SizeGroupLayout->addWidget( Unlimited, 0, 2 );
60
 
 
61
 
    None = new QRadioButton( SizeGroup, "None" );
62
 
 
63
 
    SizeGroupLayout->addWidget( None, 0, 1 );
64
 
 
65
 
    Value = new QRadioButton( SizeGroup, "Value" );
66
 
    Value->setChecked( TRUE );
67
 
 
68
 
    SizeGroupLayout->addWidget( Value, 0, 0 );
69
 
 
70
 
    toSecurityQuotaUILayout->addWidget( SizeGroup, 2, 0 );
71
 
 
72
 
    Disabled = new QLabel( this, "Disabled" );
73
 
    Disabled->setAlignment( int( QLabel::AlignCenter ) );
74
 
 
75
 
    toSecurityQuotaUILayout->addWidget( Disabled, 0, 0 );
76
 
    languageChange();
77
 
    resize( QSize(682, 596).expandedTo(minimumSizeHint()) );
78
 
    clearWState( WState_Polished );
79
 
 
80
 
    // signals and slots connections
81
 
    connect( Value, SIGNAL( toggled(bool) ), Size, SLOT( setEnabled(bool) ) );
82
 
    connect( Tablespaces, SIGNAL( selectionChanged() ), this, SLOT( changeTablespace(void) ) );
83
 
    connect( SizeGroup, SIGNAL( clicked(int) ), this, SLOT( changeSize(void) ) );
84
 
    connect( Size, SIGNAL( valueChanged(void) ), this, SLOT( changeSize(void) ) );
85
 
 
86
 
    // tab order
87
 
    setTabOrder( Tablespaces, Value );
88
 
    setTabOrder( Value, None );
89
 
    setTabOrder( None, Unlimited );
90
 
    setTabOrder( Unlimited, Size );
91
 
}
92
 
 
93
 
/*
94
 
 *  Destroys the object and frees any allocated resources
95
 
 */
96
 
toSecurityQuotaUI::~toSecurityQuotaUI()
97
 
{
98
 
    // no need to delete child widgets, Qt does it all for us
99
 
}
100
 
 
101
 
/*
102
 
 *  Sets the strings of the subwidgets using the current
103
 
 *  language.
104
 
 */
105
 
void toSecurityQuotaUI::languageChange()
106
 
{
107
 
    setCaption( tr( "Form1" ) );
108
 
    Tablespaces->header()->setLabel( 0, tr( "Tablespace" ) );
109
 
    Tablespaces->header()->setLabel( 1, tr( "Quota Size" ) );
110
 
    Tablespaces->header()->setLabel( 2, tr( "Used Size" ) );
111
 
    SizeGroup->setTitle( QString::null );
112
 
    Unlimited->setText( tr( "&Unlimited" ) );
113
 
    None->setText( tr( "&None" ) );
114
 
    Value->setText( tr( "&Value" ) );
115
 
    Disabled->setText( tr( "Belongs to Resource group or has unlimited tablespace privilege" ) );
116
 
}
117
 
 
118
 
void toSecurityQuotaUI::changeTablespace()
119
 
{
120
 
    qWarning( "toSecurityQuotaUI::changeTablespace(): Not implemented yet" );
121
 
}
122
 
 
123
 
void toSecurityQuotaUI::changeSize()
124
 
{
125
 
    qWarning( "toSecurityQuotaUI::changeSize(): Not implemented yet" );
126
 
}
127