diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | bd9e6617827818fd043452c08c606f07b78014a0 (patch) | |
tree | 425bb4c3168f9c02f10150f235d2cb998dcc6108 /kompare/komparepart/kompareprefdlg.cpp | |
download | tdesdk-bd9e6617827818fd043452c08c606f07b78014a0.tar.gz tdesdk-bd9e6617827818fd043452c08c606f07b78014a0.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kompare/komparepart/kompareprefdlg.cpp')
-rw-r--r-- | kompare/komparepart/kompareprefdlg.cpp | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/kompare/komparepart/kompareprefdlg.cpp b/kompare/komparepart/kompareprefdlg.cpp new file mode 100644 index 00000000..2d731af3 --- /dev/null +++ b/kompare/komparepart/kompareprefdlg.cpp @@ -0,0 +1,106 @@ +/*************************************************************************** + kompareprefdlg.cpp - description + ------------------- + begin : Sun Mar 4 2001 + copyright : (C) 2001-2003 by Otto Bruggeman + and John Firebaugh + email : otto.bruggeman@home.nl + jfirebaugh@kde.org +****************************************************************************/ + +/*************************************************************************** +** +** 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 +** the Free Software Foundation; either version 2 of the License, or +** (at your option) any later version. +** +***************************************************************************/ + +#include <qvbox.h> + +#include <kdebug.h> +#include <kiconloader.h> +#include <klocale.h> + +#include "diffpage.h" +#include "viewpage.h" + +#include "kompareprefdlg.h" + +// implementation + +KomparePrefDlg::KomparePrefDlg( ViewSettings* viewSets, DiffSettings* diffSets ) : KDialogBase( IconList, i18n( "Preferences" ), Help|Default|Ok|Apply|Cancel, Ok, 0, 0, true, true ) +{ + // ok i need some stuff in that pref dlg... + setIconListAllVisible(true); + + QVBox* frame; + frame = addVBoxPage( i18n( "View" ), i18n( "View Settings" ), UserIcon( "diff_view" ) ); + m_viewPage = new ViewPage( frame ); + m_viewPage->setSettings( viewSets ); + + frame = addVBoxPage( i18n( "Diff" ), i18n( "Diff Settings" ), UserIcon( "diff_specific" ) ); + m_diffPage = new DiffPage( frame ); + m_diffPage->setSettings( diffSets ); + +// frame = addVBoxPage( i18n( "" ), i18n( "" ), UserIcon( "" ) ); + + adjustSize(); +} + +KomparePrefDlg::~KomparePrefDlg() +{ + +} + +/** No descriptions */ +void KomparePrefDlg::slotDefault() +{ + kdDebug(8103) << "SlotDefault called -> Settings should be restored to defaults..." << endl; + // restore all defaults in the options... + m_viewPage->setDefaults(); + m_diffPage->setDefaults(); +} + +/** No descriptions */ +void KomparePrefDlg::slotHelp() +{ + // show some help... + // figure out the current active page + // and give help for that page +} + +/** No descriptions */ +void KomparePrefDlg::slotApply() +{ + kdDebug(8103) << "SlotApply called -> Settings should be applied..." << endl; + // well apply the settings that are currently selected + m_viewPage->apply(); + m_diffPage->apply(); + + emit applyClicked(); +} + +/** No descriptions */ +void KomparePrefDlg::slotOk() +{ + kdDebug(8103) << "SlotOk called -> Settings should be applied..." << endl; + // Apply the settings that are currently selected + m_viewPage->apply(); + m_diffPage->apply(); + + KDialogBase::slotOk(); +} + +/** No descriptions */ +void KomparePrefDlg::slotCancel() +{ + // discard the current settings and use the present ones + m_viewPage->restore(); + m_diffPage->restore(); + + KDialogBase::slotCancel(); +} + +#include "kompareprefdlg.moc" |