summaryrefslogtreecommitdiffstats
path: root/kmobile/kmobileview.h
blob: fb50ce5cec1e2808f8c84491741a23ac0bccdd02 (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 <kdemacros.h>
class TDEConfig;
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
  
public:
    KMobileView(TQWidget *parent, TDEConfig *_config);
    virtual ~KMobileView();

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

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

    void removeDevice( TQString deviceName );
    void configDevice( TQString deviceName );

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

    TQString deviceClassName( TQString deviceName );
    TQString deviceName( TQString deviceName );
    TQString revision( TQString deviceName );
    int classType( TQString deviceName );

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

    TQString iconFileName( TQString deviceName );

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

    int numCalendarEntries( TQString deviceName );

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

    /* devices tdeioslave support: */
    TQStringList tdeio_devices_deviceInfo(TQString deviceName);

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

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

protected slots:
    void slotDoubleClicked( TQIconViewItem * item );

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

private:
    TDEConfig *m_config;

};

#endif // _KMOBILEVIEW_H_