summaryrefslogtreecommitdiff
path: root/noncore/settings/mediummount/mediumwidget.cc
Unidiff
Diffstat (limited to 'noncore/settings/mediummount/mediumwidget.cc') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/mediummount/mediumwidget.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/noncore/settings/mediummount/mediumwidget.cc b/noncore/settings/mediummount/mediumwidget.cc
index 04e4e7c..f98e637 100644
--- a/noncore/settings/mediummount/mediumwidget.cc
+++ b/noncore/settings/mediummount/mediumwidget.cc
@@ -33,13 +33,13 @@ MediumMountWidget::MediumMountWidget(const QString &path,
33 }else{ 33 }else{
34 resize(parent->width(), parent->height() ); 34 resize(parent->width(), parent->height() );
35 } 35 }
36 m_path = path; 36 m_path = path;
37 initGUI(); 37 initGUI();
38 m_label->setPixmap(pix ); 38 m_label->setPixmap(pix );
39 m_config = 0; 39 m_config = 0;
40 40
41 readConfig(); 41 readConfig();
42} 42}
43// now we fire up the GUI 43// now we fire up the GUI
44// if I would know what I'm doing ;) 44// if I would know what I'm doing ;)
45void MediumMountWidget::initGUI() 45void MediumMountWidget::initGUI()
@@ -78,13 +78,13 @@ void MediumMountWidget::initGUI()
78 m_audio = new QCheckBox( tr("Audio"), m_group ); 78 m_audio = new QCheckBox( tr("Audio"), m_group );
79 m_all = new QCheckBox( tr("All") , m_group ); 79 m_all = new QCheckBox( tr("All") , m_group );
80 m_image = new QCheckBox( tr("Image"), m_group ); 80 m_image = new QCheckBox( tr("Image"), m_group );
81 m_text = new QCheckBox( tr("Text") , m_group ); 81 m_text = new QCheckBox( tr("Text") , m_group );
82 m_video = new QCheckBox( tr("Video"), m_group ); 82 m_video = new QCheckBox( tr("Video"), m_group );
83 83
84 QSpacerItem *iti1b = new QSpacerItem(2, 10, QSizePolicy::Fixed, 84 QSpacerItem *iti1b = new QSpacerItem(2, 10, QSizePolicy::Fixed,
85 QSizePolicy::Fixed ); 85 QSizePolicy::Fixed );
86 m_checks->addItem( iti1b, 0, 0 ); 86 m_checks->addItem( iti1b, 0, 0 );
87 87
88 m_checks->addWidget(m_audio, 1, 0 ); 88 m_checks->addWidget(m_audio, 1, 0 );
89 m_checks->addWidget(m_image, 2, 0 ); 89 m_checks->addWidget(m_image, 2, 0 );
90 m_checks->addWidget(m_all , 3, 0 ); 90 m_checks->addWidget(m_all , 3, 0 );
@@ -93,13 +93,13 @@ void MediumMountWidget::initGUI()
93 m_checks->addWidget(m_video, 2, 2 ); 93 m_checks->addWidget(m_video, 2, 2 );
94 94
95 m_checks->addRowSpacing(0, 8 ); 95 m_checks->addRowSpacing(0, 8 );
96 m_checks->addColSpacing(1, 2 ); 96 m_checks->addColSpacing(1, 2 );
97 m_checks->setColStretch(1, -2 ); 97 m_checks->setColStretch(1, -2 );
98 98
99 connect(m_all, SIGNAL(stateChanged(int) ), 99 connect(m_all, SIGNAL(stateChanged(int) ),
100 this, SLOT(slotStateChanged() ) ); 100 this, SLOT(slotStateChanged() ) );
101 101
102 m_box->addWidget( m_group ); 102 m_box->addWidget( m_group );
103 103
104 // label 104 // label
105 m_lblPath = new QLabel(tr("Limit search to:"), this ); 105 m_lblPath = new QLabel(tr("Limit search to:"), this );
@@ -140,13 +140,13 @@ void MediumMountWidget::readConfig( )
140 m_video->setEnabled( false ); 140 m_video->setEnabled( false );
141 m_all->setChecked( true ); 141 m_all->setChecked( true );
142 }else{ 142 }else{
143 m_audio->setEnabled( true ); 143 m_audio->setEnabled( true );
144 m_image->setEnabled( true ); 144 m_image->setEnabled( true );
145 m_text->setEnabled ( true ); 145 m_text->setEnabled ( true );
146 m_all->setEnabled ( true ); 146 m_all->setEnabled ( true );
147 147
148 m_all->setChecked( false ); 148 m_all->setChecked( false );
149 149
150 m_audio->setChecked( m_config->readBoolEntry("audio", true ) ); 150 m_audio->setChecked( m_config->readBoolEntry("audio", true ) );
151 m_image->setChecked( m_config->readBoolEntry("image", true ) ); 151 m_image->setChecked( m_config->readBoolEntry("image", true ) );
152 m_text->setChecked ( m_config->readBoolEntry("text" , true ) ); 152 m_text->setChecked ( m_config->readBoolEntry("text" , true ) );
@@ -168,17 +168,15 @@ void MediumMountWidget::writeConfig()
168 m_config->writeEntry("text" , m_text->isChecked() ); 168 m_config->writeEntry("text" , m_text->isChecked() );
169 m_config->writeEntry("video", m_video->isChecked() ); 169 m_config->writeEntry("video", m_video->isChecked() );
170 } 170 }
171} 171}
172MediumMountWidget::~MediumMountWidget() 172MediumMountWidget::~MediumMountWidget()
173{ 173{
174 writeConfig();
175 delete m_config; 174 delete m_config;
176} 175}
177 176
178
179void MediumMountWidget::slotAdd() 177void MediumMountWidget::slotAdd()
180{ 178{
181 179
182} 180}
183void MediumMountWidget::slotStateChanged() 181void MediumMountWidget::slotStateChanged()
184{ 182{