12
|
1 |
/*
|
|
2 |
* bookmarkscontroller.h
|
|
3 |
*
|
|
4 |
* Created on: Aug 25, 2010
|
|
5 |
* Author: mmoretti
|
|
6 |
*/
|
|
7 |
|
|
8 |
#ifndef BOOKMARKSCONTROLLER_H_
|
|
9 |
#define BOOKMARKSCONTROLLER_H_
|
|
10 |
|
|
11 |
#include <QObject>
|
|
12 |
#include "BWFGlobal.h"
|
|
13 |
class QWidget;
|
|
14 |
|
|
15 |
class BookmarksManager;
|
|
16 |
class BookmarkResults;
|
|
17 |
class BookmarkFav;
|
|
18 |
//#include "BookmarksManager.h"
|
|
19 |
|
|
20 |
class BWF_EXPORT BookmarksController : public QObject {
|
|
21 |
|
|
22 |
Q_OBJECT
|
|
23 |
|
|
24 |
public:
|
|
25 |
virtual ~BookmarksController();
|
|
26 |
static BookmarksController* getSingleton();
|
|
27 |
|
|
28 |
public slots:
|
|
29 |
int addBookmark(QString title, QString URL);
|
|
30 |
int modifyBookmark(int origBookmarkId, QString newTitle, QString newURl);
|
|
31 |
int deleteBookmark(int bookmarkId);
|
|
32 |
int clearAll();
|
|
33 |
int findAllBookmarks();
|
|
34 |
QObject *findBookmark(int bookmarkID);
|
|
35 |
int reorderBookmark(int bookmarkID, int newIndex);
|
|
36 |
QObject *nextBookmark();
|
|
37 |
bool hasMoreBookmarks();
|
|
38 |
void showBookmarkEditDialog(QString title, QString url, int bookmarkID);
|
|
39 |
// TODO add tag stuff when we get a ui for it
|
|
40 |
|
|
41 |
signals:
|
|
42 |
void bookmarkAdded(QString,QString,int);
|
|
43 |
void bookmarksCleared();
|
|
44 |
void launchBookmarkEditDailog(QString,QString,int);
|
|
45 |
void bookmarkModified(QString, QString, int);
|
|
46 |
|
|
47 |
private:
|
|
48 |
BookmarksController(QWidget *parent = 0);
|
|
49 |
|
|
50 |
BookmarksManager *m_bm;
|
|
51 |
BookmarkResults *m_bmr;
|
|
52 |
BookmarkFav *m_bmf;
|
|
53 |
};
|
|
54 |
|
|
55 |
#endif /* BOOKMARKSCONTROLLER_H_ */
|