PCManFM-Qt
bookmarkaction.h
1 /*
2 
3  Copyright (C) 2013 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License along
16  with this program; if not, write to the Free Software Foundation, Inc.,
17  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19 
20 
21 #ifndef BOOKMARKACTION_H
22 #define BOOKMARKACTION_H
23 
24 #include "libfmqtglobals.h"
25 #include <QAction>
26 #include <libfm/fm.h>
27 
28 namespace Fm {
29 
30 // action used to create bookmark menu items
31 class LIBFM_QT_API BookmarkAction : public QAction {
32 public:
33  explicit BookmarkAction(FmBookmarkItem* item, QObject* parent = 0);
34 
35  virtual ~BookmarkAction() {
36  if(item_)
37  fm_bookmark_item_unref(item_);
38  }
39 
40  FmBookmarkItem* bookmark() {
41  return item_;
42  }
43 
44  FmPath* path() {
45  return item_->path;
46  }
47 
48 private:
49  FmBookmarkItem* item_;
50 };
51 
52 }
53 
54 #endif // BOOKMARKACTION_H
Definition: appchoosercombobox.cpp:26
Definition: bookmarkaction.h:31