root/trunk/qt4-gui/src/dialogs/ownermanagerdlg.h

Revision 5899, 2.6 kB (checked in by flynd, 12 months ago)

Fixed coding style and member names in OwnerManagerDlg?.

  • Property svn:eol-style set to native
Line 
1/*
2 * This file is part of Licq, an instant messaging client for UNIX.
3 * Copyright (C) 2004-2006 Licq developers
4 *
5 * Licq is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * Licq is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with Licq; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18 */
19
20#ifndef OWNERMANAGERDLG_H
21#define OWNERMANAGERDLG_H
22
23#include <QDialog>
24
25class QPushButton;
26class QTreeWidget;
27class QTreeWidgetItem;
28
29namespace LicqQtGui
30{
31class RegisterUserDlg;
32
33/**
34 * Dialog for managing accounts
35 */
36class OwnerManagerDlg : public QDialog
37{
38   Q_OBJECT
39
40public:
41  /**
42   * Create and show owner manager dialog or raise it if already exists
43   */
44  static void showOwnerManagerDlg();
45
46private slots:
47  /**
48   * List was clicked
49   *
50   * @param item Current list item
51   */
52  void listClicked(QTreeWidgetItem* item);
53
54  /**
55   * Add an existing account
56   */
57  void addOwner();
58
59  /**
60   * Register a new account
61   */
62  void registerOwner();
63
64  /**
65   * Registration dialog has finished
66   *
67   * @param success True if a new account was created
68   * @param newId Contact id of new account
69   * @param newPpid Protocal id of new account
70   */
71  void registerDone(bool success, QString newId, unsigned long newPpid);
72
73  /**
74   * Edit currently selected account
75   */
76  void modifyOwner();
77
78  /**
79   * Edit an account
80   *
81   * @param item Account item, from list, to edit
82   * @param column List column, not used
83   */
84  void modifyOwner(QTreeWidgetItem* item, int column = 0);
85
86  /**
87   * Remove currently select account
88   */
89  void removeOwner();
90
91  /**
92   * Refresh account list
93   */
94  void updateOwners();
95
96private:
97  static OwnerManagerDlg* myInstance;
98
99  /**
100   * Constructor
101   * Private so it can only be access through the singleton interface
102   *
103   * @parent Parent window
104   */
105  OwnerManagerDlg(QWidget* parent = NULL);
106
107  /**
108   * Destructor
109   */
110  virtual ~OwnerManagerDlg();
111
112  RegisterUserDlg* registerUserDlg;
113
114  QTreeWidget* ownerView;
115  QPushButton* addButton;
116  QPushButton* registerButton;
117  QPushButton* modifyButton;
118  QPushButton* removeButton;
119  QPushButton* closeButton;
120};
121
122} // namespace LicqQtGui
123
124#endif // OWNERMANAGERDLG_H
Note: See TracBrowser for help on using the browser.