X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fclickable.h;h=f9b5acb6a5597c04d18b18357ae04fbdd6044f3d;hp=efa0810bacbf24def5ebff5eecd92c100acf4046;hb=7c0eb0111b70089f563ee793e2b52036b76ca643;hpb=694f9bfbf7f1af19108461c7e00d133e55082bce diff --git a/src/uisupport/clickable.h b/src/uisupport/clickable.h index efa0810b..f9b5acb6 100644 --- a/src/uisupport/clickable.h +++ b/src/uisupport/clickable.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-09 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -15,11 +15,14 @@ * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef CLICKABLE_H_ -#define CLICKABLE_H_ +#pragma once + +#include "uisupport-export.h" + +#include #include @@ -27,11 +30,12 @@ class QModelIndex; -class Clickable +class UISUPPORT_EXPORT Clickable { public: // Don't change these enums without also changing dependent methods! - enum Type { + enum Type + { Invalid = -1, Url = 0, Channel = 1, @@ -39,7 +43,9 @@ public: }; explicit inline Clickable(Type type = Invalid, quint16 start = 0, quint16 length = 0) - : _type(type), _start(start), _length(length) + : _type(type) + , _start(start) + , _length(length) {} inline Type type() const { return _type; } @@ -48,7 +54,7 @@ public: inline bool isValid() const { return _type != Invalid; } - void activate(NetworkId networkId, const QString &bufferName) const; + void activate(NetworkId networkId, const QString& bufferName) const; private: Type _type; @@ -56,14 +62,10 @@ private: quint16 _length; }; - -class ClickableList : public QList +class UISUPPORT_EXPORT ClickableList : public std::vector { public: - static ClickableList fromString(const QString &); + static ClickableList fromString(const QString&); Clickable atCursorPos(int idx); }; - - -#endif // CLICKABLE_H_