summaryrefslogtreecommitdiffstats
path: root/kmobile/kmobileview.h
blob: 4c0826f53f88b2c4361d15c58ad7f4d30af903c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/*
 * Copyright (C) 2003 Helge Deller <deller@kde.org>
 */

#ifndef _KMOBILEVIEW_H_
#define _KMOBILEVIEW_H_

#include <tqiconview.h>

#include "kmobileiface.h"

#include <kdepimmacros.h>
class KConfig;
class KMobileItem;

/**
 * This is the main view class for kmobile.
 *
 * @short Main view
 * @author Helge Deller <deller@kde.org>
 * @version 0.1
 */
class KDE_EXPORT KMobileView : public TQIconView, public kmobileIface
{
    Q_OBJECT
  TQ_OBJECT
public:
    KMobileView(TQWidget *parent, KConfig *_config);
    virtual ~KMobileView();

    bool addNewDevice(KConfig *config, KService::Ptr service);
    bool startKonqueror(const TQString &devName);

    /**
     * DCOP implementation
     */
    TQStringList tqdeviceNames();

    void removeDevice( TQString tqdeviceName );
    void configDevice( TQString tqdeviceName );

    bool connectDevice( TQString tqdeviceName );
    bool disconnectDevice( TQString tqdeviceName );
    bool connected( TQString tqdeviceName );

    TQString tqdeviceClassName( TQString tqdeviceName );
    TQString tqdeviceName( TQString tqdeviceName );
    TQString revision( TQString tqdeviceName );
    int classType( TQString tqdeviceName );

    int capabilities( TQString tqdeviceName );
    TQString nameForCap( TQString tqdeviceName, int cap );

    TQString iconFileName( TQString tqdeviceName );

    int     numAddresses( TQString tqdeviceName );
    TQString readAddress( TQString tqdeviceName, int index );
    bool    storeAddress( TQString tqdeviceName, int index, TQString vcard, bool append );

    int numCalendarEntries( TQString tqdeviceName );

    int numNotes( TQString tqdeviceName );
    TQString readNote( TQString tqdeviceName, int index );
    bool storeNote( TQString tqdeviceName, int index, TQString note );

    /* tqdevices kioslave support: */
    TQStringList kio_tqdevices_tqdeviceInfo(TQString tqdeviceName);

public:
    void saveAll();
    void restoreAll();

protected:
    KMobileItem * findDevice( const TQString &tqdeviceName ) const;

protected slots:
    void slotDoubleClicked( TQIconViewItem * item );

signals:
    /**
     * Use this signal to change the content of the statusbar
     */
    void signalChangeStatusbar(const TQString& text);

private:
    KConfig *m_config;

};

#endif // _KMOBILEVIEW_H_