diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-16 22:46:32 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-16 22:46:32 +0300 |
commit | ee8cf11ee976b74167549b3e74c1c092e1623c49 (patch) | |
tree | 8cfab7fb00c36b619dee2d7296ec9d0650ad46ed /src/gui/windows/socialwindow.cpp | |
parent | 0f51cc8fb7f07c0d7d8354685897df193426de9e (diff) | |
download | plus-ee8cf11ee976b74167549b3e74c1c092e1623c49.tar.gz plus-ee8cf11ee976b74167549b3e74c1c092e1623c49.tar.bz2 plus-ee8cf11ee976b74167549b3e74c1c092e1623c49.tar.xz plus-ee8cf11ee976b74167549b3e74c1c092e1623c49.zip |
Move socialtab into separate file.
Diffstat (limited to 'src/gui/windows/socialwindow.cpp')
-rw-r--r-- | src/gui/windows/socialwindow.cpp | 83 |
1 files changed, 1 insertions, 82 deletions
diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp index 711f5b8bc..eb16cddf8 100644 --- a/src/gui/windows/socialwindow.cpp +++ b/src/gui/windows/socialwindow.cpp @@ -55,6 +55,7 @@ #include "gui/widgets/tabbedarea.h" #include "gui/widgets/tabs/chattab.h" +#include "gui/widgets/tabs/socialtab.h" #include "net/net.h" #include "net/guildhandler.h" @@ -94,88 +95,6 @@ namespace } friendSorter; } // namespace -class SocialTab : public Tab -{ -public: - A_DELETE_COPY(SocialTab) - - virtual void invite() - { - } - - virtual void leave() - { - } - - virtual void updateList() - { - } - - virtual void updateAvatar(const std::string &name A_UNUSED) - { - } - - virtual void resetDamage(const std::string &name A_UNUSED) - { - } - - virtual void selectIndex(const unsigned num A_UNUSED) - { } - - virtual void buildCounter(const int online A_UNUSED = 0, - const int total A_UNUSED = 0) - { - } - -protected: - friend class SocialWindow; - - explicit SocialTab(const Widget2 *const widget): - Tab(widget), - mInviteDialog(nullptr), - mConfirmDialog(nullptr), - mScroll(nullptr), - mList(nullptr), - mCounterString() - { - } - - virtual ~SocialTab() - { - // Cleanup dialogs - if (mInviteDialog) - { - mInviteDialog->close(); - mInviteDialog->scheduleDelete(); - mInviteDialog = nullptr; - } - - if (mConfirmDialog) - { - mConfirmDialog->close(); - mConfirmDialog->scheduleDelete(); - mConfirmDialog = nullptr; - } - } - - void setCurrent() override final - { - updateCounter(); - } - - void updateCounter() const - { - if (socialWindow) - socialWindow->setCounter(this, mCounterString); - } - - TextDialog *mInviteDialog; - ConfirmDialog *mConfirmDialog; - ScrollArea *mScroll; - AvatarListBox *mList; - std::string mCounterString; -}; - class SocialGuildTab final : public SocialTab, public ActionListener { public: |