File: PrintPanel.pm

package info (click to toggle)
qt4-perl 4.8.4-1.2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 8,636 kB
  • ctags: 8,100
  • sloc: perl: 42,963; cpp: 28,039; makefile: 160; xml: 98; sh: 4
file content (89 lines) | stat: -rw-r--r-- 1,998 bytes parent folder | download | duplicates (4)
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
package PrintPanel;

use strict;
use warnings;
use QtCore4;
use QtGui4;
# [0]
use QtCore4::isa qw( Qt::Widget );
# [0]
sub twoSidedGroupBox() {
    return this->{twoSidedGroupBox};
}

sub colorsGroupBox() {
    return this->{colorsGroupBox};
}

sub twoSidedEnabledRadio() {
    return this->{twoSidedEnabledRadio};
}

sub twoSidedDisabledRadio() {
    return this->{twoSidedDisabledRadio};
}

sub colorsEnabledRadio() {
    return this->{colorsEnabledRadio};
}

sub colorsDisabledRadio() {
    return this->{colorsDisabledRadio};
}

# [0]
sub NEW
{
    my ($class, $parent) = @_;
    $class->SUPER::NEW($parent);

=begin

/*
    my $label = Qt::Label(PrintPanel::tr("<b>TROLL PRINT</b>"));
    $label->setAlignment(Qt::AlignCenter());
*/

=cut

# [0]

# [1]
    this->{twoSidedGroupBox} = Qt::GroupBox(PrintPanel::tr("2-sided"));
    this->{twoSidedEnabledRadio} = Qt::RadioButton(PrintPanel::tr("Enabled"));
    this->{twoSidedDisabledRadio} = Qt::RadioButton(PrintPanel::tr("Disabled"));
# [1] //! [2]
    this->twoSidedDisabledRadio->setChecked(1);

    this->{colorsGroupBox} = Qt::GroupBox(PrintPanel::tr("Colors"));
    this->{colorsEnabledRadio} = Qt::RadioButton(PrintPanel::tr("Enabled"));
    this->{colorsDisabledRadio} = Qt::RadioButton(PrintPanel::tr("Disabled"));
# [2]
    this->colorsDisabledRadio->setChecked(1);

    my $twoSidedLayout = Qt::HBoxLayout();
    $twoSidedLayout->addWidget(this->twoSidedEnabledRadio);
    $twoSidedLayout->addWidget(this->twoSidedDisabledRadio);
    this->twoSidedGroupBox->setLayout($twoSidedLayout);

    my $colorsLayout = Qt::HBoxLayout();
    $colorsLayout->addWidget(this->colorsEnabledRadio);
    $colorsLayout->addWidget(this->colorsDisabledRadio);
    this->colorsGroupBox->setLayout($colorsLayout);

    my $mainLayout = Qt::VBoxLayout();

=begin

/*
    $mainLayout->addWidget($label);
*/

=cut

    $mainLayout->addWidget(this->twoSidedGroupBox);
    $mainLayout->addWidget(this->colorsGroupBox);
    this->setLayout($mainLayout);
}

1;