diff options
Diffstat (limited to 'src/gui/widgets/tabs')
-rw-r--r-- | src/gui/widgets/tabs/chattab.cpp | 1 | ||||
-rw-r--r-- | src/gui/widgets/tabs/chattab.h | 3 | ||||
-rw-r--r-- | src/gui/widgets/tabs/debugwindowtabs.cpp | 5 | ||||
-rw-r--r-- | src/gui/widgets/tabs/guildchattab.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/tabs/skilltab.h | 4 | ||||
-rw-r--r-- | src/gui/widgets/tabs/socialattacktab.h | 64 | ||||
-rw-r--r-- | src/gui/widgets/tabs/socialfriendstab.h | 13 | ||||
-rw-r--r-- | src/gui/widgets/tabs/socialguildtab.h | 3 | ||||
-rw-r--r-- | src/gui/widgets/tabs/socialguildtab2.h | 5 | ||||
-rw-r--r-- | src/gui/widgets/tabs/socialnavigationtab.h | 17 | ||||
-rw-r--r-- | src/gui/widgets/tabs/socialpartytab.h | 4 | ||||
-rw-r--r-- | src/gui/widgets/tabs/socialpickuptab.h | 8 | ||||
-rw-r--r-- | src/gui/widgets/tabs/socialplayerstab.h | 14 | ||||
-rw-r--r-- | src/gui/widgets/tabs/socialtab.h | 5 | ||||
-rw-r--r-- | src/gui/widgets/tabs/socialtabbase.h | 80 | ||||
-rw-r--r-- | src/gui/widgets/tabs/whispertab.cpp | 2 |
16 files changed, 166 insertions, 64 deletions
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" |