kaddressbook Library API Documentation

actionmanager.h

00001 #ifndef ACTIONMANAGER_H
00002 #define ACTIONMANAGER_H
00003 
00004 /*
00005     This file is part of KAddressBook.
00006     Copyright (c) 2002 Mike Pilone <mpilone@slac.com>
00007 
00008     This program is free software; you can redistribute it and/or modify
00009     it under the terms of the GNU General Public License as published by
00010     the Free Software Foundation; either version 2 of the License, or
00011     (at your option) any later version.
00012 
00013     This program is distributed in the hope that it will be useful,
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00016     GNU General Public License for more details.
00017 
00018     You should have received a copy of the GNU General Public License
00019     along with this program; if not, write to the Free Software
00020     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00021 
00022     As a special exception, permission is given to link this program
00023     with any edition of Qt, and distribute the resulting executable,
00024     without including the source code for Qt in the source distribution.
00025 */
00026 
00027 #include <qptrlist.h>
00028 #include <qobject.h>
00029 
00030 #include <kaction.h>
00031 
00032 class KXMLGUIClient;
00033 class KAddressBook;
00034 class ViewManager;
00035 
00040 class ActionManager : public QObject
00041 {
00042   Q_OBJECT
00043 
00044   public:
00045     ActionManager(KXMLGUIClient *client, KAddressBook *widget,
00046                   bool readWrite, QObject *parent);
00047     ~ActionManager();
00048 
00049     void setReadWrite(bool rw);
00050 
00051     bool isModified();
00052 
00053   public slots:
00054     void initActionViewList();
00055 
00056   protected slots:
00061     void addresseeSelected(bool selected);
00062 
00064     void setFilterNames(const QStringList&);
00065 
00067     void setCurrentFilterName(const QString&);
00068 
00070     void setCurrentFilter(int index);
00071 
00076     void modified(bool mod);
00077 
00080     void selectViewAction();
00081 
00085     void viewConfigChanged(const QString &newActive);
00086 
00090     void quickToolsAction();
00091 
00092     void updateEditMenu();
00093 
00094   private slots:
00095     void clipboardDataChanged();
00096 
00098     void slotFilterActivated(int);
00099 
00100   signals:
00102     void filterActivated(int);
00103   private:
00107     void initReadOnlyActions();
00108 
00112     void initReadWriteActions();
00113 
00116     void destroyReadWriteActions();
00117 
00118     bool mReadWrite;
00119     bool mModified;
00120 
00121     QString mActiveViewName;
00122 
00123     KAddressBook *mWidget;
00124     ViewManager *mViewManager;
00125     KXMLGUIClient *mGUIClient;
00126     KActionCollection *mACollection;
00127 
00128     KAction *mActionPaste;
00129     KAction *mActionCut;
00130     KAction *mActionDelete;
00131     KAction *mActionCopy;
00132     KAction *mActionEditAddressee;
00133     KAction *mActionMail;
00134     KAction *mActionUndo;
00135     KAction *mActionRedo;
00136     KAction *mActionSave;
00137     KAction *mActionDeleteView;
00138     QPtrList<KAction> mActionViewList;
00139     KToggleAction *mActiveActionView;
00140     KToggleAction *mActionJumpBar;
00141     KSelectAction *mActionFeatures;
00142     KToggleAction *mActionDetails;
00143     KSelectAction *mActionSelectFilter;
00144 };
00145 
00146 #endif
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 15 11:40:36 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001