~ubuntu-branches/ubuntu/oneiric/kdepim/oneiric-updates

« back to all changes in this revision

Viewing changes to knode/configuration/identity_widget.h

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2011-06-28 19:33:24 UTC
  • mfrom: (0.2.13) (0.1.13 sid)
  • Revision ID: package-import@ubuntu.com-20110628193324-8yvjs8sdv9rdoo6c
Tags: 4:4.7.0-0ubuntu1
* New upstream release
  - update install files
  - add missing kdepim-doc package to control file
  - Fix Vcs lines
  - kontact breaks/replaces korganizer << 4:4.6.80
  - tighten the dependency of kdepim-dev on libkdepim4 to fix lintian error

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  Copyright 2009 Olivier Trichet <nive@nivalis.org>
 
3
 
 
4
  Permission to use, copy, modify, and distribute this software
 
5
  and its documentation for any purpose and without fee is hereby
 
6
  granted, provided that the above copyright notice appear in all
 
7
  copies and that both that the copyright notice and this
 
8
  permission notice and warranty disclaimer appear in supporting
 
9
  documentation, and that the name of the author not be used in
 
10
  advertising or publicity pertaining to distribution of the
 
11
  software without specific, written prior permission.
 
12
 
 
13
  The author disclaim all warranties with regard to this
 
14
  software, including all implied warranties of merchantability
 
15
  and fitness.  In no event shall the author be liable for any
 
16
  special, indirect or consequential damages or any damages
 
17
  whatsoever resulting from loss of use, data or profits, whether
 
18
  in an action of contract, negligence or other tortious action,
 
19
  arising out of or in connection with the use or performance of
 
20
  this software.
 
21
*/
 
22
 
 
23
#ifndef KNODE_IDENTITY_WIDGET_H
 
24
#define KNODE_IDENTITY_WIDGET_H
 
25
 
 
26
#include "ui_identity_widget.h"
 
27
 
 
28
class KNGroup;
 
29
class KNNntpAccount;
 
30
namespace KNode {
 
31
  class SettingsContainerInterface;
 
32
}
 
33
 
 
34
namespace KNode {
 
35
 
 
36
/**
 
37
  Configuration widget for an identity.
 
38
*/
 
39
class KNODE_EXPORT IdentityWidget : public KCModule, private Ui::IdentityWidget
 
40
{
 
41
  Q_OBJECT
 
42
 
 
43
  public:
 
44
    /**
 
45
      Constructor for the selection widget of identity.
 
46
    */
 
47
    explicit IdentityWidget( SettingsContainerInterface *settingsContainer, const KComponentData &inst, QWidget *parent = 0 );
 
48
 
 
49
    ~IdentityWidget();
 
50
 
 
51
  public slots:
 
52
    /**
 
53
      Reimplemented from KCModule::load().
 
54
    */
 
55
    virtual void load();
 
56
    /**
 
57
      Reimplemented from KCModule::save();
 
58
    */
 
59
    virtual void save();
 
60
 
 
61
  private:
 
62
    /**
 
63
      Loads the @p identity into this widget.
 
64
    */
 
65
    void loadFromIdentity( const KPIMIdentities::Identity &identity );
 
66
 
 
67
    /**
 
68
      Set up this widget.
 
69
      @param identity original identity of the settings container passed
 
70
      to one of the constructor (may be null)
 
71
    */
 
72
    void setup( const KPIMIdentities::Identity &identity );
 
73
 
 
74
  private slots:
 
75
    /**
 
76
      Called when a new identity is selected.
 
77
      It loads the widget with its information.
 
78
    */
 
79
    void identitySelected( uint uoid );
 
80
 
 
81
    /**
 
82
      Called when the checkbox "Use a specific identity" is
 
83
      (un)checked.
 
84
    */
 
85
    void useSpecificIdentity( bool useSpecific );
 
86
 
 
87
    /**
 
88
      Called when the user click the "modify..." button.
 
89
    */
 
90
    void modifyIdentities();
 
91
 
 
92
  private:
 
93
    /**
 
94
      The global settings, account or group passed to the constructor.
 
95
    */
 
96
    SettingsContainerInterface *mConfigurationContainer;
 
97
};
 
98
 
 
99
} // namespace KNode
 
100
 
 
101
 
 
102
#endif // KNODE_IDENTITY_WIDGET_H