File: look_basic.h

package info (click to toggle)
kdeutils 4%3A2.2.2-9.2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 8,892 kB
  • ctags: 10,879
  • sloc: cpp: 82,942; sh: 11,754; ansic: 4,638; perl: 1,852; makefile: 706; python: 258
file content (65 lines) | stat: -rw-r--r-- 2,098 bytes parent folder | download
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
/* -*- C++ -*-
   This file implements the base class for kabs looks.

   the KDE addressbook

   $ Author: Mirko Boehm $
   $ Copyright: (C) 1996-2000, Mirko Boehm $
   $ Contact: mirko@kde.org
         http://www.kde.org $
   $ License: GPL with the following explicit clarification:
         This code may be linked against any version of the Qt toolkit
         from Troll Tech, Norway. $

   $Revision: 1.9 $	 
*/

#ifndef LOOK_KABBASIC_H
#define LOOK_KABBASIC_H

// this includes the AddressBook::Entry definition
class KabAPI;

#include <kabapi.h>

/** This is a pure virtual base class that defines the
 *  interface for how to display and change entries of
 *  the KDE addressbook.
 *
 *  This basic widget does not show anything in its client space.
 *  Derive it and implement its look and how the user may edit the
 *  entry.
 *
 *  The repaintEvent() has to paint the whole widget, since repaint()
 *  calls will not delete the widgets background. */
class KABBasicLook : public QWidget
{
  Q_OBJECT
public:
  /** The constructor. */
  KABBasicLook(KabAPI* database, QWidget* parent=0, const char* name=0);
  /** Set the entry. It will be displayed automatically. */
  virtual void setEntry(const AddressBook::Entry&);
  /** Get the current entry. */
  virtual void getEntry(AddressBook::Entry& entry);
signals:
  /** This signal is emitted when the user changed the entry. */
  void entryChanged();
  /** This signal indicates that the entry need sto be changed
      immidiately in the database. This might be due to changes in
      values that are available in menus. */
  void saveMe();
  /** The user acticated the email address displayed. This may happen
      by, for example, clicking on the displayed mailto-URL. */
  void sendEmail(const QString& address);
  /** The user activated one of the displayed HTTP URLs. For example
      by clicking on the displayed homepage address. */
  void browse(const QString& url);
protected:
  /** The displayed entry. */
  AddressBook::Entry current;
  /** Pointer to the database object. */
  KabAPI *db;
};

#endif // LOOK_KABBASIC_H