-rw-r--r-- | noncore/settings/mediummount/mediumwidget.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/settings/mediummount/mediumwidget.cc b/noncore/settings/mediummount/mediumwidget.cc index 9ce024e..f9cac8b 100644 --- a/noncore/settings/mediummount/mediumwidget.cc +++ b/noncore/settings/mediummount/mediumwidget.cc | |||
@@ -10,99 +10,99 @@ | |||
10 | #include <qpixmap.h> | 10 | #include <qpixmap.h> |
11 | #include <qpushbutton.h> | 11 | #include <qpushbutton.h> |
12 | #include <qvbox.h> | 12 | #include <qvbox.h> |
13 | 13 | ||
14 | 14 | ||
15 | #include <qpe/config.h> | 15 | #include <qpe/config.h> |
16 | #include <qpe/qpeapplication.h> | 16 | #include <qpe/qpeapplication.h> |
17 | 17 | ||
18 | #include "mediumwidget.h" | 18 | #include "mediumwidget.h" |
19 | 19 | ||
20 | 20 | ||
21 | 21 | ||
22 | using namespace MediumMountSetting; | 22 | using namespace MediumMountSetting; |
23 | 23 | ||
24 | MediumMountWidget::MediumMountWidget(const QString &path, | 24 | MediumMountWidget::MediumMountWidget(const QString &path, |
25 | const QPixmap &pix, | 25 | const QPixmap &pix, |
26 | QWidget *parent, | 26 | QWidget *parent, |
27 | const char *name ) | 27 | const char *name ) |
28 | : QWidget( parent, name ) | 28 | : QWidget( parent, name ) |
29 | { | 29 | { |
30 | if(parent == 0){ | 30 | if(parent == 0){ |
31 | resize(QApplication::desktop()->width(), QApplication::desktop()->height() ); | 31 | resize(QApplication::desktop()->width(), QApplication::desktop()->height() ); |
32 | }else{ | 32 | }else{ |
33 | resize(parent->width(), parent->height() ); | 33 | resize(parent->width(), parent->height() ); |
34 | } | 34 | } |
35 | m_path = path; | 35 | m_path = path; |
36 | initGUI(); | 36 | initGUI(); |
37 | m_label->setPixmap(pix ); | 37 | m_label->setPixmap(pix ); |
38 | m_config = 0; | 38 | m_config = 0; |
39 | 39 | ||
40 | readConfig(); | 40 | readConfig(); |
41 | } | 41 | } |
42 | // now we fire up the GUI | 42 | // now we fire up the GUI |
43 | // if I would know what I'm doing ;) | 43 | // if I would know what I'm doing ;) |
44 | void MediumMountWidget::initGUI() | 44 | void MediumMountWidget::initGUI() |
45 | { | 45 | { |
46 | //main layout | 46 | //main layout |
47 | m_box = new QVBoxLayout( this , 5, 5 ); | 47 | m_box = new QVBoxLayout( this , 5, 5 ); |
48 | m_box->setSpacing( 5 ); | 48 | m_box->setSpacing( 5 ); |
49 | //m_box->addStretch( -1 ); | 49 | //m_box->addStretch( -1 ); |
50 | 50 | ||
51 | // picture + text | 51 | // picture + text |
52 | m_infoBox = new QHBox(this, "infobox" ); | 52 | m_infoBox = new QHBox(this, "infobox" ); |
53 | m_infoBox->setSpacing( 4 ); | 53 | m_infoBox->setSpacing( 4 ); |
54 | m_label = new QLabel(m_infoBox ); | 54 | m_label = new QLabel(m_infoBox ); |
55 | m_desc = new QLabel(m_infoBox ); | 55 | m_desc = new QLabel(m_infoBox ); |
56 | m_desc->setTextFormat( Qt::RichText ); | 56 | m_desc->setTextFormat( Qt::RichText ); |
57 | m_desc->setText("Configure this medium. The changes will" | 57 | m_desc->setText("Configure this medium. The changes will" |
58 | "go into effect when the application get's" | 58 | " go into effect when the application get's" |
59 | "closed. To update the Document Tab you need" | 59 | " closed. To update the Document Tab you need" |
60 | "to removeand insert this medium." ); | 60 | " to removeand insert this medium." ); |
61 | m_box->addWidget( m_infoBox ); // add the widget to the layout | 61 | m_box->addWidget( m_infoBox ); // add the widget to the layout |
62 | 62 | ||
63 | 63 | ||
64 | // groupbox | 64 | // groupbox |
65 | m_group = new QGroupBox(tr("Which media files"), this, "MediaFiles" ); | 65 | m_group = new QGroupBox(tr("Which media files"), this, "MediaFiles" ); |
66 | m_checks = new QGridLayout( m_group, 4, 3 ); | 66 | m_checks = new QGridLayout( m_group, 4, 3 ); |
67 | m_checks->setMargin( 12 ); | 67 | m_checks->setMargin( 12 ); |
68 | 68 | ||
69 | 69 | ||
70 | 70 | ||
71 | QSpacerItem *item2 = new QSpacerItem(5, 8, | 71 | QSpacerItem *item2 = new QSpacerItem(5, 8, |
72 | QSizePolicy::Fixed, | 72 | QSizePolicy::Fixed, |
73 | QSizePolicy::Fixed); | 73 | QSizePolicy::Fixed); |
74 | m_box->addItem( item2 ); | 74 | m_box->addItem( item2 ); |
75 | 75 | ||
76 | m_audio = new QCheckBox( tr("Audio"), m_group ); | 76 | m_audio = new QCheckBox( tr("Audio"), m_group ); |
77 | m_all = new QCheckBox( tr("All") , m_group ); | 77 | m_all = new QCheckBox( tr("All") , m_group ); |
78 | m_image = new QCheckBox( tr("Image"), m_group ); | 78 | m_image = new QCheckBox( tr("Image"), m_group ); |
79 | m_text = new QCheckBox( tr("Text") , m_group ); | 79 | m_text = new QCheckBox( tr("Text") , m_group ); |
80 | m_video = new QCheckBox( tr("Video"), m_group ); | 80 | m_video = new QCheckBox( tr("Video"), m_group ); |
81 | 81 | ||
82 | QSpacerItem *iti1b = new QSpacerItem(2, 10, QSizePolicy::Fixed, | 82 | QSpacerItem *iti1b = new QSpacerItem(2, 10, QSizePolicy::Fixed, |
83 | QSizePolicy::Fixed ); | 83 | QSizePolicy::Fixed ); |
84 | m_checks->addItem( iti1b, 0, 0 ); | 84 | m_checks->addItem( iti1b, 0, 0 ); |
85 | 85 | ||
86 | m_checks->addWidget(m_audio, 1, 0 ); | 86 | m_checks->addWidget(m_audio, 1, 0 ); |
87 | m_checks->addWidget(m_image, 2, 0 ); | 87 | m_checks->addWidget(m_image, 2, 0 ); |
88 | m_checks->addWidget(m_all , 3, 0 ); | 88 | m_checks->addWidget(m_all , 3, 0 ); |
89 | 89 | ||
90 | m_checks->addWidget(m_text, 1, 2 ); | 90 | m_checks->addWidget(m_text, 1, 2 ); |
91 | m_checks->addWidget(m_video, 2, 2 ); | 91 | m_checks->addWidget(m_video, 2, 2 ); |
92 | 92 | ||
93 | m_checks->addRowSpacing(0, 8 ); | 93 | m_checks->addRowSpacing(0, 8 ); |
94 | m_checks->addColSpacing(1, 2 ); | 94 | m_checks->addColSpacing(1, 2 ); |
95 | m_checks->setColStretch(1, -2 ); | 95 | m_checks->setColStretch(1, -2 ); |
96 | 96 | ||
97 | connect(m_all, SIGNAL(stateChanged(int) ), | 97 | connect(m_all, SIGNAL(stateChanged(int) ), |
98 | this, SLOT(slotStateChanged() ) ); | 98 | this, SLOT(slotStateChanged() ) ); |
99 | 99 | ||
100 | m_box->addWidget( m_group ); | 100 | m_box->addWidget( m_group ); |
101 | 101 | ||
102 | // label | 102 | // label |
103 | m_lblPath = new QLabel(tr("Limit search to:"), this ); | 103 | m_lblPath = new QLabel(tr("Limit search to:"), this ); |
104 | m_box->addWidget( m_lblPath ); | 104 | m_box->addWidget( m_lblPath ); |
105 | 105 | ||
106 | // add to | 106 | // add to |
107 | m_hboxAdd = new QHBox( this ); | 107 | m_hboxAdd = new QHBox( this ); |
108 | m_hboxAdd->setSpacing( 10 ); | 108 | m_hboxAdd->setSpacing( 10 ); |