![]() |
LeechCraft
0.6.70-9312-g4cc613a2df
Modular cross-platform feature rich live environment.
|
Namespaces | |
| AN | |
| CacheStrat | |
| CPP17 | |
| detail | |
| IntSeq | |
| oral | |
| SvcAuth | |
| SysInfo | |
| Views | |
| XDG | |
Classes | |
| class | BackendSelector |
| A common dialog to select storage backend. More... | |
| class | ClosingDB |
| class | FailedImpl |
| class | ConsistencyChecker |
| class | DBLock |
| Provides database transaction lock. More... | |
| class | Dumper |
| class | AutoResizeMixin |
| Automatically moves a widget to fit a rectangle on resize. More... | |
| class | ClearLineEditAddon |
| Provides a "clear text" action for line edits. More... | |
| class | ColorButton |
| A button for choosing a color. More... | |
| class | FindNotification |
| A horizontal bar with typical widgets for text search. More... | |
| class | FindNotificationWk |
| A helper class to aid connecting FindNotification with Qt WebKit. More... | |
| class | FlowLayout |
| A simple flow layout implementation. More... | |
| class | LineEditButtonManager |
| Manages additional overlay buttons in a QLineEdit. More... | |
| class | PageNotification |
| A horizontal widget embedding into the parent layout of the passed parent widget. More... | |
| class | SelectableBrowser |
| A "browser" that shows HTML either via QTextBrowser or a browser plugin. More... | |
| class | SslCertificateInfoWidget |
| class | UnhoverDeleteMixin |
| Allows to hide a widget or popup after mouse leave. More... | |
| class | IDPool |
| A simple pool of identificators of the given type. More... | |
| class | DndActionsMixin |
| Abstracts away differences between Qt4 and Qt5 in model DnD support. More... | |
| class | FlattenFilterModel |
| Proxy model flattening a hierarchical model. More... | |
| class | FlatToFoldersProxyModel |
| class | MergeModel |
| class | ModelItem |
| Provides a proxying API on top of an QAbstractItemModel. More... | |
| class | ModelItemBase |
| Base class for model items for tree-like models. More... | |
| class | ModelIterator |
| Provides an iterator-based API to a Qt model. More... | |
| class | RoleNamesMixin |
| Wraps differences between role names handling in Qt4 and Qt5. More... | |
| class | CustomCookieJar |
| A customized cookie jar with additional features. More... | |
| class | CustomNetworkReply |
| A network reply with customizable content and reply headers. More... | |
| class | NetworkDiskCache |
| A thread-safe garbage-collected network disk cache. More... | |
| class | NetworkDiskCacheGC |
| Garbage collection for a set of network disk caches. More... | |
| class | ColorThemeProxy |
| Proxy for QML files to use colors from current color theme. More... | |
| class | PlotItem |
| class | QmlErrorWatcher |
| Utility class for logging errors from a QML view. More... | |
| class | SettableIconProvider |
| QML image provider with settable icons for each path. More... | |
| class | StandardNAMFactory |
| A standard QML QNetworkAccessManager factory. More... | |
| class | ThemeImageProvider |
| Provides icons from the current theme by their FDO name. More... | |
| class | ToolTipItem |
| ToolTip for Qml objects. More... | |
| class | UnhideListModel |
| A model to be used with UnhideListViewBase. More... | |
| class | UnhideListViewBase |
| Base class for a view of a list of items to be unclosed. More... | |
| class | WidthIconProvider |
| Provides scalable icons to QML. More... | |
| class | ShortcutManager |
| Aids in providing configurable shortcuts. More... | |
| struct | InstanceApplicative |
| struct | InstanceApplicative< boost::optional< T > > |
| class | AssocCache |
| class | BitFlags |
| class | CurryImpl |
| class | DelayedExecutor |
| Executes a given action after a given timeout. More... | |
| class | Either |
| struct | InstanceFunctor< Either< L, R > > |
| struct | InstanceApplicative< Either< L, R > > |
| struct | InstanceMonad< Either< L, R > > |
| class | EitherCont |
| A peir of two functions, typically a continuation and an error handler. More... | |
| struct | Caster |
| struct | InstanceFunctor |
| The Functor class is used for types that can be mapped over. More... | |
| struct | InstanceFunctor< boost::optional< T > > |
| Implementation of the Functor class for boost.optional. More... | |
| class | LazyInitializer |
| Provides lazy initialization on first access to an object. More... | |
| struct | InstanceMonad |
| struct | InstanceMonad< boost::optional< T > > |
| struct | InstanceMonadPlus |
| struct | InstanceMonadPlus< boost::optional< T > > |
| class | NewType |
| A somewhat "strong" typedef. More... | |
| struct | WrapType |
| struct | WrapType< QList< QString > > |
| struct | QStringTrimmed |
| struct | QStringToLower |
| class | QueueManager |
| A simple scheduling manager for a queue of functors. More... | |
| struct | RegExpImpl |
| class | RegExp |
| class | SlotClosureBase |
| Base class for SlotClosure. More... | |
| class | SlotClosure |
| Executes a given functor upon a signal (or a list of signals). More... | |
| class | BasicDeletePolicy |
| class | DeleteLaterPolicy |
| Deletes a SlotClosure object after its signal has fired. More... | |
| class | NoDeletePolicy |
| Does not delete a SlotClosure object. More... | |
| class | ChoiceDeletePolicy |
| class | ApplicativeTest |
| struct | NoDefaultCtor |
| class | EitherTest |
| class | FunctorTest |
| class | MonadPlusTest |
| class | MonadTest |
| class | PreludeTest |
| class | ScopeGuardTest |
| class | DummyObject |
| class | SlotClosureTest |
| class | StlizeTest |
| class | TypelistTest |
| class | ViewsTest |
| class | VisitorTest |
| struct | Not |
| struct | Typelist |
| struct | AsTypelist |
| struct | AsTypelist< OtherList< Args...> > |
| class | UrlAccessor |
| class | UrlOperator |
| Manipulates query part of an QUrl object. More... | |
| struct | Void |
| class | CpuFeatures |
| class | ExtensionsData |
| class | ExtensionsDataImpl |
| class | FDGuard |
| class | FileRemoveGuard |
| QFile removing itself from file system on destruction. More... | |
| class | MimeDetectorImpl |
| class | MimeDetector |
| struct | SpaceInfo |
| Contains information about a partition's disk space. More... | |
| class | ResourceLoader |
| Utility class for loading a file from a set of locations. More... | |
| class | CategorySelector |
| The CategorySelector widget provides a way to select amongst a group of items. More... | |
| class | TagsCompleter |
| Completer suitable for tag completion. More... | |
| class | TagsCompletionModel |
| A QStringListModel providing additional methods for tags. More... | |
| class | TagsFilterModel |
| Provides filter model with additional tags filter mode. More... | |
| class | TagsLineEdit |
| A line edit class suitable for use with TagsCompleter. More... | |
| class | ConcurrentException |
| A concurrent exception that plays nicely with Qt. More... | |
| struct | InstanceFunctor< QFuture< T > > |
| class | FuturesTest |
| class | MonadicFuturesTest |
| class | WorkerThreadBase |
| class | WorkerThread |
| class | XWrapper |
| class | BaseHookInterconnector |
| Base class for signal-slot relays in plugin APIs. More... | |
| class | DefaultHookProxy |
| Standard implementation of IHookProxy. More... | |
| class | DownloadHandler |
| class | Introspectable |
| class | NotificationActionHandler |
| Aids in adding actions to notifications. More... | |
| class | StdDataFilterMenuCreator |
| Adds actions to handle some data with relevant IDataFilter plugins to a menu. More... | |
| class | AddressesModelManager |
| Manages an XML settings model with a list of network interfaces selected by the user from the list of available ones. More... | |
| class | FontChooserWidget |
| Provides a widget for choosing a font. More... | |
| class | MassFontChangeDialog |
| class | WkFontsWidget |
| A settings widget for configuring WebKit fonts. More... | |
Typedefs | |
| typedef std::shared_ptr < XmlSettingsDialog > | XmlSettingsDialog_ptr |
| typedef std::shared_ptr < ModelItem > | ModelItem_ptr |
| typedef std::weak_ptr< ModelItem > | ModelItem_wtr |
| typedef QVector< ModelItem_ptr > | ModelItemsList_t |
| typedef std::shared_ptr< const ModelItem > | ModelItem_cptr |
| typedef QList< QPair< QString, QString > > | AddrList_t |
| template<typename AF , typename AV > | |
| using | GSLResult_t = typename InstanceApplicative< AF >::template GSLResult< AV >::Type_t |
| template<typename T , typename F > | |
| using | FmapResult_t = typename InstanceFunctor< T >::template FmapResult_t< F > |
| The result type of the contents of the functor T mapped by function F. More... | |
| template<typename T > | |
| using | Lazy_t = std::function< T()> |
| template<typename MV , typename F > | |
| using | BindResult_t = typename InstanceMonad< MV >::template BindResult_t< F > |
| using | OneTimeRunner = SlotClosure< DeleteLaterPolicy > |
| An utility typedef for SlotClosure deleting immediately after firing. More... | |
| template<typename T > | |
| using | WrapType_t = typename WrapType< T >::type |
| using | SomeEither_t = Either< int, QString > |
| template<typename T > | |
| using | IsVoid_t = std::is_same< T, void > |
| using | Variant_t = boost::variant< int, char, std::string, QString, double, float > |
| template<typename T > | |
| using | AsTypelist_t = typename AsTypelist< T >::Result_t |
| using | DefaultScopeGuard = detail::ScopeGuard< detail::DefaultScopeGuardDeleter > |
| typedef std::shared_ptr < QIODevice > | QIODevice_ptr |
| using | QtException_t = QtConcurrent::Exception |
| using | QtException_ptr = std::shared_ptr< QtException_t > |
| using | ConcurrentStdException = Util::ConcurrentException< Util::NewType< std::exception, 0, __LINE__ >> |
| template<typename T > | |
| using | UnwrapFutureType_t = typename detail::UnwrapFutureType< T >::type |
| typedef std::shared_ptr < DefaultHookProxy > | DefaultHookProxy_ptr |
| using | Introspect_f = std::function< QVariantMap(QVariant)> |
Enumerations | |
| enum | FitFlag { NoFlags, NoOverlap = 0x01 } |
| enum | QueuePriority { QueuePriority::Normal, QueuePriority::High } |
| The priority of the action in the queue. More... | |
| enum | SysPath { SysPath::QML, SysPath::Share } |
| Describes various root paths recognized by GetSysPath(). More... | |
| enum | UserDir { UserDir::Cache, UserDir::LC } |
| Describes various user-specific paths. More... | |
| enum | WinStateFlag { NoState = 0, Modal = 1 << 0, Sticky = 1 << 1, MaximizedVert = 1 << 2, MaximizedHorz = 1 << 3, Shaded = 1 << 4, SkipTaskbar = 1 << 5, SkipPager = 1 << 6, Hidden = 1 << 7, Fullscreen = 1 << 8, OnTop = 1 << 9, OnBottom = 1 << 10, Attention = 1 << 11 } |
| enum | AllowedActionFlag { NoAction = 0, Move = 1 << 0, Resize = 1 << 1, Minimize = 1 << 2, Shade = 1 << 3, Stick = 1 << 4, MaximizeHorz = 1 << 5, MaximizeVert = 1 << 6, ShowFullscreen = 1 << 7, ChangeDesktop = 1 << 8, Close = 1 << 9, MoveToTop = 1 << 10, MoveToBottom = 1 << 11 } |
Functions | |
| QSqlQuery | RunTextQuery (const QSqlDatabase &db, const QString &text) |
| Runs the given query text on the given db. More... | |
| QString | LoadQuery (const QString &plugin, const QString &filename) |
| Loads the query text from the given resource file. More... | |
| void | RunQuery (const QSqlDatabase &db, const QString &plugin, const QString &filename) |
| Loads the query from the given resource file and runs it. More... | |
| QString | GenConnectionName (const QString &base) |
| Generates an unique thread-safe connection name. More... | |
| template<typename T = int> | |
| T | GetLastId (const QSqlQuery &query) |
| Gets the last insert ID for the given query. More... | |
| Rect_ (size) | |
| QDialog * | MakeCertificateViewerDialog (const QSslCertificate &cert, QWidget *parent) |
| QPoint | FitRectScreen (QPoint pos, const QSize &size, FitFlags flags=NoFlags, const QPoint &shiftAdd=QPoint(0, 0)) |
| Tries to fit a rectangle (like a dialog or popup) into screen. More... | |
| QPoint | FitRect (QPoint pos, const QSize &size, const QRect &geometry, FitFlags flags=NoFlags, const QPoint &shiftAdd=QPoint(0, 0)) |
| Tries to fit a rectangle (like a dialog or popup) into geometry. More... | |
| QLabel * | ShowPixmapLabel (const QPixmap &pixmap, const QPoint &pos=QPoint()) |
| Shows a pixmap at the given pos. More... | |
| QColor | TintColors (const QColor &c1, const QColor &c2, double alpha=0.5) |
| Mixes two colors with the given weights. More... | |
| QString | ElideProgressBarText (const QString &text, const QStyleOptionViewItem &option) |
| void | TintPalette (QWidget *widget, const QColor &color, double alpha=0.5, const QList< QPalette::ColorRole > &roles={QPalette::ColorRole::Text, QPalette::ColorRole::WindowText}) |
| Mixes some of the widget's palette roles with the given color. More... | |
| Q_DECLARE_FLAGS (FitFlags, FitFlag) | |
| template<typename T > | |
| void | Save2MimeData (QMimeData *mimeData, const QString &name, const T &t) |
| bool | operator== (const ModelIterator &left, const ModelIterator &right) |
| bool | operator!= (const ModelIterator &left, const ModelIterator &right) |
| AddrList_t | GetLocalAddresses (int port=0) |
| Returns all local addresses. More... | |
| QList< QHostAddress > | GetAllAddresses () |
| Returns all addresses likely accessible "from the outside". More... | |
| QString | GetSocketErrorString (QAbstractSocket::SocketError error) |
| Returns an error string for the given socket error. More... | |
| QTreeWidgetItem * | SslError2TreeItem (const QSslError &error) |
| Builds a tree widget representation of the given SSL error. More... | |
| void | CreateShortcuts (const QList< QKeySequence > &seqs, const std::function< void()> &func, QWidget *parent) |
| Makes func invokable with shortcuts in seq. More... | |
| void | CreateShortcuts (const QList< QKeySequence > &seqs, QObject *object, const char *metamethod, QWidget *parent) |
| Makes metamethod invokable with shortcuts in seq. More... | |
| template<template< typename...> class Applicative, typename... Args, typename T > | |
| auto | Pure (const T &v) |
| template<typename Applicative , typename T > | |
| auto | Pure (const T &v) -> decltype(InstanceApplicative< Applicative >::Pure(v)) |
| template<typename AF , typename AV > | |
| GSLResult_t< AF, AV > | GSL (const AF &af, const AV &av) |
| template<typename AF , typename AV > | |
| auto | operator* (const AF &af, const AV &av) -> decltype(GSL(af, av)) |
| template<typename F > | |
| CurryImpl< F > | Curry (F f) |
| void | ExecuteLater (const DelayedExecutor::Actor_f &actor, int delay=0) |
| template<typename F > | |
| void | DelayDestruction (const std::shared_ptr< F > &obj) |
| template<typename F > | |
| detail::Dropper< F > | DropArgs (const F &f) |
| template<typename L , typename R , typename F , typename = std::result_of_t<F ()>> | |
| R | RightOr (const Either< L, R > &either, F &&f) |
| template<typename L , typename R > | |
| R | RightOr (const Either< L, R > &either, const R &r) |
| template<template< typename > class Cont, typename L , typename R > | |
| std::pair< Cont< L >, Cont< R > > | PartitionEithers (const Cont< Either< L, R >> &eithers) |
| template<typename R , typename B , typename C , typename... Args> | |
| auto | BindMemFn (R(B::*fn)(Args...), C *c) |
| Binds an instance of an object to its member function. More... | |
| template<typename R , typename B , typename C , typename... Args> | |
| auto | BindMemFn (R(B::*fn)(Args...) const, const C *c) |
| template<typename T > | |
| constexpr bool | IsFunctor () |
| Checks whether the given type has a Functor instance for it. More... | |
| template<typename T , typename F , typename = std::enable_if_t<IsFunctor<T> ()>> | |
| FmapResult_t< T, F > | Fmap (const T &functor, const F &function) |
| Apply the function f to the elements in functor. More... | |
| template<typename T , typename F > | |
| auto | operator* (const F &function, const T &functor) -> decltype(Fmap(functor, function)) |
| An operator-style alias for Fmap(). More... | |
| template<typename T , typename F > | |
| auto | operator* (const T &functor, const F &function) -> decltype(Fmap(functor, function)) |
| An operator-style alias for Fmap(). More... | |
| template<typename F > | |
| auto | MakeLambdaEventFilter (F &&f, QObject *parent=nullptr) |
| template<typename T > | |
| Lazy_t< T > | MakeLazy (const T &t) |
| template<typename R , typename F > | |
| Lazy_t< R > | MakeLazyF (const F &l) |
| template<template< typename...> class Monad, typename... Args, typename V > | |
| auto | Return (const V &v) |
| template<typename MV , typename F > | |
| BindResult_t< MV, F > | Bind (const MV &value, const F &f) |
| template<typename MV , typename F > | |
| auto | operator>> (const MV &value, const F &f) -> decltype(Bind(value, f)) |
| template<typename MV > | |
| auto | Do (const MV &value) |
| template<typename MV , typename FHead , typename... FArgs> | |
| auto | Do (const MV &value, const FHead &fHead, const FArgs &...fArgs) |
| template<typename T > | |
| constexpr bool | IsMonadPlus () |
| template<typename MP > | |
| MP | Mzero () |
| template<typename MP > | |
| auto | operator+ (const MP &m1, const MP &m2) -> decltype(Mplus(m1)(m2)) |
| template<typename F , typename... Args> | |
| auto | Invoke (F &&f, Args &&...args) -> decltype(std::forward< F >(f)(std::forward< Args >(args)...)) |
| template<typename Base , typename Real , typename Res > | |
| auto | Invoke (Res Base::*mem, Real &&obj, typename std::enable_if<!std::is_member_function_pointer< decltype(mem)>::value >::type *=nullptr) -> decltype(obj.*mem) |
| template<typename Base , typename Real , typename Res , typename... Rest> | |
| auto | Invoke (Res Base::*mem, Real &&obj, Rest &&...rest) -> decltype((obj.*mem)(std::forward< Rest >(rest)...)) |
| QVariant | ParseJson (const QByteArray &bytes, const char *context) |
| Parses JSON content in the given bytearray. More... | |
| QVariant | ParseJson (QIODevice *device, const char *context) |
| Utility function parsing JSON from the device. More... | |
| template<typename T1 , typename T2 , template< typename U > class Container, typename F > | |
| auto | ZipWith (const Container< T1 > &c1, const Container< T2 > &c2, F f) -> WrapType_t< Container< std::decay_t< std::result_of_t< F(T1, T2)>>>> |
| template<typename T1 , typename T2 , template< typename U > class Container, template< typename U1, typename U2 > class Pair = QPair> | |
| auto | Zip (const Container< T1 > &c1, const Container< T2 > &c2) -> Container< Pair< T1, T2 >> |
| template<typename T , template< typename U > class Container, typename F , typename = std::enable_if_t<detail::IsSimpleContainer<Container<T>> ()>, typename = std::enable_if_t<!detail::DoesReturnVoid<F, Container<T>> ()>> | |
| auto | Map (const Container< T > &c, F f) |
| template<typename Container , typename F , template< typename > class ResultCont = QList, typename = std::enable_if_t<!detail::IsSimpleContainer<Container> ()>, typename = std::enable_if_t<!detail::DoesReturnVoid<F, Container> ()>> | |
| auto | Map (const Container &c, F f) |
| template<typename Container , typename F , typename = std::enable_if_t<detail::DoesReturnVoid<F, Container> ()>> | |
| auto | Map (const Container &c, F f) |
| template<typename Container , typename F , typename = std::enable_if_t<detail::DoesReturnVoid<F, Container> ()>> | |
| auto | Map (Container &c, F f) |
| template<typename T , template< typename U > class Container, typename F > | |
| Container< T > | Filter (const Container< T > &c, F f) |
| template<template< typename > class Container, typename T > | |
| Container< T > | Concat (const Container< Container< T >> &containers) |
| template<template< typename...> class Container, typename... ContArgs> | |
| auto | Concat (const Container< ContArgs...> &containers) -> std::decay_t< decltype(*containers.begin())> |
| template<typename Cont , typename F > | |
| auto | ConcatMap (Cont &&c, F &&f) -> decltype(Concat(Map(std::forward< Cont >(c), std::forward< F >(f)))) |
| template<template< typename > class Container, typename T > | |
| Container< Container< T > > | SplitInto (size_t numChunks, const Container< T > &container) |
| template<template< typename Pair, typename...Rest > class Cont, template< typename K, typename V > class Pair, typename K , typename V , typename KV , typename... Rest> | |
| boost::optional< V > | Lookup (const KV &key, const Cont< Pair< K, V >, Rest...> &cont) |
| template<typename Cont > | |
| Cont | Sorted (Cont &&cont) |
| template<typename R > | |
| auto | ComparingBy (R r) |
| template<typename F > | |
| auto | First (F &&f) |
| template<typename F > | |
| auto | Second (F &&f) |
| template<typename F > | |
| auto | Flip (F &&f) |
| QString | Escape (const QString &str) |
| template<template< typename K, typename V > class PairType = std::pair, typename Assoc > | |
| auto | Stlize (Assoc &&assoc) -> detail::StlAssocRange< detail::Identity, detail::Identity, decltype(assoc.begin()), Assoc, PairType > |
| Converts an Qt's associative sequence assoc to an STL-like iteratable range. More... | |
| template<template< typename K, typename V > class PairType = std::pair, typename Assoc > | |
| auto | StlizeCopy (Assoc &&assoc) -> detail::StlAssocRange< std::decay, std::decay, decltype(assoc.begin()), Assoc, PairType > |
| QByteArray | SerializeJson (const QVariant &var, bool compact=true) |
| Serializes the given var to JSON representation. More... | |
| template<template< typename...> class List, typename H , typename... T> | |
| constexpr List< T...> | Tail (List< H, T...>) |
| template<int N, template< typename...> class List, typename... Args> | |
| constexpr detail::DropImpl< N, List< Args...> >::Result_t | Drop (List< Args...>) |
| template<template< typename...> class List, typename... Args1, typename... Args2> | |
| constexpr List< Args1..., Args2...> | Concat (List< Args1...>, List< Args2...>) |
| template<template< typename...> class List> | |
| constexpr List | Reverse (List<>) |
| template<template< typename...> class List, typename Head , typename... Tail> | |
| constexpr auto | Reverse (List< Head, Tail...>) -> decltype(Concat(Reverse(List< Tail...> |
| void | Unreachable () |
| template<typename F > | |
| detail::ScopeGuard< F > | MakeScopeGuard (const F &f) |
| Returns an object performing passed function on scope exit. More... | |
| template<typename HeadVar , typename... TailVars, typename... Args> | |
| auto | Visit (const boost::variant< HeadVar, TailVars...> &v, Args &&...args) -> decltype(detail::VisitorBase< Args...> |
| template<typename T , typename... Args> | |
| auto | InvokeOn (T &&t, Args &&...args) -> decltype(detail::VisitorBase< Args...> |
| void | swap (FDGuard &g1, FDGuard &g2) |
| QByteArray | DetectFileMime (const QString &path) |
| QStringList | GetPathCandidates (SysPath path, QString subfolder) |
| Returns possible full paths for the path and subfolder. More... | |
| QString | GetSysPath (SysPath path, const QString &subfolder, const QString &filename) |
| Returns path to the file in the given root path and subfolder. More... | |
| QUrl | GetSysPathUrl (SysPath path, const QString &subfolder, const QString &filename) |
| Returns path to the file in the given root path and subfolder. More... | |
| QStringList | GetSystemPaths () |
| Returns the components of the system PATH variable. More... | |
| QString | FindInSystemPath (const QString &name, const QStringList &paths, const std::function< bool(QFileInfo)> &filter=std::function< bool(QFileInfo)>()) |
| Searches for a file in system paths according to a filter. More... | |
| QDir | GetUserDir (UserDir dir, const QString &subpath) |
| QDir | CreateIfNotExists (QString path) |
| Creates a path if it doesn't exist. More... | |
| QString | GetTemporaryName (const QString &pattern=QString("lc_temp.XXXXXX")) |
| Returns a temporary filename. More... | |
| SpaceInfo | GetSpaceInfo (const QString &path) |
| Returns the disk space info of the partition containing path. More... | |
| bool | HasSupportedImageExtension (const QString &filename) |
| Checks if the given filename has a known image extension. More... | |
| template<typename R , typename F , typename... Args> | |
| std::enable_if_t<!std::is_same < R, void >::value > | ReportFutureResult (QFutureInterface< R > &iface, F &&f, Args &&...args) |
| template<typename F , typename... Args> | |
| void | ReportFutureResult (QFutureInterface< void > &iface, F &&f, Args &&...args) |
| template<typename R , typename U > | |
| std::enable_if_t < std::is_constructible< R, U > ::value &&!detail::IsCallable < U >)> | ReportFutureResult (QFutureInterface< R > &iface, U &&value) |
| template<typename Executor , typename ResultHandler , typename... Args> | |
| void | ExecuteFuture (Executor f, ResultHandler rh, QObject *parent, Args...args) |
| Runs a QFuture-returning function and feeding the future to a handler when it is ready. More... | |
| template<typename T > | |
| detail::SequenceProxy < detail::SequencerRetType_t < QFuture< T > >, QFuture< T > , detail::EmptyDestructionTag > | Sequence (QObject *parent, const QFuture< T > &future) |
| Creates a sequencer that allows chaining multiple futures. More... | |
| template<typename T > | |
| QFuture< T > | MakeReadyFuture (const T &t) |
| Creates a ready future holding the given value. More... | |
| auto | MkWaiter () |
| QString | FromStdString (const std::string &str) |
| An utility function that creates a QString from UTF8-encoded std::string. More... | |
| UTIL_API QString | GetAsBase64Src (const QImage &image) |
| Returns the given image in a Base64-encoded form. More... | |
| UTIL_API QString | GetUserText (const Entity &entity) |
| Return the user-readable representation of the entity. More... | |
| UTIL_API QString | MakePrettySize (qint64 sourceSize) |
| Makes a formatted size from number. More... | |
| UTIL_API QString | MakePrettySizeShort (qint64 size) |
| Converts a bytes count to a string representation with appropriately chosen units. More... | |
| UTIL_API QString | MakeTimeFromLong (ulong time) |
| Makes a formatted time from number. More... | |
| UTIL_API QTranslator * | LoadTranslator (const QString &base, const QString &locale, const QString &prefix="leechcraft", const QString &appname="leechcraft") |
| UTIL_API QTranslator * | InstallTranslator (const QString &base, const QString &prefix="leechcraft", const QString &appname="leechcraft") |
| Loads and installs a translator. More... | |
| UTIL_API QString | GetLocaleName () |
| Returns the current locale name, like en_US. More... | |
| UTIL_API QString | GetInternetLocaleName (const QLocale &) |
| UTIL_API QString | GetLanguage () |
| Returns the current language name. More... | |
| UTIL_API QModelIndexList | GetSummarySelectedRows (QObject *sender) |
| UTIL_API QAction * | CreateSeparator (QObject *parent) |
| Returns the action that is set to act as a separator. More... | |
| UTIL_API QPixmap | DrawOverlayText (QPixmap px, const QString &text, QFont font, const QPen &pen, const QBrush &brush) |
| template<typename TagGetter , typename TagSetter > | |
| QDomElement | GetElementForTags (const QStringList &tags, QDomNode &node, QDomDocument &document, const QString &elementName, TagGetter tagGetter, TagSetter tagSetter) |
| Returns an element for a given tags list. More... | |
| template<typename K , typename V > | |
| QMap< K, V > | MakeMap (std::initializer_list< std::pair< K, V >> l) |
| QString | GetPassword (const QString &keyName, const QString &dialogText, const ICoreProxy_ptr &proxy, bool useStore=true) |
| Returns password for the key, possibly asking the user. More... | |
| void | GetPassword (const QString &key, const QString &diaText, const ICoreProxy_ptr &proxy, const EitherCont< void(), void(QString)> &cont, QObject *depender, bool useStored) |
| void | SavePassword (const QString &password, const QString &keyName, const ICoreProxy_ptr &proxy) |
| Saves the password to be retrieved later via GetPassword(). More... | |
| QList< ANFieldData > | GetStdANFields (const QString &category) |
| Returns the list of the standard AN fields for the given category. More... | |
| Entity | MakeAN (const QString &header, const QString &text, Priority priority, const QString &senderID, const QString &cat, const QString &type, const QString &id, const QStringList &visualPath, int delta=1, int count=0, const QString &fullText=QString(), const QString &extendedText=QString()) |
| Creates an Advanced Notifications-enabled notify entity. More... | |
| Entity | MakeANRule (const QString &title, const QString &senderID, const QString &category, const QStringList &types, AN::NotifyFlags flags=AN::NotifyNone, bool openConfiguration=false, const QList< QPair< QString, ANFieldValue >> &fields={}) |
| Creates an Entity defining an Advanced Notifications rule. More... | |
| QList< QObject * > | GetDataFilters (const QVariant &data, IEntityManager *manager) |
| Returns the data filter plugins that can handle data. More... | |
| Entity | MakeEntity (const QVariant &entity, const QString &location, TaskParameters tp, const QString &mime) |
| Entity | MakeNotification (const QString &header, const QString &text, Priority priority) |
| An utility function to make a Entity with notification. More... | |
| Entity | MakeANCancel (const Entity &event) |
| Makes an event for canceling another Advanced Notifications event. More... | |
| Entity | MakeANCancel (const QString &senderId, const QString &eventId) |
| Makes an event for canceling another Advanced Notifications event. More... | |
| QVariant | GetPersistentData (const QByteArray &key, const ICoreProxy_ptr &proxy) |
| Returns persistent data stored under given key. More... | |
| void | SetJobHolderProgress (const QList< QStandardItem * > &row, qint64 done, qint64 total, const QString &text) |
| Sets the progress values on the given row. More... | |
| void | SetJobHolderProgress (QStandardItem *item, qint64 done, qint64 total) |
| Sets the done and total progress values on the given item. More... | |
| void | InitJobHolderRow (const QList< QStandardItem * > &row) |
| UTIL_XPC_API Entity | MakeEntity (const QVariant &entity, const QString &location, LeechCraft::TaskParameters tp, const QString &mime=QString()) |
| An utility function to make a Entity. More... | |
| XmlSettingsDialog * | OpenXSD (const QString &title, const QString &filename, Util::BaseSettingsManager *bsm) |
| Opens XML settings dialog for the given XML filename. More... | |
Variables | |
| struct { | |
| } | Mplus |
| struct { | |
| } | Msum |
| const auto | Id = [] (const auto& t) { return t; } |
| const auto | Apply = [] (const auto& t) { return t (); } |
| const auto | Fst = [] (const auto& pair) { return pair.first; } |
| const auto | Snd = [] (const auto& pair) { return pair.second; } |
| List< Head > | |
| const int | SourcePager = 2 |
| const int | StateRemove = 0 |
| const int | StateAdd = 1 |
| iem | |
| parent | |
| E_ { e } | |
| typedef QList<QPair<QString, QString> > LeechCraft::Util::AddrList_t |
Definition at line 44 of file addresses.h.
| using LeechCraft::Util::AsTypelist_t = typedef typename AsTypelist<T>::Result_t |
Definition at line 170 of file typelist.h.
| using LeechCraft::Util::BindResult_t = typedef typename InstanceMonad<MV>::template BindResult_t<F> |
| using LeechCraft::Util::ConcurrentStdException = typedef Util::ConcurrentException<Util::NewType<std::exception, 0, __LINE__>> |
Definition at line 110 of file concurrentexception.h.
| typedef std::shared_ptr<DefaultHookProxy> LeechCraft::Util::DefaultHookProxy_ptr |
Definition at line 126 of file defaulthookproxy.h.
| using LeechCraft::Util::FmapResult_t = typedef typename InstanceFunctor<T>::template FmapResult_t<F> |
| using LeechCraft::Util::GSLResult_t = typedef typename InstanceApplicative<AF>::template GSLResult<AV>::Type_t |
Definition at line 42 of file applicative.h.
| using LeechCraft::Util::Introspect_f = typedef std::function<QVariantMap (QVariant)> |
Definition at line 43 of file introspectable.h.
| using LeechCraft::Util::IsVoid_t = typedef std::is_same<T, void> |
Definition at line 52 of file typelisttest.cpp.
| using LeechCraft::Util::Lazy_t = typedef std::function<T ()> |
| typedef std::shared_ptr<const ModelItem> LeechCraft::Util::ModelItem_cptr |
Definition at line 45 of file modelitem.h.
| typedef std::shared_ptr<ModelItem> LeechCraft::Util::ModelItem_ptr |
Definition at line 40 of file modelitem.h.
| typedef std::weak_ptr<ModelItem> LeechCraft::Util::ModelItem_wtr |
Definition at line 43 of file modelitem.h.
| typedef QVector<ModelItem_ptr> LeechCraft::Util::ModelItemsList_t |
Definition at line 44 of file modelitem.h.
| using LeechCraft::Util::OneTimeRunner = typedef SlotClosure<DeleteLaterPolicy> |
An utility typedef for SlotClosure deleting immediately after firing.
Definition at line 43 of file onetimerunner.h.
| typedef std::shared_ptr<QIODevice> LeechCraft::Util::QIODevice_ptr |
Definition at line 50 of file resourceloader.h.
| using LeechCraft::Util::QtException_ptr = typedef std::shared_ptr<QtException_t> |
Definition at line 46 of file concurrentexception.h.
| using LeechCraft::Util::QtException_t = typedef QtConcurrent::Exception |
Definition at line 41 of file concurrentexception.h.
| using LeechCraft::Util::SomeEither_t = typedef Either<int, QString> |
Definition at line 42 of file eithertest.cpp.
| using LeechCraft::Util::UnwrapFutureType_t = typedef typename detail::UnwrapFutureType<T>::type |
| using LeechCraft::Util::Variant_t = typedef boost::variant<int, char, std::string, QString, double, float> |
Definition at line 40 of file visitortest.cpp.
| using LeechCraft::Util::WrapType_t = typedef typename WrapType<T>::type |
| typedef std::shared_ptr<XmlSettingsDialog> LeechCraft::Util::XmlSettingsDialog_ptr |
Definition at line 39 of file ihavesettings.h.
| Enumerator | |
|---|---|
| NoAction | |
| Move | |
| Resize | |
| Minimize | |
| Shade | |
| Stick | |
| MaximizeHorz | |
| MaximizeVert | |
| ShowFullscreen | |
| ChangeDesktop | |
| Close | |
| MoveToTop | |
| MoveToBottom | |
Definition at line 57 of file winflags.h.
|
strong |
The priority of the action in the queue.
| Enumerator | |
|---|---|
| Normal |
Standard priority. |
| High |
Higher priority. |
Definition at line 48 of file queuemanager.h.
|
strong |
Describes various root paths recognized by GetSysPath().
|
strong |
Describes various user-specific paths.
| Enumerator | |
|---|---|
| Cache |
Cache for volatile data. |
| LC |
Root LeechCraft directory (something like ~/.leechcraft). |
| Enumerator | |
|---|---|
| NoState | |
| Modal | |
| Sticky | |
| MaximizedVert | |
| MaximizedHorz | |
| Shaded | |
| SkipTaskbar | |
| SkipPager | |
| Hidden | |
| Fullscreen | |
| OnTop | |
| OnBottom | |
| Attention | |
Definition at line 38 of file winflags.h.
| BindResult_t<MV, F> LeechCraft::Util::Bind | ( | const MV & | value, |
| const F & | f | ||
| ) |
Definition at line 83 of file monad.h.
References LeechCraft::Util::detail::IsCompatibleMonad().
Referenced by Do(), and operator>>().
Here is the call graph for this function:
Here is the caller graph for this function:| auto LeechCraft::Util::BindMemFn | ( | R(B::*)(Args...) | fn, |
| C * | c | ||
| ) |
Binds an instance of an object to its member function.
| [in] | fn | The member function of class T. |
| [in] | c | The instance of class T to bind to the member function fn. |
| R | The return type of the function. |
| T | The type of the object. |
| Args | The arguments to the function, besides the object itself. |
Definition at line 51 of file functional.h.
| auto LeechCraft::Util::BindMemFn | ( | R(B::*)(Args...) const | fn, |
| const C * | c | ||
| ) |
Definition at line 58 of file functional.h.
| auto LeechCraft::Util::ComparingBy | ( | R | r | ) |
| constexpr List<Args1..., Args2...> LeechCraft::Util::Concat | ( | List< Args1...> | , |
| List< Args2...> | |||
| ) |
Definition at line 71 of file typelist.h.
| Container<T> LeechCraft::Util::Concat | ( | const Container< Container< T >> & | containers | ) |
Definition at line 204 of file prelude.h.
Referenced by ConcatMap().
Here is the caller graph for this function:| auto LeechCraft::Util::Concat | ( | const Container< ContArgs...> & | containers | ) | -> std::decay_t<decltype (*containers.begin ())> |
| auto LeechCraft::Util::ConcatMap | ( | Cont && | c, |
| F && | f | ||
| ) | -> decltype (Concat (Map (std::forward<Cont> (c), std::forward<F> (f)))) |
Definition at line 222 of file prelude.h.
References Concat(), and Map().
Referenced by LeechCraft::Util::XDG::ToPaths().
Here is the call graph for this function:
Here is the caller graph for this function:| UTIL_SYS_API QDir LeechCraft::Util::CreateIfNotExists | ( | QString | path | ) |
Creates a path if it doesn't exist.
Creates a relative path ~/.leechcraft/path and throws an exception if this could not be done or if such path already exists and it is not readable.
| [in] | path | The path to create. |
| std::runtime_error | Throws if the path could not be created. |
| QAction * LeechCraft::Util::CreateSeparator | ( | QObject * | parent | ) |
| CurryImpl<F> LeechCraft::Util::Curry | ( | F | f | ) |
| void LeechCraft::Util::DelayDestruction | ( | const std::shared_ptr< F > & | obj | ) |
Definition at line 106 of file delayedexecutor.h.
References ExecuteLater().
Here is the call graph for this function:| UTIL_SYS_API QByteArray LeechCraft::Util::DetectFileMime | ( | const QString & | path | ) |
Definition at line 88 of file mimedetector.cpp.
| auto LeechCraft::Util::Do | ( | const MV & | value | ) |
| auto LeechCraft::Util::Do | ( | const MV & | value, |
| const FHead & | fHead, | ||
| const FArgs &... | fArgs | ||
| ) |
| QPixmap LeechCraft::Util::DrawOverlayText | ( | QPixmap | px, |
| const QString & | text, | ||
| QFont | font, | ||
| const QPen & | pen, | ||
| const QBrush & | brush | ||
| ) |
| constexpr detail::DropImpl<N, List<Args...> >::Result_t LeechCraft::Util::Drop | ( | List< Args...> | ) |
Definition at line 65 of file typelist.h.
Referenced by LeechCraft::Util::detail::Dropper< F >::operator()().
Here is the caller graph for this function:| detail::Dropper<F> LeechCraft::Util::DropArgs | ( | const F & | f | ) |
Definition at line 124 of file dropargs.h.
| UTIL_GUI_API QString LeechCraft::Util::ElideProgressBarText | ( | const QString & | text, |
| const QStyleOptionViewItem & | option | ||
| ) |
| UTIL_SLL_API QString LeechCraft::Util::Escape | ( | const QString & | str | ) |
Definition at line 42 of file qtutil.cpp.
Referenced by StlizeCopy().
Here is the caller graph for this function:| void LeechCraft::Util::ExecuteFuture | ( | Executor | f, |
| ResultHandler | rh, | ||
| QObject * | parent, | ||
| Args... | args | ||
| ) |
Runs a QFuture-returning function and feeding the future to a handler when it is ready.
This function creates a QFutureWatcher of a type compatible with the QFuture type returned from the f, makes sure that rh handler is invoked when the future finishes, and then invokes the f with the given list of args (that may be empty).
rh should accept a single argument of the same type T that is wrapped in a QFuture returned by the f (that is, f should return QFuture<T>).
| [in] | f | A callable that should be executed, taking the arguments args and returning a QFuture<T> for some T. |
| [in] | rh | A callable that will be invoked when the future finishes, that should be callable with a single argument of type T. |
| [in] | parent | The parent object for all QObject-derived classes created in this function, may be a nullptr. |
| [in] | args | The arguments to be passed to the callable f. |
|
inline |
Definition at line 100 of file delayedexecutor.h.
Referenced by DelayDestruction().
Here is the caller graph for this function:| Container<T> LeechCraft::Util::Filter | ( | const Container< T > & | c, |
| F | f | ||
| ) |
Definition at line 194 of file prelude.h.
References LeechCraft::Util::detail::Append(), and Invoke().
Here is the call graph for this function:| UTIL_SYS_API QString LeechCraft::Util::FindInSystemPath | ( | const QString & | name, |
| const QStringList & | paths, | ||
| const std::function< bool(QFileInfo)> & | filter = std::function< bool(QFileInfo)>() |
||
| ) |
Searches for a file in system paths according to a filter.
This function searches for a file named name in system paths passed in paths and returns the full path for the first file that matches filter, or an empty string if nothing is found.
paths are most possibly obtained via GetSystemPaths(), but an arbitrary set of paths is fine too.
| [in] | name | The name of the file to search for. |
| [in] | paths | The paths to search in. |
| [in] | filter | The filter function for the candidates. |
| auto LeechCraft::Util::First | ( | F && | f | ) |
| auto LeechCraft::Util::Flip | ( | F && | f | ) |
| FmapResult_t<T, F> LeechCraft::Util::Fmap | ( | const T & | functor, |
| const F & | function | ||
| ) |
Apply the function f to the elements in functor.
This function forwards the function f to the instance of the Functor class (namely, InstanceFunctor<T>) for the type T to do the actual function application.
| [in] | functor | The functor whose values are subject to function. |
| [in] | function | The function that should be applied to the values in the functor. |
| T | The type of the functor. |
| F | The type of the function to apply to the elements inside the functor. |
Definition at line 147 of file functor.h.
References LeechCraft::Util::InstanceFunctor< T >::Apply().
Referenced by operator*().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
| QString LeechCraft::Util::GetAsBase64Src | ( | const QImage & | image | ) |
| UTIL_XPC_API QList< QObject * > LeechCraft::Util::GetDataFilters | ( | const QVariant & | data, |
| IEntityManager * | manager | ||
| ) |
Returns the data filter plugins that can handle data.
This function queries all available data filters plugins if they can handle data and returns the list of object instances that can handle it. The object instances are guaranteed to implement the IDataFilter interface as well as IEntityHandler interface.
The manager is used to obtain the list of plugins. It can be obtained from the ICoreProxy_ptr object that is passed to your plugin's Init() function.
| [in] | data | The data to query. |
| [in] | manager | The manager used to get the plugins. |
Definition at line 94 of file util.cpp.
References IEntityManager::GetPossibleHandlers(), and MakeEntity().
Here is the call graph for this function:| QDomElement LeechCraft::Util::GetElementForTags | ( | const QStringList & | tags, |
| QDomNode & | node, | ||
| QDomDocument & | document, | ||
| const QString & | elementName, | ||
| TagGetter | tagGetter, | ||
| TagSetter | tagSetter | ||
| ) |
Returns an element for a given tags list.
This function tries to implement projection from tags to a hierarchical structure in form of XML. It traverses the tags list and creates child nodes from the document, appending the hierarchical structure's tree root to the node. It returns the parent element to which the item should be appended.
For empty tags list it just returns node converted to the QDomElement.
tagSetter is a function or functor that should be able to take two parameters, a QDomElement and a QString, and set tags for it.
tagGetter is a function or functor that should be able to take one parameter, a QDomElement, and return a QString for it with tags previously set with tagSetter.
| [in] | tags | List of tags. |
| [in] | node | The parent-most node to which all other nodes are appended. |
| [in] | document | The document containing all these nodes. |
| [in] | elementName | The name of the XML element that carries info about the tags. |
| [in] | tagSetter | Setter function for the tags for the given element. |
| [in] | tagGetter | Getter function for the tags for the given element. |
| QString LeechCraft::Util::GetInternetLocaleName | ( | const QLocale & | locale | ) |
| QString LeechCraft::Util::GetLanguage | ( | ) |
Returns the current language name.
This function works as GetLocaleName() except it doesn't return (and doesn't query for) country name.
Definition at line 249 of file util.cpp.
References GetLocaleName().
Here is the call graph for this function:| QString LeechCraft::Util::GetLocaleName | ( | ) |
Returns the current locale name, like en_US.
First, this function checks the locale value stored in "Language" key of settings object with organizationName() and applicationName(). If it's equal to "system", this function queries the LANG environment variable, and if it is empty or in invalid format (not like en_US), it takes the value of QLocale::system().name().
Then, if the resulting name the name of the language only, GetLocaleName() tries to find any countries for that language. If any countries are found, the code of the first found country is appended, else "_00" is appended.
Definition at line 208 of file util.cpp.
Referenced by GetLanguage(), and InstallTranslator().
Here is the caller graph for this function:| UTIL_XPC_API QString LeechCraft::Util::GetPassword | ( | const QString & | keyName, |
| const QString & | dialogText, | ||
| const ICoreProxy_ptr & | proxy, | ||
| bool | useStore = true |
||
| ) |
Returns password for the key, possibly asking the user.
This function returns password for the given keyName. The password is typically stored in a storage plugin like SecMan.
If the password isn't found in any password stores (or there are no password stores) or useStore is set to false, this function asks the user for the password instead using the dialogText for the dialog and returns the user input instead. If user has canceled the dialog it returns an null string. Otherwise, if the user has entered some text this function automatically stores the password under the keyName.
| [in] | keyName | The name of the key uniquely identifying the password. |
| [in] | dialogText | The text of the dialog to present to the user if the password isn't found or useStore is false. |
| [in] | proxy | The core proxy used to communicate with other plugins. |
| [in] | useStore | Whether stored password should be used at all. Calling code may explicitly set this to false if the saved password is known to be invalid, for instance. |
Definition at line 79 of file passutils.cpp.
References SavePassword().
Here is the call graph for this function:| UTIL_XPC_API void LeechCraft::Util::GetPassword | ( | const QString & | key, |
| const QString & | diaText, | ||
| const ICoreProxy_ptr & | proxy, | ||
| const EitherCont< void(), void(QString)> & | cont, | ||
| QObject * | depender, | ||
| bool | useStored | ||
| ) |
Definition at line 98 of file passutils.cpp.
| UTIL_SYS_API QStringList LeechCraft::Util::GetPathCandidates | ( | SysPath | path, |
| QString | subfolder | ||
| ) |
Returns possible full paths for the path and subfolder.
This function returns a list of paths formed as the given root path identified by path plus the subfolder in it. The paths in the returned list aren't checked for existence.
For example, on Linux
will return { "/usr/share/leechcraft/flags", "/usr/local/share/leechcraft/flags" }.
The subfolder can actually be a relative path, like flags/countries, not just a single subfolder name.
This function hardly needs to be called from user code, consider using GetSysPath() instead.
| [in] | path | The root path. |
| [in] | subfolder | The subfolder inside the root path. |
Definition at line 54 of file paths.cpp.
Referenced by GetSysPath(), and LeechCraft::Util::UnhideListViewBase::UnhideListViewBase().
Here is the caller graph for this function:| UTIL_XPC_API QVariant LeechCraft::Util::GetPersistentData | ( | const QByteArray & | key, |
| const ICoreProxy_ptr & | proxy | ||
| ) |
Returns persistent data stored under given key.
The persistent data itself is stored in plugins implementing the IPersistentStoragePlugin interface. This function uses the passed proxy to get the list of those.
If no data is found under the given key, a null QVariant is returned.
| [in] | key | The key to look for. |
| [in] | proxy | The ICoreProxy object for getting the list of persistent storage plugins. |
| UTIL_SYS_API SpaceInfo LeechCraft::Util::GetSpaceInfo | ( | const QString & | path | ) |
| UTIL_XPC_API QList< ANFieldData > LeechCraft::Util::GetStdANFields | ( | const QString & | category | ) |
Returns the list of the standard AN fields for the given category.
| [in] | category | The category of events to return fields for. |
Definition at line 41 of file stdanfields.cpp.
References LeechCraft::AN::CatMediaPlayer, LeechCraft::AN::CatTerminal, LeechCraft::AN::Field::IMActivityGeneral, LeechCraft::AN::Field::IMActivitySpecific, LeechCraft::AN::Field::IMActivityText, LeechCraft::AN::Field::IMLocationCountry, LeechCraft::AN::Field::IMLocationLatitude, LeechCraft::AN::Field::IMLocationLocality, LeechCraft::AN::Field::IMLocationLongitude, LeechCraft::AN::Field::IMMoodGeneral, LeechCraft::AN::Field::IMMoodText, LeechCraft::AN::Field::MediaAlbum, LeechCraft::AN::Field::MediaArtist, LeechCraft::AN::Field::MediaLength, LeechCraft::AN::Field::MediaPlaybackStatus, LeechCraft::AN::Field::MediaPlayerURL, LeechCraft::AN::Field::MediaTitle, LeechCraft::AN::Field::TerminalActive, LeechCraft::AN::TypeIMEventActivityChange, LeechCraft::AN::TypeIMEventLocationChange, LeechCraft::AN::TypeIMEventMoodChange, LeechCraft::AN::TypeIMEventTuneChange, LeechCraft::AN::TypeMediaPlaybackStatus, LeechCraft::AN::TypeTerminalActivity, LeechCraft::AN::TypeTerminalBell, and LeechCraft::AN::TypeTerminalInactivity.
| QModelIndexList LeechCraft::Util::GetSummarySelectedRows | ( | QObject * | sender | ) |
| UTIL_SYS_API QString LeechCraft::Util::GetSysPath | ( | SysPath | path, |
| const QString & | subfolder, | ||
| const QString & | filename | ||
| ) |
Returns path to the file in the given root path and subfolder.
This function returns path to a file named filename and located in the path specified by path + subfolder. It actually checks whether the file exists and if it doesn't, returns a null string instead.
If LeechCraft is running on a system where multiple paths correspond to a single path, they are checked from more user-accessible to less user-accessible. For example, SysPath::Share corresponds to /usr/local/share/leechcraft and then /usr/share/leechcraft.
The subfolder can actually be a relative path, like flags/countries, not just a single subfolder name.
Refer to GetPathCandidates() for more information.
| [in] | path | The identifier of the root path. |
| [in] | subfolder | The subfolder inside the path. |
| [in] | filename | The filename inside the path + subfolder. |
Definition at line 89 of file paths.cpp.
References GetPathCandidates().
Referenced by GetSysPathUrl(), and LeechCraft::Util::UnhideListViewBase::UnhideListViewBase().
Here is the call graph for this function:
Here is the caller graph for this function:| UTIL_SYS_API QUrl LeechCraft::Util::GetSysPathUrl | ( | SysPath | path, |
| const QString & | subfolder, | ||
| const QString & | filename | ||
| ) |
Returns path to the file in the given root path and subfolder.
This function behaves exactly like GetSysPath(), but it returns the path as QUrl via the QUrl::fromLocalFile, so it is suitable, for example, for QML views.
| [in] | path | The identifier of the root path. |
| [in] | subfolder | The subfolder inside the path. |
| [in] | filename | The filename inside the path + subfolder. |
Definition at line 102 of file paths.cpp.
References GetSysPath().
Here is the call graph for this function:| UTIL_SYS_API QStringList LeechCraft::Util::GetSystemPaths | ( | ) |
Returns the components of the system PATH variable.
This function gets the PATH variable from the environment, parses it and returns the list of the components to the caller.
| UTIL_SYS_API QString LeechCraft::Util::GetTemporaryName | ( | const QString & | pattern = QString("lc_temp.XXXXXX") | ) |
Returns a temporary filename.
This function returns a name of a temporary file that could be created, not creating the file itself.
| [in] | pattern | Pattern of the filename. |
Definition at line 184 of file paths.cpp.
Referenced by LeechCraft::Util::DownloadHandler::DownloadHandler().
Here is the caller graph for this function:| UTIL_SYS_API QDir LeechCraft::Util::GetUserDir | ( | UserDir | dir, |
| const QString & | subpath | ||
| ) |
| QString LeechCraft::Util::GetUserText | ( | const Entity & | entity | ) |
Return the user-readable representation of the entity.
| [in] | entity | The Entity from which to make the user-readable representation. |
Definition at line 63 of file util.cpp.
References LeechCraft::Entity::Additional_, LeechCraft::Entity::Entity_, and LeechCraft::Entity::Mime_.
| GSLResult_t<AF, AV> LeechCraft::Util::GSL | ( | const AF & | af, |
| const AV & | av | ||
| ) |
Definition at line 57 of file applicative.h.
Referenced by operator*().
Here is the caller graph for this function:| UTIL_SYS_API bool LeechCraft::Util::HasSupportedImageExtension | ( | const QString & | filename | ) |
Checks if the given filename has a known image extension.
This function checks if the filename has an extension matching any image format known to QImageWriter.
| [in] | filename | The name of the file, either relative or absolute. |
| UTIL_XPC_API void LeechCraft::Util::InitJobHolderRow | ( | const QList< QStandardItem * > & | row | ) |
Definition at line 185 of file util.cpp.
References LeechCraft::JobProgress, LeechCraft::ProcessProgress, LeechCraft::ProcessState, LeechCraft::RoleJobHolderRow, and LeechCraft::ProcessStateInfo::Running.
| QTranslator * LeechCraft::Util::InstallTranslator | ( | const QString & | base, |
| const QString & | prefix = "leechcraft", |
||
| const QString & | appname = "leechcraft" |
||
| ) |
Loads and installs a translator.
Attempts to load and install a translator for the current locale. The name is formed like this: 'prefix_' + base + '_' + locale If base is an empty string, the second _ isn't appended.
First resources are searched (:/), then APPDIR/translations on Windows and /usr/[local/]share/appname/translations on Unix.
| [in] | base | Base name of the translation file. |
| [in] | prefix | The optional prefix of the translation (useful if it's not LC's one). |
| [in] | appname | Base name of the application. |
Definition at line 188 of file util.cpp.
References GetLocaleName(), and LoadTranslator().
Here is the call graph for this function:| auto LeechCraft::Util::Invoke | ( | F && | f, |
| Args &&... | args | ||
| ) | -> decltype (std::forward<F> (f) (std::forward<Args> (args)...)) |
Definition at line 40 of file oldcppkludges.h.
Referenced by LeechCraft::Util::InstanceFunctor< boost::optional< T > >::Apply(), LeechCraft::Util::CPP17::detail::ApplyImpl(), ComparingBy(), LeechCraft::Util::detail::DoesReturnVoid(), Filter(), First(), Map(), LeechCraft::Util::Introspectable::Register(), ReportFutureResult(), LeechCraft::Util::SlotClosure< FireDestrPolicy >::run(), LeechCraft::Util::WorkerThreadBase::ScheduleImpl(), LeechCraft::Util::WorkerThread< WorkerType >::ScheduleImpl(), and Second().
Here is the caller graph for this function:| auto LeechCraft::Util::Invoke | ( | Res Base::* | mem, |
| Real && | obj, | ||
| typename std::enable_if<!std::is_member_function_pointer< decltype(mem)>::value >::type * | = nullptr |
||
| ) | -> decltype (obj.*mem) |
Definition at line 46 of file oldcppkludges.h.
| auto LeechCraft::Util::Invoke | ( | Res Base::* | mem, |
| Real && | obj, | ||
| Rest &&... | rest | ||
| ) | -> decltype ((obj.*mem) (std::forward<Rest> (rest)...)) |
Definition at line 53 of file oldcppkludges.h.
| auto LeechCraft::Util::InvokeOn | ( | T && | t, |
| Args &&... | args | ||
| ) | -> decltype (detail::VisitorBase<Args...> |
| constexpr bool LeechCraft::Util::IsFunctor | ( | ) |
| constexpr bool LeechCraft::Util::IsMonadPlus | ( | ) |
Definition at line 61 of file monadplus.h.
| QTranslator * LeechCraft::Util::LoadTranslator | ( | const QString & | base, |
| const QString & | locale, | ||
| const QString & | prefix = "leechcraft", |
||
| const QString & | appname = "leechcraft" |
||
| ) |
Definition at line 150 of file util.cpp.
Referenced by InstallTranslator().
Here is the caller graph for this function:| boost::optional<V> LeechCraft::Util::Lookup | ( | const KV & | key, |
| const Cont< Pair< K, V >, Rest...> & | cont | ||
| ) |
| UTIL_XPC_API Entity LeechCraft::Util::MakeAN | ( | const QString & | header, |
| const QString & | text, | ||
| Priority | priority, | ||
| const QString & | senderID, | ||
| const QString & | cat, | ||
| const QString & | type, | ||
| const QString & | id, | ||
| const QStringList & | visualPath, | ||
| int | delta = 1, |
||
| int | count = 0, |
||
| const QString & | fullText = QString(), |
||
| const QString & | extendedText = QString() |
||
| ) |
Creates an Advanced Notifications-enabled notify entity.
Returns an entity with the given header, text and a bunch of other parameters that can be handled by Advanced Notifications.
The returned entity will also be handled by a visual notifications plugin if AN is not present. To avoid this set the MIME type of the result to x-leechcraft/notification+advanced.
Refer to the hand-written documentation for more information about using Advanced Notifications.
| [in] | header | The header of the notification. This field will also be used if AN is not present. |
| [in] | text | The text of the notification. This field will also be used if AN is not present. |
| [in] | priority | The priority of this notification. |
| [in] | senderID | The ID of the plugin sending this notification. |
| [in] | cat | The category of this notification (one of Cat constants in interfaces/an/constants.h). |
| [in] | type | The type of this notification (one of Type constants in interfaces/an/constants.h). |
| [in] | id | The ID of this notification, used to group consecutive notifications about similar events like incoming message from the same IM contact. |
| [in] | visualPath | The list of names for a menu-like structure wishing to show this notification. |
| [in] | delta | The change of count of events with this id, or 0 to use count. |
| [in] | count | The total count of events with this id, used if delta is 0. |
| [in] | fullText | The full text of this notification. If null, the text parameter is used. |
| [in] | extendedText | The extended text of this notification. If null, the text parameter is used. |
Definition at line 46 of file util.cpp.
References LeechCraft::AN::EF::Count, LeechCraft::AN::EF::DeltaCount, LeechCraft::AN::EF::EventCategory, LeechCraft::AN::EF::EventID, LeechCraft::AN::EF::EventType, LeechCraft::AN::EF::ExtendedText, LeechCraft::AN::EF::FullText, MakeNotification(), LeechCraft::AN::EF::SenderID, and LeechCraft::AN::EF::VisualPath.
Here is the call graph for this function:| UTIL_XPC_API Entity LeechCraft::Util::MakeANCancel | ( | const Entity & | event | ) |
Makes an event for canceling another Advanced Notifications event.
Creates an Entity that cancels a previously generated Advanced Notifications event. The returned entity can be then emitted to notify plugins that the given event has been canceled.
| [in] | event | The event to cancel. |
Definition at line 130 of file util.cpp.
References LeechCraft::Entity::Additional_, LeechCraft::AN::CatEventCancel, LeechCraft::Entity::Entity_, LeechCraft::AN::EF::EventCategory, LeechCraft::AN::EF::EventID, MakeNotification(), LeechCraft::PInfo_, and LeechCraft::AN::EF::SenderID.
Here is the call graph for this function:| UTIL_XPC_API Entity LeechCraft::Util::MakeANCancel | ( | const QString & | senderId, |
| const QString & | eventId | ||
| ) |
Makes an event for canceling another Advanced Notifications event.
Creates an Entity that cancels a previously generated Advanced Notifications event. The returned entity can be then emitted to notify plugins that the given event has been canceled.
This function doesn't take a previously created entity as the other overload does. Instead, it plainly creates the required entity from the given senderId and eventId. They should match those of the event in question.
| [in] | senderId | The ID of the sender of the event that is to be canceled. |
| [in] | eventId | The ID of the event that is to be canceled. |
Definition at line 139 of file util.cpp.
References LeechCraft::Entity::Additional_, LeechCraft::AN::CatEventCancel, LeechCraft::AN::EF::EventCategory, LeechCraft::AN::EF::EventID, MakeNotification(), LeechCraft::PInfo_, and LeechCraft::AN::EF::SenderID.
Here is the call graph for this function:| UTIL_XPC_API Entity LeechCraft::Util::MakeANRule | ( | const QString & | title, |
| const QString & | senderID, | ||
| const QString & | category, | ||
| const QStringList & | types, | ||
| AN::NotifyFlags | flags = AN::NotifyNone, |
||
| bool | openConfiguration = false, |
||
| const QList< QPair< QString, ANFieldValue >> & | fields = {} |
||
| ) |
Creates an Entity defining an Advanced Notifications rule.
Returns an entity describing a notifications rule triggering under various conditions, defined by the parameters of this function.
| [in] | title | The human-readable title of the rule. |
| [in] | senderID | The plugin ID of the sender (must not be empty). |
| [in] | category | The category of the event (must not be empty). |
| [in] | types | The types of events in the given category. If this list is empty, every event type matches. |
| [in] | flags | The flags describing the notification behavior for for this rule |
| [in] | openConfiguration | Whether the configuration widget for the just created rule should be opened automatically. |
| [in] | fields | The list of pairs of a field ID (as in ANFieldData::ID_) and corresponding field value as ANFieldValue. |
Definition at line 67 of file util.cpp.
References LeechCraft::Entity::Additional_, LeechCraft::AN::EF::EventCategory, LeechCraft::AN::EF::EventID, LeechCraft::AN::EF::EventType, LeechCraft::AN::EF::IsSingleShot, MakeNotification(), LeechCraft::AN::EF::NotifyAudio, LeechCraft::AN::NotifyAudio, LeechCraft::AN::EF::NotifyPersistent, LeechCraft::AN::NotifyPersistent, LeechCraft::AN::NotifySingleShot, LeechCraft::AN::EF::NotifyTransient, LeechCraft::AN::NotifyTransient, LeechCraft::AN::EF::OpenConfiguration, LeechCraft::PLog_, and LeechCraft::AN::EF::SenderID.
Here is the call graph for this function:| UTIL_GUI_API QDialog * LeechCraft::Util::MakeCertificateViewerDialog | ( | const QSslCertificate & | cert, |
| QWidget * | parent | ||
| ) |
Definition at line 104 of file sslcertificateinfowidget.cpp.
References Close.
| Entity LeechCraft::Util::MakeEntity | ( | const QVariant & | entity, |
| const QString & | location, | ||
| TaskParameters | tp, | ||
| const QString & | mime | ||
| ) |
Definition at line 105 of file util.cpp.
References LeechCraft::Entity::Entity_, LeechCraft::Entity::Location_, LeechCraft::Entity::Mime_, and LeechCraft::Entity::Parameters_.
Referenced by LeechCraft::Util::DownloadHandler::DownloadHandler(), LeechCraft::Util::XDG::Item::Execute(), GetDataFilters(), MakeNotification(), LeechCraft::Util::ShortcutManager::RegisterGlobalShortcut(), and LeechCraft::Util::StdDataFilterMenuCreator::StdDataFilterMenuCreator().
Here is the caller graph for this function:| UTIL_XPC_API Entity LeechCraft::Util::MakeEntity | ( | const QVariant & | entity, |
| const QString & | location, | ||
| LeechCraft::TaskParameters | tp, | ||
| const QString & | mime = QString() |
||
| ) |
An utility function to make a Entity.
Creates a Entity that wraps the given entity from given location with parameterrs identified by tp and given mime type (which is null by default).
This function is provided for convenience and is equivalent to manually filling the Entity.
| [in] | entity | The Entity_ field of the Entity. |
| [in] | location | The Location_ field of the Entity. |
| [in] | tp | The Params_ field of the Entity. |
| [in] | mime | The Mime_ field of the Entity. |
| auto LeechCraft::Util::MakeLambdaEventFilter | ( | F && | f, |
| QObject * | parent = nullptr |
||
| ) |
Definition at line 83 of file lambdaeventfilter.h.
References parent.
| Lazy_t<T> LeechCraft::Util::MakeLazy | ( | const T & | t | ) |
| Lazy_t<R> LeechCraft::Util::MakeLazyF | ( | const F & | l | ) |
| QMap<K, V> LeechCraft::Util::MakeMap | ( | std::initializer_list< std::pair< K, V >> | l | ) |
| UTIL_XPC_API Entity LeechCraft::Util::MakeNotification | ( | const QString & | header, |
| const QString & | text, | ||
| Priority | priority | ||
| ) |
An utility function to make a Entity with notification.
Creates a Entity that holds information about user-visible notification. These notifications have "x-leechcraft/notification" MIME.
You can further customize the returned Entity to suit your exact needs. See the documentation for Entity about such entities.
| [in] | header | The header of the notification. |
| [in] | text | The text of the notification. |
| [in] | priority | The priority level of the notification. |
Definition at line 118 of file util.cpp.
References LeechCraft::Entity::Additional_, LeechCraft::AutoAccept, MakeEntity(), and LeechCraft::OnlyHandle.
Referenced by MakeAN(), MakeANCancel(), and MakeANRule().
Here is the call graph for this function:
Here is the caller graph for this function:| QString LeechCraft::Util::MakePrettySize | ( | qint64 | sourceSize | ) |
Makes a formatted size from number.
Converts, for example, 1048576 to 1.0 MB.
| [in] | sourceSize | Size in bytes. |
| QString LeechCraft::Util::MakePrettySizeShort | ( | qint64 | size | ) |
Converts a bytes count to a string representation with appropriately chosen units.
Converts, for example, 1048576 to 1.0 M.
As opposed to MakePrettySize(), this function tries to keep the returned string short.
| [in] | size | Size in bytes. |
| QFuture<T> LeechCraft::Util::MakeReadyFuture | ( | const T & | t | ) |
Creates a ready future holding the given value.
This function creates a ready future containing the value t. That is, calling QFuture<T>::get() on the returned future will not block.
| [in] | t | The value to keep in the future. |
| T | The type of the value in the future. |
Definition at line 760 of file futures.h.
Referenced by LeechCraft::Util::InstanceFunctor< QFuture< T > >::Apply().
Here is the caller graph for this function:| detail::ScopeGuard<F> LeechCraft::Util::MakeScopeGuard | ( | const F & | f | ) |
Returns an object performing passed function on scope exit.
The returned object performs the passed function f upon destruction (and, thus, on scope exit).
The object is not copyable and not movable, and otherwise is implementation-defined.
Typical usage:
| [in] | f | The function to execute on scope exit. Should be a callable without any arguments. |
Definition at line 157 of file util.h.
Referenced by LeechCraft::Util::SvcAuth::VkAuthManager::ManageQueue(), LeechCraft::Util::NetworkDiskCacheGC::RegisterDirectory(), and LeechCraft::Util::CustomCookieJar::setCookiesFromUrl().
Here is the caller graph for this function:| QString LeechCraft::Util::MakeTimeFromLong | ( | ulong | time | ) |
Makes a formatted time from number.
Converts, for example 256 to 00:04:16.
| [in] | time | Time interval in seconds. |
| auto LeechCraft::Util::Map | ( | const Container< T > & | c, |
| F | f | ||
| ) |
Definition at line 148 of file prelude.h.
References LeechCraft::Util::detail::Append(), and Invoke().
Referenced by LeechCraft::Util::oral::detail::BuildCachedFieldsData(), ConcatMap(), LeechCraft::Util::ShortcutManager::RegisterGlobalShortcut(), and LeechCraft::Util::ShortcutManager::SetShortcut().
Here is the call graph for this function:
Here is the caller graph for this function:| auto LeechCraft::Util::Map | ( | const Container & | c, |
| F | f | ||
| ) |
Definition at line 163 of file prelude.h.
References LeechCraft::Util::detail::Append(), and Invoke().
Here is the call graph for this function:| auto LeechCraft::Util::Map | ( | const Container & | c, |
| F | f | ||
| ) |
| auto LeechCraft::Util::Map | ( | Container & | c, |
| F | f | ||
| ) |
| MP LeechCraft::Util::Mzero | ( | ) |
Definition at line 67 of file monadplus.h.
| UTIL_XSD_API XmlSettingsDialog * LeechCraft::Util::OpenXSD | ( | const QString & | title, |
| const QString & | filename, | ||
| Util::BaseSettingsManager * | bsm | ||
| ) |
Opens XML settings dialog for the given XML filename.
The dialog is opened as non-modal and non-blocking and is automatically shown. The dialog is also set to be automatically deleted as soon as it is closed.
| [in] | title | The title of the dialog. |
| [in] | filename | The XML settings file to use to build the dialog. |
| [in] | bsm | The instance of BaseSettingsManager to use for storing the settings. |
| bool LeechCraft::Util::operator!= | ( | const ModelIterator & | left, |
| const ModelIterator & | right | ||
| ) |
For iterators to not be equal at least either the model, parent index, row or column should be unequal. Traversal index is not taken into account.
| [in] | left | First iterator to check for inequality. |
| [in] | right | Second iterator to check for inequality. |
Definition at line 99 of file modeliterator.cpp.
| auto LeechCraft::Util::operator* | ( | const AF & | af, |
| const AV & | av | ||
| ) | -> decltype (GSL (af, av)) |
Definition at line 63 of file applicative.h.
References GSL().
Here is the call graph for this function:| auto LeechCraft::Util::operator* | ( | const F & | function, |
| const T & | functor | ||
| ) | -> decltype (Fmap (functor, function)) |
An operator-style alias for Fmap().
This operator allows writing Fmap()'s in infix form. Internally, it just forwards the call to Fmap().
| [in] | functor | The functor whose values are subject to function. |
| [in] | function | The function that should be applied to the values in the functor. |
| T | The type of the functor. |
| F | The type of the function to apply to the elements inside the functor. |
Definition at line 173 of file functor.h.
References Fmap().
Here is the call graph for this function:| auto LeechCraft::Util::operator* | ( | const T & | functor, |
| const F & | function | ||
| ) | -> decltype (Fmap (functor, function)) |
An operator-style alias for Fmap().
This operator allows writing Fmap()'s in infix form. Internally, it just forwards the call to Fmap().
| [in] | functor | The functor whose values are subject to function. |
| [in] | function | The function that should be applied to the values in the functor. |
| T | The type of the functor. |
| F | The type of the function to apply to the elements inside the functor. |
Definition at line 199 of file functor.h.
References Fmap().
Here is the call graph for this function:| auto LeechCraft::Util::operator+ | ( | const MP & | m1, |
| const MP & | m2 | ||
| ) | -> decltype (Mplus (m1) (m2)) |
Definition at line 82 of file monadplus.h.
References Mplus.
| bool LeechCraft::Util::operator== | ( | const ModelIterator & | left, |
| const ModelIterator & | right | ||
| ) |
For iterators to be equal the model, parent index, row and column should all be equal. Traversal index is not taken into account.
| [in] | left | First iterator to check for equality. |
| [in] | right | Second iterator to check for equality. |
Definition at line 91 of file modeliterator.cpp.
| auto LeechCraft::Util::operator>> | ( | const MV & | value, |
| const F & | f | ||
| ) | -> decltype (Bind (value, f)) |
|
inline |
Parses JSON content in the given bytearray.
This functions uses QJson on Qt4 (don't forget to link to it!) and Qt's native JSON parsers on Qt5.
| [in] | bytes | The byte array to parse JSON from. |
| [in] | context | The context string to be used in logging messages. |
Definition at line 57 of file parsejson.h.
Referenced by ParseJson().
Here is the caller graph for this function:
|
inline |
Utility function parsing JSON from the device.
This function reads all available data from the device and passes it to the other ParseJson() overload.
| [in] | device | The device from which JSON-encoded data should be read. |
| [in] | context | The context string to be used in logging messages. |
Definition at line 97 of file parsejson.h.
References ParseJson().
Here is the call graph for this function:| std::pair<Cont<L>, Cont<R> > LeechCraft::Util::PartitionEithers | ( | const Cont< Either< L, R >> & | eithers | ) |
| auto LeechCraft::Util::Pure | ( | const T & | v | ) |
Definition at line 45 of file applicative.h.
Referenced by Return().
Here is the caller graph for this function:| auto LeechCraft::Util::Pure | ( | const T & | v | ) | -> decltype (InstanceApplicative<Applicative>::Pure (v)) |
Definition at line 51 of file applicative.h.
| LeechCraft::Util::Q_DECLARE_FLAGS | ( | FitFlags | , |
| FitFlag | |||
| ) |
| LeechCraft::Util::Rect_ | ( | size | ) |
Definition at line 49 of file autoresizemixin.cpp.
| std::enable_if_t<!std::is_same<R, void>::value> LeechCraft::Util::ReportFutureResult | ( | QFutureInterface< R > & | iface, |
| F && | f, | ||
| Args &&... | args | ||
| ) |
Definition at line 49 of file futures.h.
References Invoke().
Referenced by LeechCraft::Util::WorkerThreadBase::ScheduleImpl().
Here is the call graph for this function:
Here is the caller graph for this function:| void LeechCraft::Util::ReportFutureResult | ( | QFutureInterface< void > & | iface, |
| F && | f, | ||
| Args &&... | args | ||
| ) |
| std::enable_if_t<std::is_constructible<R, U>::value && !detail::IsCallable<U>)> LeechCraft::Util::ReportFutureResult | ( | QFutureInterface< R > & | iface, |
| U && | value | ||
| ) |
| auto LeechCraft::Util::Return | ( | const V & | v | ) |
| constexpr List LeechCraft::Util::Reverse | ( | List<> | ) |
Definition at line 77 of file typelist.h.
| constexpr auto LeechCraft::Util::Reverse | ( | List< Head, Tail...> | ) | -> decltype (Concat (Reverse (List<Tail...> |
Definition at line 83 of file typelist.h.
| R LeechCraft::Util::RightOr | ( | const Either< L, R > & | either, |
| F && | f | ||
| ) |
Definition at line 179 of file either.h.
References LeechCraft::Util::Either< L, R >::GetRight(), and LeechCraft::Util::Either< L, R >::IsRight().
Here is the call graph for this function:| R LeechCraft::Util::RightOr | ( | const Either< L, R > & | either, |
| const R & | r | ||
| ) |
Definition at line 187 of file either.h.
References LeechCraft::Util::Either< L, R >::GetRight(), and LeechCraft::Util::Either< L, R >::IsRight().
Here is the call graph for this function:| void LeechCraft::Util::Save2MimeData | ( | QMimeData * | mimeData, |
| const QString & | name, | ||
| const T & | t | ||
| ) |
| UTIL_XPC_API void LeechCraft::Util::SavePassword | ( | const QString & | password, |
| const QString & | keyName, | ||
| const ICoreProxy_ptr & | proxy | ||
| ) |
Saves the password to be retrieved later via GetPassword().
This function stores the password under the given keyName. The password is typically stored in a storage plugin like SecMan.
If there are no storage plugins, this function does nothing.
| [in] | password | The password string to save. |
| [in] | keyName | The name of the key uniquely identifying the password. |
| [in] | proxy | The core proxy used to communicate with other plugins. |
Definition at line 153 of file passutils.cpp.
Referenced by GetPassword().
Here is the caller graph for this function:| auto LeechCraft::Util::Second | ( | F && | f | ) |
| detail::SequenceProxy< detail::SequencerRetType_t<QFuture<T> >, QFuture<T>, detail::EmptyDestructionTag > LeechCraft::Util::Sequence | ( | QObject * | parent, |
| const QFuture< T > & | future | ||
| ) |
Creates a sequencer that allows chaining multiple futures.
This function creates a sequencer object that starts with the passed future, and, after this future being completed, passes its result to the next function in chain, and so on, until either there are no more functions in the chain or a function returns something different from QFuture<T> and so on.
Each function in the chain may return a QFuture<T> for some T != void, in which case it will be unwrapped and passed along to the next function in the chain.
The functors may also return QFuture<void>, meaning that the next function in the chain will be invoked without arguments when this future is completed.
If a functor returns void, no further chaining is possible.
The functions are chained via the detail::SequenceProxy::Then() method or via the operator>>() (leading to a nice somewhat monadic-like syntax).
The parent QObject controls the lifetime of the sequencer: as soon as it is destroyed, the sequencer is destroyed as well, and all pending actions are cancelled (the currently executing action will still continue to execute, though). This parameter is optional and may be nullptr.
A sample usage may look like:
| [in] | parent | The parent object of the sequencer (may be nullptr. |
| [in] | future | The future to pass to the sequencer. |
| T | The underlying type of the passed future (the async computation result type). |
Definition at line 743 of file futures.h.
Referenced by LeechCraft::Util::InstanceFunctor< QFuture< T > >::Apply(), LeechCraft::Util::NetworkDiskCache::expire(), LeechCraft::Util::CustomCookieJar::setCookiesFromUrl(), and LeechCraft::Util::XDG::ItemsFinder::update().
Here is the caller graph for this function:
|
inline |
Serializes the given var to JSON representation.
This function abstracts away differences between Qt4 and Qt5. It uses QJson on Qt4 (don't forget to link to it!) and native JSON functions on Qt5.
| [in] | var | The recursive variant to be serialized to JSON. |
| [in] | compact | Whether the output should be compacitified (this parameter may have no effect). |
Definition at line 55 of file serializejson.h.
| UTIL_XPC_API void LeechCraft::Util::SetJobHolderProgress | ( | const QList< QStandardItem * > & | row, |
| qint64 | done, | ||
| qint64 | total, | ||
| const QString & | text | ||
| ) |
Sets the progress values on the given row.
This function first retrieves the QStandardItem object at the position defined by JobHolderColumn::JobProgress in the passed row and then sets its text to text and updates the ProcessStateInfo structure under the JobHolderRole::ProcessState role to have the given amount of done and total.
| [in] | row | The row to set data on. |
| [in] | done | The amount of work done. |
| [in] | total | The total amount of work. |
| [in] | text | The text that the progress-related item should have in the row. |
Definition at line 166 of file util.cpp.
References LeechCraft::JobProgress.
| UTIL_XPC_API void LeechCraft::Util::SetJobHolderProgress | ( | QStandardItem * | item, |
| qint64 | done, | ||
| qint64 | total | ||
| ) |
Sets the done and total progress values on the given item.
This function updates the ProcessStateInfo structure stored under the JobHolderRole::ProcessState role in the given item.
| [in] | item | The item to set data on. |
| [in] | done | The amount of work done. |
| [in] | total | The total amount of work. |
Definition at line 177 of file util.cpp.
References LeechCraft::ProcessStateInfo::Done_, and LeechCraft::ProcessState.
| Cont LeechCraft::Util::Sorted | ( | Cont && | cont | ) |
| Container<Container<T> > LeechCraft::Util::SplitInto | ( | size_t | numChunks, |
| const Container< T > & | container | ||
| ) |
| auto LeechCraft::Util::Stlize | ( | Assoc && | assoc | ) | -> detail::StlAssocRange<detail::Identity, detail::Identity, decltype (assoc.begin ()), Assoc, PairType> |
Converts an Qt's associative sequence assoc to an STL-like iteratable range.
This function takes an associative container assoc (one of Qt's containers like QHash and QMap) and returns a range with value_type equal to PairType<K, V>.
This way, both the key and the value of each pair in the assoc can be accessed in a range-for loop, for example.
Example usage:
All kinds of accesses are supported: elements of a non-const container may be modified via the iterators in the returned range.
| [in] | assoc | The Qt's associative container to iterate over. |
value_type.| PairType | The type of the pairs that should be used in the resulting range's iterators' value_type. |
| Assoc | The type of the source Qt associative container. |
Definition at line 158 of file qtutil.h.
Referenced by LeechCraft::Util::WkFontsWidget::accept(), LeechCraft::Util::MassFontChangeDialog::GetFamilies(), LeechCraft::Util::oral::detail::HandleExprTree(), and LeechCraft::Util::WkFontsWidget::RegisterSettable().
Here is the caller graph for this function:| auto LeechCraft::Util::StlizeCopy | ( | Assoc && | assoc | ) | -> detail::StlAssocRange<std::decay, std::decay, decltype (assoc.begin ()), Assoc, PairType> |
Definition at line 164 of file qtutil.h.
References Escape(), and UTIL_SLL_API.
Here is the call graph for this function:| void LeechCraft::Util::swap | ( | FDGuard & | g1, |
| FDGuard & | g2 | ||
| ) |
Definition at line 74 of file fdguard.cpp.
| constexpr List<T...> LeechCraft::Util::Tail | ( | List< H, T...> | ) |
Definition at line 44 of file typelist.h.
|
inline |
Definition at line 36 of file unreachable.h.
Referenced by LeechCraft::Util::CpuFeatures::GetFeatureName(), LeechCraft::Util::oral::detail::GetInsertPrefix(), LeechCraft::Util::CpuFeatures::HasFeature(), and LeechCraft::Util::oral::detail::TypeToSql().
Here is the caller graph for this function:| auto LeechCraft::Util::Visit | ( | const boost::variant< HeadVar, TailVars...> & | v, |
| Args &&... | args | ||
| ) | -> decltype (detail::VisitorBase<Args...> |
| auto LeechCraft::Util::Zip | ( | const Container< T1 > & | c1, |
| const Container< T2 > & | c2 | ||
| ) | -> Container<Pair<T1, T2>> |
| auto LeechCraft::Util::ZipWith | ( | const Container< T1 > & | c1, |
| const Container< T2 > & | c2, | ||
| F | f | ||
| ) | -> WrapType_t<Container<std::decay_t<std::result_of_t<F (T1, T2)>>>> |
Definition at line 59 of file prelude.h.
Referenced by LeechCraft::Util::oral::detail::AdaptUpdate< T >::AdaptUpdate(), and Zip().
Here is the caller graph for this function:| const auto LeechCraft::Util::Apply = [] (const auto& t) { return t (); } |
| LeechCraft::Util::E_ { e } |
Definition at line 96 of file downloadhandler.cpp.
| const auto LeechCraft::Util::Fst = [] (const auto& pair) { return pair.first; } |
| const auto LeechCraft::Util::Id = [] (const auto& t) { return t; } |
| LeechCraft::Util::iem |
Definition at line 60 of file downloadhandler.cpp.
| LeechCraft::Util::List< Head > |
Definition at line 83 of file typelist.h.
| const { ... } LeechCraft::Util::Mplus |
Referenced by operator+().
| const { ... } LeechCraft::Util::Msum |
| LeechCraft::Util::parent |
Definition at line 80 of file downloadhandler.cpp.
Referenced by LeechCraft::Util::ModelItemBase< ModelItem >::GetRow(), LeechCraft::Util::detail::LambdaEventFilter< F >::LambdaEventFilter(), MakeLambdaEventFilter(), and LeechCraft::Util::WorkerThread< WorkerType >::WorkerThread().
| const auto LeechCraft::Util::Snd = [] (const auto& pair) { return pair.second; } |
| const int LeechCraft::Util::SourcePager = 2 |
Definition at line 51 of file xwrapper.cpp.
Referenced by LeechCraft::Util::XWrapper::CloseWindow(), LeechCraft::Util::XWrapper::MaximizeWindow(), LeechCraft::Util::XWrapper::MoveWindowTo(), LeechCraft::Util::XWrapper::RaiseWindow(), LeechCraft::Util::XWrapper::ShadeWindow(), LeechCraft::Util::XWrapper::UnmaximizeWindow(), and LeechCraft::Util::XWrapper::UnshadeWindow().
| const int LeechCraft::Util::StateAdd = 1 |
Definition at line 54 of file xwrapper.cpp.
Referenced by LeechCraft::Util::XWrapper::MaximizeWindow(), LeechCraft::Util::XWrapper::MoveWindowTo(), and LeechCraft::Util::XWrapper::ShadeWindow().
| const int LeechCraft::Util::StateRemove = 0 |
Definition at line 53 of file xwrapper.cpp.
Referenced by LeechCraft::Util::XWrapper::MoveWindowTo(), LeechCraft::Util::XWrapper::UnmaximizeWindow(), and LeechCraft::Util::XWrapper::UnshadeWindow().