]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/generalviewsettingspage.cpp
resize the pixmap in a smooth way instead of using a blending effect
[dolphin.git] / src / generalviewsettingspage.cpp
index 5c1137fd2c48051ba9c43d2e6678752139c5d7e0..e35d948b5075ff202509a13bf1b7020f07cd88e6 100644 (file)
@@ -1,6 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2006 by Peter Penz                                      *
- *   peter.penz@gmx.at                                                     *
+ *   Copyright (C) 2006 by Peter Penz <peter.penz@gmx.at>                  *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
@@ -24,8 +23,6 @@
 #include "dolphin_generalsettings.h"
 #include "viewproperties.h"
 
-#include <assert.h>
-
 #include <QLabel>
 #include <QGroupBox>
 #include <QRadioButton>
 #include <khbox.h>
 
 GeneralViewSettingsPage::GeneralViewSettingsPage(DolphinMainWindow* mainWindow,
-                                                 QWidget* parent) :
-    KVBox(parent),
-    m_mainWindow(mainWindow),
-    m_localProps(0),
-    m_globalProps(0),
-    m_maxPreviewSize(0)
+        QWidget* parent) :
+        KVBox(parent),
+        m_mainWindow(mainWindow),
+        m_localProps(0),
+        m_globalProps(0),
+        m_maxPreviewSize(0)
 {
     GeneralSettings* settings = DolphinSettings::instance().generalSettings();
-    assert(settings != 0);
+    Q_ASSERT(settings != 0);
 
     const int spacing = KDialog::spacingHint();
     const int margin = KDialog::marginHint();
@@ -59,12 +56,11 @@ GeneralViewSettingsPage::GeneralViewSettingsPage(DolphinMainWindow* mainWindow,
 
     QGroupBox* propsBox = new QGroupBox(i18n("View Properties"), this);
 
-    m_localProps = new QRadioButton(i18n("Remember view properties for each folder."), propsBox);
-    m_globalProps = new QRadioButton(i18n("Use common view properties for all folders."), propsBox);
+    m_localProps = new QRadioButton(i18n("Remember view properties for each folder"), propsBox);
+    m_globalProps = new QRadioButton(i18n("Use common view properties for all folders"), propsBox);
     if (settings->globalViewProps()) {
         m_globalProps->setChecked(true);
-    }
-    else {
+    } else {
         m_localProps->setChecked(true);
     }
 
@@ -93,8 +89,7 @@ GeneralViewSettingsPage::GeneralViewSettingsPage(DolphinMainWindow* mainWindow,
     int maxMByteSize = maxByteSize / (1024 * 1024);
     if (maxMByteSize < 1) {
         maxMByteSize = 1;
-    }
-    else if (maxMByteSize > max) {
+    } else if (maxMByteSize > max) {
         maxMByteSize = max;
     }
     m_maxPreviewSize->setValue(maxMByteSize);
@@ -122,8 +117,7 @@ GeneralViewSettingsPage::GeneralViewSettingsPage(DolphinMainWindow* mainWindow,
 
 
 GeneralViewSettingsPage::~GeneralViewSettingsPage()
-{
-}
+{}
 
 void GeneralViewSettingsPage::applySettings()
 {
@@ -133,7 +127,7 @@ void GeneralViewSettingsPage::applySettings()
     const bool useGlobalProps = m_globalProps->isChecked();
 
     GeneralSettings* settings = DolphinSettings::instance().generalSettings();
-    assert(settings != 0);
+    Q_ASSERT(settings != 0);
     settings->setGlobalViewProps(useGlobalProps);
 
     if (useGlobalProps) {