summaryrefslogtreecommitdiffstats
path: root/konversation/src/statuspanel.h
blob: fa1bb0308697a98c8f424ba3b9f1e924e80734b8 (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
/*
  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) 2003 Dario Abatianni <eisfuchs@tigress.com>
  Copyright (C) 2006-2008 Eike Hein <hein@kde.org>
*/

#ifndef STATUSPANEL_H
#define STATUSPANEL_H

#include "chatwindow.h"

#include <tqstring.h>


class TQPushButton;
class TQCheckBox;
class TQLabel;
class TQComboBox;

class IRCInput;
class NickChangeDialog;

class StatusPanel : public ChatWindow
{
    Q_OBJECT
  

    public:
        explicit StatusPanel(TQWidget* parent);
        ~StatusPanel();

        virtual void setName(const TQString& newName);

        virtual TQString getTextInLine();
        virtual bool closeYourself(bool askForConfirmation=true);
        virtual bool canBeFrontView();
        virtual bool searchView();

        virtual void setChannelEncoding(const TQString& encoding);
        virtual TQString getChannelEncoding();
        virtual TQString getChannelEncodingDefaultDesc();
        virtual void emitUpdateInfo();

        void setIdentity(const IdentityPtr identity);

        virtual bool isInsertSupported() { return true; }

        virtual void setNotificationsEnabled(bool enable);

    signals:
        void sendFile();

    public slots:
        void setNickname(const TQString& newNickname);
        virtual void indicateAway(bool show);
        void showNicknameBox(bool show);
        void updateAppearance();
        virtual void appendInputText(const TQString&, bool fromCursor);
        void updateName();
        void serverSaysClose();

    protected slots:
        void sendFileMenu();
        void statusTextEntered();
        void sendStatusText(const TQString& line);
        // connected to IRCInput::textPasted() - used for large/multiline pastes
        void textPasted(const TQString& text);
        void changeNickname(const TQString& newNickname);
        void nicknameComboboxChanged();
        //Used to disable functions when not connected
        virtual void serverOnline(bool online);

        void popupCommand(int command);

    protected:

        /** Called from ChatWindow adjustFocus */
        virtual void childAdjustFocus();

        bool awayChanged;
        bool awayState;

        void showEvent(TQShowEvent* event);

        TQComboBox* nicknameCombobox;
        TQLabel* awayLabel;
        IRCInput* statusInput;
        TQCheckBox* logCheckBox;
        TQString oldNick;
};
#endif