summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp33
-rw-r--r--kaddressbook/kabcore.h3
2 files changed, 29 insertions, 7 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index dabb8e9..cb9b992 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -12,24 +12,31 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
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.
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
+/*
+Enhanced Version of the file for platform independent KDE tools.
+Copyright (c) 2004 Ulf Schenk
+
+$Id$
+*/
+
#include "kabcore.h"
#include <stdaddressbook.h>
#include <klocale.h>
#ifndef KAB_EMBEDDED
#include <qclipboard.h>
#include <qdir.h>
#include <qfile.h>
#include <qapplicaton.h>
#include <qlayout.h>
#include <qregexp.h>
@@ -409,35 +416,36 @@ void KABCore::createAboutData()
#include <../version>
QMessageBox::about( this, "About KAddressbook/Pi",
"KAddressbook/Platform-independent\n"
"(KA/Pi) " +version + " - " +
#ifdef DESKTOP_VERSION
"Desktop Edition\n"
#else
"PDA-Edition\n"
"for: Zaurus 5500 / 7x0 / 8x0\n"
#endif
"(c) 2004 Ulf Schenk\n"
+ "(c) 2004 Lutz Rogowski\n"
"(c) 1997-2003, The KDE PIM Team\n"
- "Tobias Koenig Current maintainer tokoe@kde.org\n"
+ "Tobias Koenig Current maintainer\ntokoe@kde.org\n"
"Don Sanders Original author\n"
- "Cornelius Schumacher Co-maintainer schumacher@kde.org\n"
- "Mike Pilone GUI and framework redesign mpilone@slac.com\n"
+ "Cornelius Schumacher Co-maintainer\nschumacher@kde.org\n"
+ "Mike Pilone GUI and framework redesign\nmpilone@slac.com\n"
"Greg Stern DCOP interface\n"
"Mark Westcot Contact pinning\n"
"Michel Boyer de la Giroday LDAP Lookup\n" "michel@klaralvdalens-datakonsult.se\n"
- "Steffen Hansen LDAP Lookup hansen@kde.org\n"
+ "Steffen Hansen LDAP Lookup\nhansen@kde.org\n"
#ifdef _WIN32_
- "(c) 2004 Lutz Rogowski Import from OL rogowski@kde.org\n"
+ "(c) 2004 Lutz Rogowski Import from OL\nrogowski@kde.org\n"
#endif
);
}
void KABCore::setContactSelected( const QString &uid )
{
KABC::Addressee addr = mAddressBook->findByUid( uid );
if ( !mDetails->isHidden() )
mDetails->setAddressee( addr );
if ( !addr.isEmpty() ) {
emit contactSelected( addr.formattedName() );
@@ -1725,27 +1733,31 @@ void KABCore::initActions()
mActionCategories = new KAction( i18n( "Set Categories" ), 0, this,
SLOT( setCategories() ), actionCollection(),
"edit_set_categories" );
mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this,
SLOT( removeVoice() ), actionCollection(),
"remove_voice" );
mActionImportOL = new KAction( i18n( "Import from OL..." ), 0, this,
SLOT( importFromOL() ), actionCollection(),
"import_OL" );
#ifdef KAB_EMBEDDED
- mActionLicence = new KAction( i18n( "Licence" ), "licence", 0,
+ mActionLicence = new KAction( i18n( "Licence" ), 0,
this, SLOT( showLicence() ), actionCollection(),
"licence_about_data" );
+ mActionFaq = new KAction( i18n( "Faq" ), 0,
+ this, SLOT( faq() ), actionCollection(),
+ "faq_about_data" );
+
mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0,
this, SLOT( createAboutData() ), actionCollection(),
"kaddressbook_about_data" );
#endif //KAB_EMBEDDED
clipboardDataChanged();
connect( UndoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) );
connect( RedoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) );
}
//US we need this function, to plug all actions into the correct menues.
// KDE uses a XML format to plug the actions, but we work her without this overhead.
@@ -1856,26 +1868,27 @@ void KABCore::addActionsManually()
settingsMenu->insertSeparator();
mActionJumpBar->plug( settingsMenu );
mActionDetails->plug( settingsMenu );
if (!KABPrefs::instance()->mMultipleViewsAtOnce )
mActionDetails->plug( tb );
settingsMenu->insertSeparator();
mActionWhoAmI->plug( settingsMenu );
mActionCategories->plug( settingsMenu );
- mActionAboutKAddressbook->plug( helpMenu );
mActionLicence->plug( helpMenu );
+ mActionFaq->plug( helpMenu );
+ mActionAboutKAddressbook->plug( helpMenu );
if (KGlobal::getDesktopSize() > KGlobal::Small ) {
mActionSave->plug( tb );
mViewManager->getFilterAction()->plug ( tb);
if (KGlobal::getDesktopSize() == KGlobal::Desktop ) {
mActionUndo->plug( tb );
mActionDelete->plug( tb );
mActionRedo->plug( tb );
}
}
//mActionQuit->plug ( tb );
@@ -2059,17 +2072,23 @@ void KABCore::requestForDetails(const QString& sourceChannel, const QString& ses
mViewManager->setSelected( foundUid, true );
mViewManager->refreshView( foundUid );
if ( !mMultipleViewsAtOnce )
{
setDetailsVisible( true );
mActionDetails->setChecked(true);
}
}
}
+void KABCore::faq()
+{
+ KApplication::showFile( "KA/Pi FAQ", "kdepim/kaddressbook/kapiFAQ.txt" );
+}
+
+
#ifndef KAB_EMBEDDED
#include "kabcore.moc"
#endif //KAB_EMBEDDED
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h
index 040b6aa..39d043f 100644
--- a/kaddressbook/kabcore.h
+++ b/kaddressbook/kabcore.h
@@ -134,24 +134,26 @@ class KABCore : public QWidget
#ifdef KAB_EMBEDDED
inline QPopupMenu* getImportMenu() { return ImportMenu;}
inline QPopupMenu* getExportMenu() { return ExportMenu;}
#endif //KAB_EMBEDDED
public slots:
#ifdef KAB_EMBEDDED
void createAboutData();
#endif //KAB_EMBEDDED
void statusMessage(QString, int time = 0 );
void showLicence();
+ void faq();
+
/**
Is called whenever a contact is selected in the view.
*/
void setContactSelected( const QString &uid );
/**
Opens the preferred mail composer with all selected contacts as
arguments.
*/
void sendMail();
/**
@@ -413,24 +415,25 @@ class KABCore : public QWidget
//US settings menu
KAction *mActionConfigResources;
KAction *mActionConfigKAddressbook;
KAction *mActionConfigShortcuts;
KAction *mActionConfigureToolbars;
KAction *mActionKeyBindings;
KToggleAction *mActionJumpBar;
KToggleAction *mActionDetails;
KAction *mActionWhoAmI;
KAction *mActionCategories;
KAction *mActionAboutKAddressbook;
KAction *mActionLicence;
+ KAction *mActionFaq;
KAction *mActionDeleteView;
QPopupMenu *viewMenu;
QPopupMenu *filterMenu;
QPopupMenu *settingsMenu;
QPopupMenu *changeMenu;
//US QAction *mActionSave;
QPopupMenu *ImportMenu;
QPopupMenu *ExportMenu;
//LR additional methods