summaryrefslogtreecommitdiff
path: root/noncore/settings/mediummount/mediumwidget.cc
Side-by-side diff
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
@@ -27,25 +27,25 @@ MediumMountWidget::MediumMountWidget(const QString &path,
QWidget *parent,
const char *name )
: QWidget( parent, name )
{
if(parent == 0){
resize(QApplication::desktop()->width(), QApplication::desktop()->height() );
}else{
resize(parent->width(), parent->height() );
}
m_path = path;
initGUI();
m_label->setPixmap(pix );
- m_config = 0;
+ m_config = 0;
readConfig();
}
// now we fire up the GUI
// if I would know what I'm doing ;)
void MediumMountWidget::initGUI()
{
//main layout
m_box = new QVBoxLayout( this , 5, 5 );
m_box->setSpacing( 5 );
//m_box->addStretch( -1 );
@@ -72,40 +72,40 @@ void MediumMountWidget::initGUI()
QSpacerItem *item2 = new QSpacerItem(5, 8,
QSizePolicy::Fixed,
QSizePolicy::Fixed);
m_box->addItem( item2 );
m_audio = new QCheckBox( tr("Audio"), m_group );
m_all = new QCheckBox( tr("All") , m_group );
m_image = new QCheckBox( tr("Image"), m_group );
m_text = new QCheckBox( tr("Text") , m_group );
m_video = new QCheckBox( tr("Video"), m_group );
- QSpacerItem *iti1b = new QSpacerItem(2, 10, QSizePolicy::Fixed,
+ QSpacerItem *iti1b = new QSpacerItem(2, 10, QSizePolicy::Fixed,
QSizePolicy::Fixed );
m_checks->addItem( iti1b, 0, 0 );
m_checks->addWidget(m_audio, 1, 0 );
m_checks->addWidget(m_image, 2, 0 );
m_checks->addWidget(m_all , 3, 0 );
m_checks->addWidget(m_text, 1, 2 );
m_checks->addWidget(m_video, 2, 2 );
m_checks->addRowSpacing(0, 8 );
m_checks->addColSpacing(1, 2 );
m_checks->setColStretch(1, -2 );
- connect(m_all, SIGNAL(stateChanged(int) ),
+ connect(m_all, SIGNAL(stateChanged(int) ),
this, SLOT(slotStateChanged() ) );
m_box->addWidget( m_group );
// label
m_lblPath = new QLabel(tr("Limit search to:"), this );
m_box->addWidget( m_lblPath );
// add to
m_hboxAdd = new QHBox( this );
m_hboxAdd->setSpacing( 10 );
m_edit = new QLineEdit(m_hboxAdd );
@@ -134,25 +134,25 @@ void MediumMountWidget::readConfig( )
m_config->setGroup( "mimetypes" );
if( m_config->readBoolEntry("all", false ) ){
m_audio->setEnabled( false );
m_image->setEnabled( false );
m_text->setEnabled ( false );
m_video->setEnabled( false );
m_all->setChecked( true );
}else{
m_audio->setEnabled( true );
m_image->setEnabled( true );
m_text->setEnabled ( true );
- m_all->setEnabled ( true );
+ m_all->setEnabled ( true );
m_all->setChecked( false );
m_audio->setChecked( m_config->readBoolEntry("audio", true ) );
m_image->setChecked( m_config->readBoolEntry("image", true ) );
m_text->setChecked ( m_config->readBoolEntry("text" , true ) );
m_video->setChecked( m_config->readBoolEntry("video", true ) );
};
}
void MediumMountWidget::writeConfig()
{
@@ -162,29 +162,27 @@ void MediumMountWidget::writeConfig()
m_config->setGroup("mimetypes" );
if(m_all->isChecked() ){
m_config->writeEntry("all", true );
}else{
m_config->writeEntry("audio", m_audio->isChecked() );
m_config->writeEntry("image", m_image->isChecked() );
m_config->writeEntry("text" , m_text->isChecked() );
m_config->writeEntry("video", m_video->isChecked() );
}
}
MediumMountWidget::~MediumMountWidget()
{
- writeConfig();
delete m_config;
}
-
void MediumMountWidget::slotAdd()
{
}
void MediumMountWidget::slotStateChanged()
{
bool state = !(m_all->isChecked());
m_audio->setEnabled( state );
m_text->setEnabled ( state );
m_video->setEnabled( state );
m_image->setEnabled( state );