]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/generalsettingspage.cpp
Use a QLinkedList instead of Q3PtrList
[dolphin.git] / src / generalsettingspage.cpp
index 14ef83bc3649b449d422f4ba9a1ef59598dba9dd..0ad74759067012caa3c20a26747f187e79405bb8 100644 (file)
@@ -15,7 +15,7 @@
  *   You should have received a copy of the GNU General Public License     *
  *   along with this program; if not, write to the                         *
  *   Free Software Foundation, Inc.,                                       *
- *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA            *
  ***************************************************************************/
 
 #include "generalsettingspage.h"
@@ -26,7 +26,7 @@
 #include <kdialog.h>
 #include <qlabel.h>
 #include <qlineedit.h>
-#include <q3vbox.h>
+
 #include <q3grid.h>
 #include <q3groupbox.h>
 #include <klocale.h>
 #include <qpushbutton.h>
 #include <kfiledialog.h>
 #include <qradiobutton.h>
+#include <kvbox.h>
 
 #include "dolphinsettings.h"
-#include "dolphin.h"
+#include "dolphinmainwindow.h"
 #include "dolphinview.h"
 #include "generalsettings.h"
 
-GeneralSettingsPage::GeneralSettingsPage(QWidget* parent) :
+GeneralSettingsPage::GeneralSettingsPage(DolphinMainWindow* mainWin,QWidget* parent) :
     SettingsPageBase(parent),
+    m_mainWindow(mainWin),
     m_homeUrl(0),
     m_startSplit(0),
     m_startEditable(0)
 {
-    Q3VBoxLayout* topLayout = new Q3VBoxLayout(parent, 2, KDialog::spacingHint());
+    Q3VBoxLayout* topLayout = new Q3VBoxLayout(this, 2, KDialog::spacingHint());
 
     const int spacing = KDialog::spacingHint();
     const int margin = KDialog::marginHint();
@@ -55,7 +57,7 @@ GeneralSettingsPage::GeneralSettingsPage(QWidget* parent) :
 
     GeneralSettings* settings = DolphinSettings::instance().generalSettings();
 
-    Q3VBox* vBox = new Q3VBox(parent);
+    KVBox* vBox = new KVBox(this);
     vBox->setSizePolicy(sizePolicy);
     vBox->setSpacing(spacing);
     vBox->setMargin(margin);
@@ -66,7 +68,7 @@ GeneralSettingsPage::GeneralSettingsPage(QWidget* parent) :
     homeGroup->setSizePolicy(sizePolicy);
     homeGroup->setMargin(margin);
 
-    Q3HBox* homeUrlBox = new Q3HBox(homeGroup);
+    KHBox* homeUrlBox = new KHBox(homeGroup);
     homeUrlBox->setSizePolicy(sizePolicy);
     homeUrlBox->setSpacing(spacing);
 
@@ -77,7 +79,7 @@ GeneralSettingsPage::GeneralSettingsPage(QWidget* parent) :
     connect(selectHomeUrlButton, SIGNAL(clicked()),
             this, SLOT(selectHomeUrl()));
 
-    Q3HBox* buttonBox = new Q3HBox(homeGroup);
+    KHBox* buttonBox = new KHBox(homeGroup);
     buttonBox->setSizePolicy(sizePolicy);
     buttonBox->setSpacing(spacing);
     QPushButton* useCurrentButton = new QPushButton(i18n("Use current location"), buttonBox);
@@ -157,7 +159,7 @@ void GeneralSettingsPage::selectHomeUrl()
 
 void GeneralSettingsPage::useCurrentLocation()
 {
-    const DolphinView* view = Dolphin::mainWin().activeView();
+    const DolphinView* view = m_mainWindow->activeView();
     m_homeUrl->setText(view->url().prettyUrl());
 }