Changeset 121 for smplayer/vendor/current/src/favorites.h
- Timestamp:
- Mar 15, 2012, 5:14:10 PM (14 years ago)
- File:
-
- 1 edited
-
smplayer/vendor/current/src/favorites.h (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
smplayer/vendor/current/src/favorites.h
r118 r121 1 1 /* smplayer, GUI front-end for mplayer. 2 Copyright (C) 2006-201 1 Ricardo Villalba <[email protected]>2 Copyright (C) 2006-201> 3 3 4 4 This program is free software; you can redistribute it and/or modify … … 20 20 #define _FAVORITES_H_ 21 21 22 #include <Q Object>22 #include <Q> 23 23 #include <QString> 24 24 #include <QList> 25 25 26 class QMenu;27 26 class QAction; 28 27 class QWidget; … … 31 30 { 32 31 public: 33 Favorite() {} 34 Favorite(QString name, QString file, QString icon = QString::null) { _name = name; _file = file; _icon = icon; }; 32 Favorite() { is_subentry = false; } 33 Favorite(QString name, QString file, QString icon = QString::null, bool subentry = false) 34 { 35 _name = name; _file = file; _icon = icon; is_subentry = subentry; 36 }; 35 37 virtual ~Favorite() {}; 36 38 … … 38 40 void setFile(QString file) { _file = file; }; 39 41 void setIcon(QString file) { _icon = file; }; 42 40 43 41 44 QString name() { return _name; }; 42 45 QString file() { return _file; } 43 46 QString icon() { return _icon; }; 47 44 48 45 49 protected: 46 50 QString _name, _file, _icon; 51 47 52 }; 48 53 49 54 typedef QList<Favorite> FavoriteList; 50 55 51 class Favorites : public Q Object56 class Favorites : public Q 52 57 { 53 58 Q_OBJECT … … 56 61 ~Favorites(); 57 62 58 QMenu * menu();59 63 QAction * editAct() { return edit_act; }; 60 64 QAction * jumpAct() { return jump_act; }; 61 65 QAction * nextAct() { return next_act; }; 62 66 QAction * previousAct() { return previous_act; }; 67 63 68 64 69 public slots: … … 66 71 void previous(); 67 72 73 74 68 75 signals: 69 76 void activated(QString filemane); 77 78 70 79 71 80 protected: 72 void save(); 73 void load(); 74 void createMenu(); 75 void updateMenu(); 76 void populateMenu(); 81 virtual void save(); 82 virtual void load(); 83 virtual void updateMenu(); 84 virtual void populateMenu(); 85 virtual Favorites * createNewObject(QString filename, QWidget * parent); 86 void delete_children(); 77 87 78 88 int findFile(QString filename); … … 85 95 virtual void edit(); 86 96 virtual void jump(); 97 98 99 100 101 87 102 88 103 protected: 89 104 FavoriteList f_list; 90 105 QString _filename; 91 QMenu * _menu;92 106 QAction * edit_act; 93 107 QAction * jump_act; 94 108 QAction * next_act; 95 109 QAction * previous_act; 110 96 111 97 112 QWidget * parent_widget; … … 102 117 // Last item selected in the jump dialog 103 118 int last_item; 119 120 121 122 123 104 124 }; 105 125
Note:
See TracChangeset
for help on using the changeset viewer.
