14 * |
14 * |
15 * You should have received a copy of the GNU General Public License |
15 * You should have received a copy of the GNU General Public License |
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 */ |
17 */ |
18 |
18 |
19 #ifndef MISC_H |
19 #ifndef ZANDEMO_MISC_H |
20 #define MISC_H |
20 #define ZANDEMO_MISC_H |
21 |
21 |
22 #include "types.h" |
22 #include "types.h" |
23 |
23 |
24 uint32 makeByteID (uint8 a, uint8 b, uint8 c, uint8 d); |
24 uint32 makeByteID (uint8 a, uint8 b, uint8 c, uint8 d); |
25 str binaryConfigName (str ver); |
25 str binaryConfigName (str ver); |
26 str basename (str path); |
26 str basename (str path); |
27 list<var> getVersionsList(); |
|
28 list<var> getReleasesList(); |
|
29 void addVersion (str name, bool isRelease, str binaryPath); |
27 void addVersion (str name, bool isRelease, str binaryPath); |
|
28 |
|
29 QList<QVariant> getVersions(); |
30 |
30 |
31 // ----------------------------------------------------------------------------- |
31 // ----------------------------------------------------------------------------- |
32 // Templated clamp |
32 // Templated clamp |
33 template<class T> static inline T clamp (T a, T min, T max) { |
33 template<class T> static inline T clamp (T a, T min, T max) { |
34 return (a > max) ? max : (a < min) ? min : a; |
34 return (a > max) ? max : (a < min) ? min : a; |