~joerg-ehrichs/botrace/master

« back to all changes in this revision

Viewing changes to src/client/programchatdock.h

  • Committer: Jörg Ehrichs
  • Date: 2012-07-25 13:09:25 UTC
  • Revision ID: git-v1:08eb05e7719caeb1ff6bbc9d723f47f8dfb38a0c
better looking participant list and overall gamewindow

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2012 Jörg Ehrichs <joerg.ehrichs@gmx.de>
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or
 
5
 * modify it under the terms of the GNU General Public License as
 
6
 * published by the Free Software Foundation; either version 2 of
 
7
 * the License, or (at your option) any later version.
 
8
 *
 
9
 * This program 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
 
12
 * GNU General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU General Public License
 
15
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
16
 */
 
17
 
 
18
#ifndef PROGRAMCHATDOCK_H
 
19
#define PROGRAMCHATDOCK_H
 
20
 
 
21
#include <QDockWidget>
 
22
 
 
23
namespace Ui {
 
24
class ProgramChatDock;
 
25
}
 
26
 
 
27
namespace BotRace {
 
28
namespace Client {
 
29
 
 
30
class ProgrammingWidget;
 
31
 
 
32
/**
 
33
 * @brief Dock container which holds the Programming widget and the chatline for the network mode
 
34
 *
 
35
 * The programming widget is centered in the widget (which is usually at the bottom of the game)
 
36
 * When the networkmode is endabled there will be also a send chat button and a line edit added to the widget
 
37
 * to allow the player to chat with their opponents
 
38
 */
 
39
class ProgramChatDock : public QDockWidget
 
40
{
 
41
    Q_OBJECT
 
42
    
 
43
public:
 
44
    explicit ProgramChatDock(QWidget *parent = 0);
 
45
    ~ProgramChatDock();
 
46
 
 
47
    /**
 
48
     * @brief returns teh created Programming widget to allow interaction with it
 
49
     * @return the used programming widget
 
50
     */
 
51
    BotRace::Client::ProgrammingWidget *getProgrammingWidget();
 
52
 
 
53
    /**
 
54
     * @brief Shows the send chat button and the line edit
 
55
     * @param chatOn @arg true enable chat @arg false disable chat
 
56
     */
 
57
    void setNetworkMode(bool chatOn);
 
58
 
 
59
private slots:
 
60
    /**
 
61
     * @brief Whenever the gui scale is changed (via QMenu entry) this dockwidget will be minimized to the available space
 
62
     *
 
63
     * The dockwidget will never be bigger or smaller than the  Programming widget + (if enabled ) the chat interface
 
64
     *
 
65
     * @param newHight height of the programming widget
 
66
     */
 
67
    void setNewSize(int newHight);
 
68
    
 
69
private:
 
70
    Ui::ProgramChatDock *ui;
 
71
};
 
72
 
 
73
}
 
74
}
 
75
 
 
76
#endif // PROGRAMCHATDOCK_H