~kubuntu-members/perlkde/4.11

« back to all changes in this revision

Viewing changes to qt/qtgui/examples/linguist/trollprint/PrintPanel.pm

  • Committer: Arno Rehn
  • Date: 2011-01-06 17:49:41 UTC
  • Revision ID: git-v1:ada9e4b459cf6fabd0f3b9b164387469cb19d9bc
A patch by Ian Monroe and myself to modularize the repository.
See README.MODULARIZATION for details.

svn path=/trunk/KDE/kdebindings/perl/; revision=1212365

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package PrintPanel;
 
2
 
 
3
use strict;
 
4
use warnings;
 
5
use QtCore4;
 
6
use QtGui4;
 
7
# [0]
 
8
use QtCore4::isa qw( Qt::Widget );
 
9
# [0]
 
10
sub twoSidedGroupBox() {
 
11
    return this->{twoSidedGroupBox};
 
12
}
 
13
 
 
14
sub colorsGroupBox() {
 
15
    return this->{colorsGroupBox};
 
16
}
 
17
 
 
18
sub twoSidedEnabledRadio() {
 
19
    return this->{twoSidedEnabledRadio};
 
20
}
 
21
 
 
22
sub twoSidedDisabledRadio() {
 
23
    return this->{twoSidedDisabledRadio};
 
24
}
 
25
 
 
26
sub colorsEnabledRadio() {
 
27
    return this->{colorsEnabledRadio};
 
28
}
 
29
 
 
30
sub colorsDisabledRadio() {
 
31
    return this->{colorsDisabledRadio};
 
32
}
 
33
 
 
34
# [0]
 
35
sub NEW
 
36
{
 
37
    my ($class, $parent) = @_;
 
38
    $class->SUPER::NEW($parent);
 
39
 
 
40
=begin
 
41
 
 
42
/*
 
43
    my $label = Qt::Label(PrintPanel::tr("<b>TROLL PRINT</b>"));
 
44
    $label->setAlignment(Qt::AlignCenter());
 
45
*/
 
46
 
 
47
=cut
 
48
 
 
49
# [0]
 
50
 
 
51
# [1]
 
52
    this->{twoSidedGroupBox} = Qt::GroupBox(PrintPanel::tr("2-sided"));
 
53
    this->{twoSidedEnabledRadio} = Qt::RadioButton(PrintPanel::tr("Enabled"));
 
54
    this->{twoSidedDisabledRadio} = Qt::RadioButton(PrintPanel::tr("Disabled"));
 
55
# [1] //! [2]
 
56
    this->twoSidedDisabledRadio->setChecked(1);
 
57
 
 
58
    this->{colorsGroupBox} = Qt::GroupBox(PrintPanel::tr("Colors"));
 
59
    this->{colorsEnabledRadio} = Qt::RadioButton(PrintPanel::tr("Enabled"));
 
60
    this->{colorsDisabledRadio} = Qt::RadioButton(PrintPanel::tr("Disabled"));
 
61
# [2]
 
62
    this->colorsDisabledRadio->setChecked(1);
 
63
 
 
64
    my $twoSidedLayout = Qt::HBoxLayout();
 
65
    $twoSidedLayout->addWidget(this->twoSidedEnabledRadio);
 
66
    $twoSidedLayout->addWidget(this->twoSidedDisabledRadio);
 
67
    this->twoSidedGroupBox->setLayout($twoSidedLayout);
 
68
 
 
69
    my $colorsLayout = Qt::HBoxLayout();
 
70
    $colorsLayout->addWidget(this->colorsEnabledRadio);
 
71
    $colorsLayout->addWidget(this->colorsDisabledRadio);
 
72
    this->colorsGroupBox->setLayout($colorsLayout);
 
73
 
 
74
    my $mainLayout = Qt::VBoxLayout();
 
75
 
 
76
=begin
 
77
 
 
78
/*
 
79
    $mainLayout->addWidget($label);
 
80
*/
 
81
 
 
82
=cut
 
83
 
 
84
    $mainLayout->addWidget(this->twoSidedGroupBox);
 
85
    $mainLayout->addWidget(this->colorsGroupBox);
 
86
    this->setLayout($mainLayout);
 
87
}
 
88
 
 
89
1;