diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-02-10 15:10:13 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-02-13 11:44:42 +0900 |
| commit | 8f8f84410cc591c85c5e83e0b3efdcda5fdbe42e (patch) | |
| tree | f273a932ce048ef22ea9d9888b77ea8a2b8f3e33 /src/sq_bookmarkowner.h | |
| parent | 424635023ee423826de12514b2fec7834b8deb7b (diff) | |
| download | ksquirrel-8f8f8441.tar.gz ksquirrel-8f8f8441.zip | |
Rename 'ksquirrel' folder to 'src'
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 203fcb8d90752b546c672c625927a136b959fcfb)
Diffstat (limited to 'src/sq_bookmarkowner.h')
| -rw-r--r-- | src/sq_bookmarkowner.h | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/src/sq_bookmarkowner.h b/src/sq_bookmarkowner.h new file mode 100644 index 0000000..93dc62f --- /dev/null +++ b/src/sq_bookmarkowner.h @@ -0,0 +1,75 @@ +/*************************************************************************** + sq_bookmarkowner.h - description + ------------------- + begin : ??? ??? 27 2004 + copyright : (C) 2004 by Baryshev Dmitry + email : ksquirrel.iv@gmail.com + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef SQ_BOOKMARKOWNER_H +#define SQ_BOOKMARKOWNER_H + +#include <kbookmarkmanager.h> +#include <kurl.h> + +#include <tqobject.h> +#include <tqwidget.h> + +/* + * Class for managing bookmarks. It used in main class (KSquirrel::initBookmarks()) + * and in SQ_WidgetStack to store and manage bookmarks. + */ + +class SQ_BookmarkOwner : public TQObject, public KBookmarkOwner +{ + TQ_OBJECT + + + public: + SQ_BookmarkOwner(TQWidget *parent = 0); + virtual ~SQ_BookmarkOwner(); + + /* + * User selected some bookmark. It will emit 'openURL' signal, + * and SQ_WidgetStack will catch it. + */ + virtual void openBookmarkURL(const TQString &); + + /* + * Current url. If user selected "Add bookmark", this + * url will be added to bookmarks. See also SQ_BookmarkOwner::setURL() + */ + virtual TQString currentURL() const; + + static SQ_BookmarkOwner* instance() { return m_instance; } + + /* + * Set current url + */ + public slots: + void setURL(const KURL &); + + /* + * Signal to open some url. SQ_WidgetStack will catch it + * and change current directory. + */ + signals: + void openURL(const KURL &); + + private: + KURL URL; + + // singleton + static SQ_BookmarkOwner *m_instance; +}; + +#endif |
