2 This file is part of the KDE games library
3 Copyright (C) 2001 Andreas Beckermann (b_mann@gmx.de)
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License version 2 as published by the Free Software Foundation.
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
20 #ifndef __KCHATDIALOG_H__
21 #define __KCHATDIALOG_H__
23 #include <libkdegames_export.h>
29 class KChatDialogPrivate
;
32 * \class KChatDialog kchatdialog.h <KChatDialog>
34 class KDEGAMES_EXPORT KChatDialog
: public KDialog
39 * Construct a KChatDialog widget
41 explicit KChatDialog(QWidget
* parent
, bool modal
= false);
44 * Construct a KChatDialog widget which automatically configures the
45 * @ref KChatBase widget. You probably want to use this as you don't
46 * have to care about the configuration stuff yourself.
48 KChatDialog(KChatBase
* chatWidget
, QWidget
* parent
, bool modal
= false);
56 * @return The font that shall be used as the "name: " part of a normal
59 QFont
nameFont() const;
62 * @return The font that shall be used for normal messages.
64 QFont
textFont() const;
67 * @return The font that shall be used as the "name: " part of a system
70 QFont
systemNameFont() const;
73 * @return The font that shall be used for a system (game) message.
75 QFont
systemTextFont() const;
78 * Set the widget that will be configured by the dialog. Use this if you
79 * don't want to configure the widget yourself.
80 * @param widget The chat widget that shall be configured
81 * @param applyFonts Whether you want to have the current @ref KChatBase fonts as
82 * defaults in the dialog
84 void plugChatWidget(KChatBase
* widget
, bool applyFonts
= true);
87 * Used to configure the chat widget according to the user settings.
88 * This is called automatically if @ref plugChatWidget was called
90 * @param widget The chat widget that shall be configured
92 void configureChatWidget(KChatBase
* widget
);
95 * @return The maximal allowed messages in the chat widget. -1 is
98 int maxMessages() const;
101 void slotGetNameFont();
102 void slotGetTextFont();
103 void slotGetSystemNameFont();
104 void slotGetSystemTextFont();
106 virtual void slotApply();
107 virtual void slotOk();
110 void setNameFont(QFont
);
111 void setTextFont(QFont
);
112 void setSystemNameFont(QFont
);
113 void setSystemTextFont(QFont
);
114 void setMaxMessages(int max
);
120 KChatDialogPrivate
* const d
;