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

Revision 6463, 1.8 kB (checked in by flynd, 4 months ago)

Use a const pointer for user objects that are only fetched for read access. Fixed some places where we changed the user even though we just had a read lock.

  • 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) 2005-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 GPGKEYSELECT_H
21#define GPGKEYSELECT_H
22
23#include <QDialog>
24#include <QTreeWidget>
25
26class QCheckBox;
27class QLineEdit;
28
29class ICQUser;
30
31namespace LicqQtGui
32{
33class KeyView : public QTreeWidget
34{
35  Q_OBJECT
36
37public:
38  KeyView(QString id, unsigned long ppid, QWidget* parent = 0);
39  ~KeyView() {};
40
41private:
42  QString szId;
43  unsigned long nPPID;
44  void testViewItem(QTreeWidgetItem* item, const ICQUser* u);
45  int maxItemVal;
46  QTreeWidgetItem* maxItem;
47  void initKeyList();
48  virtual void resizeEvent(QResizeEvent* event);
49};
50
51class GPGKeySelect : public QDialog
52{
53  Q_OBJECT
54public:
55  GPGKeySelect(QString id, unsigned long ppid, QWidget* parent = 0);
56  ~GPGKeySelect();
57
58signals:
59  void signal_done();
60
61private:
62  QTreeWidget* keySelect;
63  QCheckBox* useGPG;
64  QString szId;
65  unsigned long nPPID;
66  void updateIcon();
67  QLineEdit* filterText;
68
69private slots:
70  void slot_ok();
71  void slotNoKey();
72  void slotCancel();
73  void slot_doubleClicked(QTreeWidgetItem* item, int column);
74  void filterTextChanged(const QString& str);
75};
76
77} // namespace LicqQtGui
78
79#endif
Note: See TracBrowser for help on using the browser.