summaryrefslogtreecommitdiffstats
path: root/konversation/src/identitydialog.h
blob: d22170de1c38afc45ac9360059b9c204efb19bd3 (plain)
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/*
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
*/

/*
  copyright: (C) 2004 by Peter Simonsson
  email:     psn@linux.se
*/
#ifndef KONVERSATIONIDENTITYDIALOG_H
#define KONVERSATIONIDENTITYDIALOG_H

#include "identity.h"

#include <kdialogbase.h>


class KComboBox;
class KLineEdit;
class TQCheckBox;
class TQSpinBox;
class TQListBox;
class TQGroupBox;
class TQToolButton;

namespace Konversation
{

    class IdentityDialog : public KDialogBase
    {
        Q_OBJECT
  
        public:
            explicit IdentityDialog(TQWidget *parent = 0, const char *name = 0);
            ~IdentityDialog();
            void setCurrentIdentity(int index);
            IdentityPtr setCurrentIdentity(IdentityPtr identity);
            IdentityPtr currentIdentity() const;


        signals:
            void identitiesChanged();


        protected slots:
            void updateIdentity(int index);

            void addNickname();
            void editNickname();
            void deleteNickname();
            void updateButtons();
            void moveNicknameUp();
            void moveNicknameDown();

            void refreshCurrentIdentity();

            void slotOk();

            void newIdentity();
            void renameIdentity();
            void deleteIdentity();
            void copyIdentity();


        private:
            KComboBox* m_identityCBox;
            KLineEdit* m_realNameEdit;
            KLineEdit* m_sCommandEdit;
            KLineEdit* m_loginEdit;
            KComboBox* m_codecCBox;
            KLineEdit* m_botEdit;
            KLineEdit* m_passwordEdit;
            KLineEdit* m_quitEdit;
            KLineEdit* m_partEdit;
            KLineEdit* m_kickEdit;
            KLineEdit* m_awayEdit;
            KLineEdit* m_unAwayEdit;
            KLineEdit* m_awayNickEdit;
            TQCheckBox* m_insertRememberLineOnAwayChBox;
            TQListBox* m_nicknameLBox;
            TQGroupBox* m_awayMessageGBox;
            TQGroupBox* m_automaticAwayGBox;
            TQSpinBox* m_awayInactivitySpin;
            TQCheckBox* m_automaticUnawayChBox;
            TQToolButton* m_editBtn;
            TQToolButton* m_delBtn;
            TQToolButton* m_upNicknameBtn;
            TQToolButton* m_downNicknameBtn;
            TQPushButton* m_addNicknameBtn;
            TQPushButton* m_changeNicknameBtn;
            TQPushButton* m_removeNicknameBtn;

            IdentityList m_identityList;
            IdentityPtr m_currentIdentity;
    };

}
#endif