| 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 | |
|---|
| 26 | class QCheckBox; |
|---|
| 27 | class QLineEdit; |
|---|
| 28 | |
|---|
| 29 | class ICQUser; |
|---|
| 30 | |
|---|
| 31 | namespace LicqQtGui |
|---|
| 32 | { |
|---|
| 33 | class KeyView : public QTreeWidget |
|---|
| 34 | { |
|---|
| 35 | Q_OBJECT |
|---|
| 36 | |
|---|
| 37 | public: |
|---|
| 38 | KeyView(QString id, unsigned long ppid, QWidget* parent = 0); |
|---|
| 39 | ~KeyView() {}; |
|---|
| 40 | |
|---|
| 41 | private: |
|---|
| 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 | |
|---|
| 51 | class GPGKeySelect : public QDialog |
|---|
| 52 | { |
|---|
| 53 | Q_OBJECT |
|---|
| 54 | public: |
|---|
| 55 | GPGKeySelect(QString id, unsigned long ppid, QWidget* parent = 0); |
|---|
| 56 | ~GPGKeySelect(); |
|---|
| 57 | |
|---|
| 58 | signals: |
|---|
| 59 | void signal_done(); |
|---|
| 60 | |
|---|
| 61 | private: |
|---|
| 62 | QTreeWidget* keySelect; |
|---|
| 63 | QCheckBox* useGPG; |
|---|
| 64 | QString szId; |
|---|
| 65 | unsigned long nPPID; |
|---|
| 66 | void updateIcon(); |
|---|
| 67 | QLineEdit* filterText; |
|---|
| 68 | |
|---|
| 69 | private 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 |
|---|