summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kabcore.h
Side-by-side diff
Diffstat (limited to 'kaddressbook/kabcore.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.h38
1 files changed, 17 insertions, 21 deletions
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h
index e89bf41..ef61d6d 100644
--- a/kaddressbook/kabcore.h
+++ b/kaddressbook/kabcore.h
@@ -11,84 +11,85 @@
but WITHOUT ANY WARRANTY; without even the implied warranty of
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.
*/
#ifndef KABCORE_H
#define KABCORE_H
#include <kabc/field.h>
#ifndef KAB_EMBEDDED
#endif //KAB_EMBEDDED
#include <qdict.h>
#include <qwidget.h>
#include <qpopupmenu.h>
+#include <ksyncmanager.h>
namespace KABC {
class AddressBook;
}
#ifndef KAB_EMBEDDED
class KAboutData;
class KConfig;
class KAddressBookService;
class LDAPSearchDialog;
#else //KAB_EMBEDDED
class KAddressBookMain;
//US class QAction;
#endif //KAB_EMBEDDED
class KCMultiDialog;
class KXMLGUIClient;
class ExtensionManager;
class XXPortManager;
class JumpButtonBar;
class IncSearchWidget;
class KDGanttMinimizeSplitter;
class KAction;
class KActionCollection;
class KToggleAction;
class KSyncProfile;
class QAction;
class QMenuBar;
class QSplitter;
class ViewContainer;
class ViewManager;
class AddresseeEditorDialog;
class Ir;
-class KABCore : public QWidget
+class KABCore : public QWidget, public KSyncInterface
{
Q_OBJECT
public:
KABCore( KAddressBookMain *client, bool readWrite, QWidget *parent, const char *name = 0 );
~KABCore();
#ifdef KAB_EMBEDDED
//US added functionality
QPopupMenu* getViewMenu() {return viewMenu;}
QPopupMenu* getFilterMenu() {return filterMenu;}
QPopupMenu* getSettingsMenu() {return settingsMenu;}
void addActionsManually();
#endif //KAB_EMBEDDED
/**
Restores the global settings.
*/
void restoreSettings();
/**
Saves the global settings.
@@ -320,49 +321,49 @@ class KABCore : public QWidget
*/
void openLDAPDialog();
/**
Creates a KAddressBookPrinter, which will display the print
dialog and do the printing.
*/
void print();
/**
Registers a new GUI client, so plugins can register its actions.
*/
void addGUIClient( KXMLGUIClient *client );
void requestForNameEmailUidList(const QString& sourceChannel, const QString& sessionuid);
void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid);
signals:
void contactSelected( const QString &name );
void contactSelected( const QPixmap &pixmap );
public slots:
void setDetailsVisible( bool visible );
void setDetailsToState();
- void slotSyncMenu( int );
+ // void slotSyncMenu( int );
private slots:
void setJumpButtonBarVisible( bool visible );
void importFromOL();
void extensionModified( const KABC::Addressee::List &list );
void extensionChanged( int id );
void clipboardDataChanged();
void updateActionMenu();
void configureKeyBindings();
void removeVoice();
#ifdef KAB_EMBEDDED
void configureResources();
#endif //KAB_EMBEDDED
void slotEditorDestroyed( const QString &uid );
void configurationChanged();
void addressBookChanged();
private:
void initGUI();
void initActions();
AddresseeEditorDialog *createAddresseeEditorDialog( QWidget *parent,
const char *name = 0 );
@@ -426,60 +427,55 @@ class KABCore : public QWidget
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
KAction *mActionRemoveVoice;
KAction * mActionImportOL;
#ifndef KAB_EMBEDDED
KAddressBookService *mAddressBookService;
#endif //KAB_EMBEDDED
class KABCorePrivate;
KABCorePrivate *d;
- bool mBlockSaveFlag;
+ //US bool mBlockSaveFlag;
#ifdef KAB_EMBEDDED
KAddressBookMain *mMainWindow; // should be the same like mGUIClient
#endif //KAB_EMBEDDED
+
+ //this are the overwritten callbackmethods from the syncinterface
+ virtual bool sync(KSyncManager* manager, QString filename, int mode);
+ virtual bool syncExternal(KSyncManager* manager, QString resource);
+
+ //called by the syncmanager to indicate that the work has to marked as dirty.
+ virtual void sync_setModified();
+ //called by the syncmanager to ask if the dirty flag is set.
+ virtual bool KABCore::sync_isModified();
+ //called by the syncmanager to indicate that the work has to be saved.
+ virtual void sync_save();
+
// LR *******************************
// sync stuff!
QPopupMenu *syncMenu;
- void fillSyncMenu();
- QString mCurrentSyncDevice;
- QString mCurrentSyncName;
- void quickSyncLocalFile();
- bool syncWithFile( QString fn , bool quick );
- void syncLocalFile();
- void syncPhone();
- void syncSharp();
- bool syncExternal(QString);
- void multiSync( bool askforPrefs );
- int mCurrentSyncProfile ;
- void syncRemote( KSyncProfile* prof, bool ask = true);
- void edit_sync_options();
- bool syncAB(QString filename, int mode);
- int ringSync();
- QString getPassword( );
+ KSyncManager* syncManager;
int mGlobalSyncMode;
bool synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode);
KABC::Addressee getLastSyncAddressee();
QDateTime mLastAddressbookSync;
int takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full );
- public slots:
- void confSync();
// *********************
};
#endif