diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-18 01:59:32 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-18 01:59:32 +0300 |
commit | 10273bc94e90fefcfe3fc215aaaaafe7e0e96bd4 (patch) | |
tree | 111df89896898fd8e5393c78fc1d0c827a43a2c0 /src/gui/widgets | |
parent | 9de5161f9d55e4e2ece1653e6cb7decf5b3f0b9b (diff) | |
download | manaplus-10273bc94e90fefcfe3fc215aaaaafe7e0e96bd4.tar.gz manaplus-10273bc94e90fefcfe3fc215aaaaafe7e0e96bd4.tar.bz2 manaplus-10273bc94e90fefcfe3fc215aaaaafe7e0e96bd4.tar.xz manaplus-10273bc94e90fefcfe3fc215aaaaafe7e0e96bd4.zip |
Remove useless includes.
Diffstat (limited to 'src/gui/widgets')
22 files changed, 198 insertions, 67 deletions
diff --git a/src/gui/widgets/chatinput.h b/src/gui/widgets/chatinput.h index 1079a219d..5ac95a928 100644 --- a/src/gui/widgets/chatinput.h +++ b/src/gui/widgets/chatinput.h @@ -27,6 +27,8 @@ #include "configuration.h" +#include "gui/windows/emotewindow.h" + #include "gui/widgets/textfield.h" #include "localconsts.h" diff --git a/src/gui/widgets/itemlinkhandler.cpp b/src/gui/widgets/itemlinkhandler.cpp index b1d277957..8bd46d440 100644 --- a/src/gui/widgets/itemlinkhandler.cpp +++ b/src/gui/widgets/itemlinkhandler.cpp @@ -29,8 +29,8 @@ #include "gui/windows/confirmdialog.h" #include "gui/windows/helpwindow.h" +#include "utils/delete2.h" #include "utils/gettext.h" -#include "utils/process.h" #include "utils/stringutils.h" #include "resources/db/itemdb.h" @@ -39,8 +39,6 @@ #include "input/mouseinput.h" -#include "utils/delete2.h" - #include <string> #include "debug.h" diff --git a/src/gui/widgets/itemshortcutcontainer.cpp b/src/gui/widgets/itemshortcutcontainer.cpp index 6a47b91ac..e04b90a4e 100644 --- a/src/gui/widgets/itemshortcutcontainer.cpp +++ b/src/gui/widgets/itemshortcutcontainer.cpp @@ -46,6 +46,7 @@ #include "gui/widgets/skillinfo.h" #include "resources/image.h" +#include "resources/skillconsts.h" #include "utils/delete2.h" diff --git a/src/gui/widgets/serverslistbox.h b/src/gui/widgets/serverslistbox.h index 03333bdb0..e8ce0365d 100644 --- a/src/gui/widgets/serverslistbox.h +++ b/src/gui/widgets/serverslistbox.h @@ -25,6 +25,10 @@ #include "gui/fonts/font.h" +#include "gui/theme.h" + +#include "gui/widgets/listbox.h" + #include "gui/models/serverslistmodel.h" #include "localconsts.h" diff --git a/src/gui/widgets/skilllistbox.h b/src/gui/widgets/skilllistbox.h index c658161ef..d2da4b150 100644 --- a/src/gui/widgets/skilllistbox.h +++ b/src/gui/widgets/skilllistbox.h @@ -25,10 +25,25 @@ #include "gui/widgets/listbox.h" +#include "dragdrop.h" + +#include "gui/skin.h" +#include "gui/viewport.h" + +#include "gui/fonts/font.h" + +#include "gui/widgets/skilldata.h" + +#include "gui/models/skillmodel.h" + +#include "gui/popups/textpopup.h" + #include "render/graphics.h" #include "utils/delete2.h" +#include "resources/skillconsts.h" + #include "localconsts.h" class SkillModel; diff --git a/src/gui/widgets/statuswindowattrs.h b/src/gui/widgets/statuswindowattrs.h index 0a4110fdc..d266b2086 100644 --- a/src/gui/widgets/statuswindowattrs.h +++ b/src/gui/widgets/statuswindowattrs.h @@ -25,8 +25,17 @@ #include "gui/widgets/container.h" +#include "gui/widgets/label.h" + +#include "events/actionevent.h" + +#include "listeners/actionlistener.h" + #include "localconsts.h" +class Button; +class LayoutHelper; + class AttrDisplay : public Container { public: diff --git a/src/gui/widgets/tabs/chattab.cpp b/src/gui/widgets/tabs/chattab.cpp index 47d5b3906..47787d25d 100644 --- a/src/gui/widgets/tabs/chattab.cpp +++ b/src/gui/widgets/tabs/chattab.cpp @@ -34,6 +34,7 @@ #include "gui/chatlog.h" +#include "gui/windows/chatwindow.h" #include "gui/windows/helpwindow.h" #include "gui/widgets/scrollarea.h" diff --git a/src/gui/widgets/tabs/chattab.h b/src/gui/widgets/tabs/chattab.h index b7c76494d..b22074623 100644 --- a/src/gui/widgets/tabs/chattab.h +++ b/src/gui/widgets/tabs/chattab.h @@ -23,9 +23,10 @@ #ifndef GUI_WIDGETS_TABS_CHATTAB_H #define GUI_WIDGETS_TABS_CHATTAB_H -#include "gui/windows/chatwindow.h" +#include "gui/chatmsgtype.h" #include "gui/widgets/browserbox.h" + #include "gui/widgets/tabs/tab.h" #include "localconsts.h" diff --git a/src/gui/widgets/tabs/debugwindowtabs.cpp b/src/gui/widgets/tabs/debugwindowtabs.cpp index cf0c6af6e..9f987c721 100644 --- a/src/gui/widgets/tabs/debugwindowtabs.cpp +++ b/src/gui/widgets/tabs/debugwindowtabs.cpp @@ -23,7 +23,6 @@ #include "gui/widgets/tabs/debugwindowtabs.h" #include "game.h" -#include "main.h" #include "being/localplayer.h" @@ -31,13 +30,10 @@ #include "gui/viewport.h" -#include "gui/windows/setupwindow.h" - #include "gui/widgets/containerplacer.h" #include "gui/widgets/label.h" #include "gui/widgets/layoutcell.h" #include "gui/widgets/layouthelper.h" -#include "gui/widgets/tabbedarea.h" #include "resources/imagehelper.h" @@ -45,7 +41,6 @@ #include "net/packetcounters.h" -#include "utils/delete2.h" #include "utils/gettext.h" #include "utils/stringutils.h" #include "utils/timer.h" diff --git a/src/gui/widgets/tabs/guildchattab.cpp b/src/gui/widgets/tabs/guildchattab.cpp index da1a651e1..933dc69b5 100644 --- a/src/gui/widgets/tabs/guildchattab.cpp +++ b/src/gui/widgets/tabs/guildchattab.cpp @@ -28,6 +28,8 @@ #include "soundconsts.h" #include "soundmanager.h" +#include "gui/windows/chatwindow.h" + #include "utils/gettext.h" #include "debug.h" diff --git a/src/gui/widgets/tabs/skilltab.h b/src/gui/widgets/tabs/skilltab.h index 330485c40..b074ca6ab 100644 --- a/src/gui/widgets/tabs/skilltab.h +++ b/src/gui/widgets/tabs/skilltab.h @@ -25,14 +25,14 @@ #include "gui/windows/skilldialog.h" +#include "gui/widgets/skilllistbox.h" + #include "gui/widgets/tabs/tab.h" #include "utils/delete2.h" #include "localconsts.h" -class SkillListBox; - class SkillTab final : public Tab { public: diff --git a/src/gui/widgets/tabs/socialattacktab.h b/src/gui/widgets/tabs/socialattacktab.h index 0f902caaf..01921b016 100644 --- a/src/gui/widgets/tabs/socialattacktab.h +++ b/src/gui/widgets/tabs/socialattacktab.h @@ -23,65 +23,21 @@ #include "gui/widgets/tabs/socialtab.h" +#include "actormanager.h" + +#include "being/localplayer.h" + +#include "gui/models/beingslistmodel.h" + +#include "gui/widgets/tabs/socialtabbase.h" + +#include "resources/map/mapitem.h" + #include "utils/delete2.h" #include "utils/gettext.h" #include "localconsts.h" -class BeingsListModel; - -#define addAvatars(mob, str, type) \ -{\ - ava = new Avatar(str);\ - ava->setOnline(false);\ - ava->setLevel(-1);\ - ava->setType(MapItem::SEPARATOR);\ - ava->setX(0);\ - ava->setY(0);\ - avatars->push_back(ava);\ - mobs = actorManager->get##mob##s();\ - i = mobs.begin();\ - i_end = mobs.end();\ - while (i != i_end)\ - {\ - std::string name;\ - int level = -1;\ - if (*i == "")\ - {\ - name = _("(default)");\ - level = 0;\ - }\ - else\ - {\ - name = *i;\ - }\ - ava = new Avatar(name);\ - ava->setOnline(true);\ - ava->setLevel(level);\ - ava->setType(MapItem::type);\ - ava->setX(0);\ - ava->setY(0);\ - avatars->push_back(ava);\ - ++ i;\ - }\ -} - -#define updateAtkListStart() \ - if (!socialWindow || !player_node || !actorManager)\ - return;\ - std::vector<Avatar*> *const avatars = mBeings->getMembers();\ - std::vector<Avatar*>::iterator ia = avatars->begin();\ - while (ia != avatars->end())\ - {\ - delete *ia;\ - ++ ia;\ - }\ - avatars->clear();\ - Avatar *ava = nullptr;\ - std::list<std::string> mobs;\ - std::list<std::string>::const_iterator i;\ - std::list<std::string>::const_iterator i_end; - class SocialAttackTab final : public SocialTab { public: diff --git a/src/gui/widgets/tabs/socialfriendstab.h b/src/gui/widgets/tabs/socialfriendstab.h index 35d5c4215..3d65e2678 100644 --- a/src/gui/widgets/tabs/socialfriendstab.h +++ b/src/gui/widgets/tabs/socialfriendstab.h @@ -23,8 +23,21 @@ #include "gui/widgets/tabs/socialtab.h" +#include "actormanager.h" +#include "avatar.h" + +#include "being/actortype.h" +#include "being/playerrelations.h" + +#include "gui/models/beingslistmodel.h" + +#include "gui/windows/whoisonline.h" + #include "utils/delete2.h" #include "utils/gettext.h" +#include "utils/stringutils.h" + +#include <algorithm> #include "localconsts.h" diff --git a/src/gui/widgets/tabs/socialguildtab.h b/src/gui/widgets/tabs/socialguildtab.h index 4647f5f07..ee40e146f 100644 --- a/src/gui/widgets/tabs/socialguildtab.h +++ b/src/gui/widgets/tabs/socialguildtab.h @@ -24,8 +24,11 @@ #include "gui/widgets/tabs/socialtab.h" +#include "being/localplayer.h" + #include "utils/delete2.h" #include "utils/gettext.h" +#include "utils/stringutils.h" #include "net/net.h" #include "net/guildhandler.h" diff --git a/src/gui/widgets/tabs/socialguildtab2.h b/src/gui/widgets/tabs/socialguildtab2.h index 62d55982a..c5702b17d 100644 --- a/src/gui/widgets/tabs/socialguildtab2.h +++ b/src/gui/widgets/tabs/socialguildtab2.h @@ -24,8 +24,13 @@ #include "gui/widgets/tabs/socialtab.h" +#include "guild.h" + +#include "being/localplayer.h" + #include "utils/delete2.h" #include "utils/gettext.h" +#include "utils/stringutils.h" #include "localconsts.h" diff --git a/src/gui/widgets/tabs/socialnavigationtab.h b/src/gui/widgets/tabs/socialnavigationtab.h index 1d0fbfa33..e8925cbb2 100644 --- a/src/gui/widgets/tabs/socialnavigationtab.h +++ b/src/gui/widgets/tabs/socialnavigationtab.h @@ -23,11 +23,28 @@ #include "gui/widgets/tabs/socialtab.h" +#include "actormanager.h" +#include "configuration.h" + +#include "gui/models/beingslistmodel.h" + +#include "gui/windows/outfitwindow.h" + +#include "being/localplayer.h" + +#include "input/keyboardconfig.h" + #include "utils/delete2.h" #include "utils/gettext.h" +#include "resources/map/map.h" +#include "resources/map/mapitem.h" +#include "resources/map/speciallayer.h" + #include "localconsts.h" +class Avatar; + class SocialNavigationTab final : public SocialTab { public: diff --git a/src/gui/widgets/tabs/socialpartytab.h b/src/gui/widgets/tabs/socialpartytab.h index dc86fb958..247414851 100644 --- a/src/gui/widgets/tabs/socialpartytab.h +++ b/src/gui/widgets/tabs/socialpartytab.h @@ -24,6 +24,10 @@ #include "gui/widgets/tabs/socialtab.h" +#include "party.h" + +#include "being/localplayer.h" + #include "net/net.h" #include "net/partyhandler.h" diff --git a/src/gui/widgets/tabs/socialpickuptab.h b/src/gui/widgets/tabs/socialpickuptab.h index ddf9924b1..15d7c3aeb 100644 --- a/src/gui/widgets/tabs/socialpickuptab.h +++ b/src/gui/widgets/tabs/socialpickuptab.h @@ -23,6 +23,14 @@ #include "gui/widgets/tabs/socialtab.h" +#include "actormanager.h" + +#include "being/localplayer.h" + +#include "gui/models/beingslistmodel.h" + +#include "gui/widgets/tabs/socialtabbase.h" + #include "utils/delete2.h" #include "utils/gettext.h" diff --git a/src/gui/widgets/tabs/socialplayerstab.h b/src/gui/widgets/tabs/socialplayerstab.h index 2026a6346..bb2e2250a 100644 --- a/src/gui/widgets/tabs/socialplayerstab.h +++ b/src/gui/widgets/tabs/socialplayerstab.h @@ -23,8 +23,22 @@ #include "gui/widgets/tabs/socialtab.h" +#include "actormanager.h" +#include "party.h" + +#include "being/being.h" + +#include "gui/models/beingslistmodel.h" + +#include "utils/gettext.h" +#include "utils/delete2.h" +#include "utils/stringutils.h" + #include "localconsts.h" +class Avatar; +class Being; + class SocialPlayersTab final : public SocialTab { public: diff --git a/src/gui/widgets/tabs/socialtab.h b/src/gui/widgets/tabs/socialtab.h index 5ba8e9884..1514c56e5 100644 --- a/src/gui/widgets/tabs/socialtab.h +++ b/src/gui/widgets/tabs/socialtab.h @@ -24,6 +24,9 @@ #include "gui/windows/socialwindow.h" +#include "gui/windows/confirmdialog.h" +#include "gui/windows/textdialog.h" + #include "gui/widgets/avatarlistbox.h" #include "gui/widgets/scrollarea.h" @@ -32,8 +35,6 @@ #include "localconsts.h" class AvatarListModel; -class ConfirmDialog; -class TextDialog; class SocialTab : public Tab { diff --git a/src/gui/widgets/tabs/socialtabbase.h b/src/gui/widgets/tabs/socialtabbase.h new file mode 100644 index 000000000..6a64ad9f0 --- /dev/null +++ b/src/gui/widgets/tabs/socialtabbase.h @@ -0,0 +1,80 @@ +/* + * The ManaPlus Client + * Copyright (C) 2011-2014 The ManaPlus Developers + * + * This file is part of The ManaPlus Client. + * + * 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 + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef GUI_WIDGETS_TABS_SOCIALTABBASE_H +#define GUI_WIDGETS_TABS_SOCIALTABBASE_H + +#include "actormanager.h" + +#include "resources/map/mapitem.h" + +#define addAvatars(mob, str, type) \ +{\ + ava = new Avatar(str);\ + ava->setOnline(false);\ + ava->setLevel(-1);\ + ava->setType(MapItem::SEPARATOR);\ + ava->setX(0);\ + ava->setY(0);\ + avatars->push_back(ava);\ + mobs = actorManager->get##mob##s();\ + i = mobs.begin();\ + i_end = mobs.end();\ + while (i != i_end)\ + {\ + std::string name;\ + int level = -1;\ + if (*i == "")\ + {\ + name = _("(default)");\ + level = 0;\ + }\ + else\ + {\ + name = *i;\ + }\ + ava = new Avatar(name);\ + ava->setOnline(true);\ + ava->setLevel(level);\ + ava->setType(MapItem::type);\ + ava->setX(0);\ + ava->setY(0);\ + avatars->push_back(ava);\ + ++ i;\ + }\ +} + +#define updateAtkListStart() \ + if (!socialWindow || !player_node || !actorManager)\ + return;\ + std::vector<Avatar*> *const avatars = mBeings->getMembers();\ + std::vector<Avatar*>::iterator ia = avatars->begin();\ + while (ia != avatars->end())\ + {\ + delete *ia;\ + ++ ia;\ + }\ + avatars->clear();\ + Avatar *ava = nullptr;\ + std::list<std::string> mobs;\ + std::list<std::string>::const_iterator i;\ + std::list<std::string>::const_iterator i_end; + +#endif // GUI_WIDGETS_TABS_SOCIALTABBASE_H diff --git a/src/gui/widgets/tabs/whispertab.cpp b/src/gui/widgets/tabs/whispertab.cpp index 023d94110..2d295dc14 100644 --- a/src/gui/widgets/tabs/whispertab.cpp +++ b/src/gui/widgets/tabs/whispertab.cpp @@ -30,6 +30,8 @@ #include "net/chathandler.h" #include "net/net.h" +#include "gui/windows/chatwindow.h" + #include "gui/widgets/windowcontainer.h" #include "debug.h" |