From be9b998b2ee87c0238c2ed1b41c8c2bc723f4ce4 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 28 Jul 2014 20:06:11 +0300 Subject: Fix formatting in gui files. --- src/gui/windows/whoisonline.h | 169 +++++++++++++++++++++--------------------- 1 file changed, 85 insertions(+), 84 deletions(-) (limited to 'src/gui/windows/whoisonline.h') diff --git a/src/gui/windows/whoisonline.h b/src/gui/windows/whoisonline.h index 6e49308d4..504013712 100644 --- a/src/gui/windows/whoisonline.h +++ b/src/gui/windows/whoisonline.h @@ -49,124 +49,125 @@ class WhoIsOnline final : public Window, public ActionListener, public ConfigListener { -public: - /** - * Constructor. - */ - WhoIsOnline(); + public: + /** + * Constructor. + */ + WhoIsOnline(); - A_DELETE_COPY(WhoIsOnline) + A_DELETE_COPY(WhoIsOnline) - /** - * Destructor - */ - ~WhoIsOnline(); + /** + * Destructor + */ + ~WhoIsOnline(); - void postInit() override final; + void postInit() override final; - /** - * Loads and display online list from the memory buffer. - */ - void loadWebList(); + /** + * Loads and display online list from the memory buffer. + */ + void loadWebList(); - void loadList(const std::vector &list); + void loadList(const std::vector &list); - void handleLink(const std::string& link, - MouseEvent *event) override final; + void handleLink(const std::string& link, + MouseEvent *event) override final; - void logic() override final; + void logic() override final; - void slowLogic(); + void slowLogic(); - void action(const ActionEvent &event) override final; + void action(const ActionEvent &event) override final; - void widgetResized(const Event &event) override final; + void widgetResized(const Event &event) override final; - const std::set &getOnlinePlayers() const A_WARN_UNUSED - { return mOnlinePlayers; } + const std::set &getOnlinePlayers() const A_WARN_UNUSED + { return mOnlinePlayers; } - const std::set &getOnlineNicks() const A_WARN_UNUSED - { return mOnlineNicks; } + const std::set &getOnlineNicks() const A_WARN_UNUSED + { return mOnlineNicks; } - void setAllowUpdate(const bool n) - { mAllowUpdate = n; } + void setAllowUpdate(const bool n) + { mAllowUpdate = n; } - void optionChanged(const std::string &name) override final; + void optionChanged(const std::string &name) override final; - void updateList(StringVect &list); + void updateList(StringVect &list); - void readFromWeb(); + void readFromWeb(); - static void setNeutralColor(OnlinePlayer *const player); + static void setNeutralColor(OnlinePlayer *const player); - void getPlayerNames(StringVect &names); + void getPlayerNames(StringVect &names); -private: - void download(); + private: + void download(); - void updateSize(); + void updateSize(); - void handlerPlayerRelation(const std::string &nick, - OnlinePlayer *const player); - /** - * The thread function that download the files. - */ - static int downloadThread(void *ptr); + void handlerPlayerRelation(const std::string &nick, + OnlinePlayer *const player); + /** + * The thread function that download the files. + */ + static int downloadThread(void *ptr); - /** - * A libcurl callback for writing to memory. - */ - static size_t memoryWrite(void *ptr, size_t size, size_t nmemb, - FILE *stream); + /** + * A libcurl callback for writing to memory. + */ + static size_t memoryWrite(void *ptr, size_t size, + size_t nmemb, + FILE *stream); - const std::string prepareNick(const std::string &restrict nick, - const int level, - const std::string &restrict color) - const A_WARN_UNUSED; + const std::string prepareNick(const std::string &restrict nick, + const int level, + const std::string &restrict color) + const A_WARN_UNUSED; - void updateWindow(size_t numOnline); + void updateWindow(size_t numOnline); - enum DownloadStatus - { - UPDATE_ERROR = 0, - UPDATE_COMPLETE, - UPDATE_LIST - }; + enum DownloadStatus + { + UPDATE_ERROR = 0, + UPDATE_COMPLETE, + UPDATE_LIST + }; - int mUpdateTimer; + int mUpdateTimer; - /** A thread that use libcurl to download updates. */ - SDL_Thread *mThread; + /** A thread that use libcurl to download updates. */ + SDL_Thread *mThread; - /** Buffer for files downloaded to memory. */ - char *mMemoryBuffer; + /** Buffer for files downloaded to memory. */ + char *mMemoryBuffer; - /** Buffer to handler human readable error provided by curl. */ - char *mCurlError; + /** Buffer to handler human readable error provided by curl. */ + char *mCurlError; - BrowserBox *mBrowserBox; - ScrollArea *mScrollArea; - std::set mOnlinePlayers; - std::set mOnlineNicks; + BrowserBox *mBrowserBox; + ScrollArea *mScrollArea; + std::set mOnlinePlayers; + std::set mOnlineNicks; - Button *mUpdateButton; - std::vector mFriends; - std::vector mNeutral; - std::vector mDisregard; - std::vector mEnemy; + Button *mUpdateButton; + std::vector mFriends; + std::vector mNeutral; + std::vector mDisregard; + std::vector mEnemy; - /** Byte count currently downloaded in mMemoryBuffer. */ - int mDownloadedBytes; + /** Byte count currently downloaded in mMemoryBuffer. */ + int mDownloadedBytes; - /** Status of the current download. */ - DownloadStatus mDownloadStatus; + /** Status of the current download. */ + DownloadStatus mDownloadStatus; - /** Flag that show if current download is complete. */ - bool mDownloadComplete; - bool mAllowUpdate; - bool mShowLevel; - bool mUpdateOnlineList; - bool mGroupFriends; + /** Flag that show if current download is complete. */ + bool mDownloadComplete; + bool mAllowUpdate; + bool mShowLevel; + bool mUpdateOnlineList; + bool mGroupFriends; }; extern WhoIsOnline *whoIsOnline; -- cgit v1.2.3-60-g2f50