WARNING: USE THIS SOFTWARE AT YOUR OWN RISK! THIS IS EXPERIMENTAL SOFTWARE NOT INTENDED FOR PRODUCTION USE! Zuble is currently an early stage prototype. As such Zuble is minimally tested and inherently unstable. It is provided for experimental, development, and demonstration purposes only. Zuble QML Types   |  Zuble C++ Classes   |  Zuble Overview
Zuble  0.1
Zuble Framework C++/QML extension API
ZblResource.h
Go to the documentation of this file.
1 /*
2  * Zuble - A run-time system for QML/Javascript applications
3  * Copyright (C) 2014 Bob Dinitto
4  *
5  * Filename: ZblResource.h
6  * Created on: 12/25/2014
7  * Author: Bob Dinitto
8  *
9  * Zuble is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22  *
23  */
24 
25 #ifndef ZBLRESOURCE_H
26 #define ZBLRESOURCE_H
27 
28 #include <QObject>
29 
30 namespace Zbl
31 {
32 
46 {
47 
48 public:
49  explicit ZblResource(
50  const char* uri,
51  int versionMajor,
52  int versionMinor,
53  const char* fileName);
54 
55  virtual ~ZblResource();
56 
57 
58  bool validate();
59 
64  const QString& uri() const {return m_uri;}
65 
70  int versionMajor() const {return m_versionMajor;}
71 
76  int versionMinor() const {return m_versionMinor;}
77 
82  const QString& fileName() const {return m_fileName;}
83 
89  bool isLoaded() const {return m_loaded;}
90 
91  bool load();
92 
93 
94 signals:
95 
96 public slots:
97 
98 protected:
99 
103  QString m_uri;
104 
109 
114 
118  QString m_fileName;
119 
123  bool m_loaded;
124 
125 };
126 
127 } // Zbl
128 
129 
130 #endif // ZBLRESOURCE_H
const QString & fileName() const
returns the Resource file&#39;s file name
Definition: ZblResource.h:82
QString m_uri
Resource uri.
Definition: ZblResource.h:103
ZblResource(const char *uri, int versionMajor, int versionMinor, const char *fileName)
Definition: ZblResource.cpp:35
int versionMinor() const
returns the Resource file&#39;s minor version number
Definition: ZblResource.h:76
bool isLoaded() const
determines if the resource has already been loaded
Definition: ZblResource.h:89
int m_versionMajor
Resource major version number.
Definition: ZblResource.h:108
int versionMajor() const
returns the Resource file&#39;s major version number
Definition: ZblResource.h:70
int m_versionMinor
Resource minor version number.
Definition: ZblResource.h:113
virtual ~ZblResource()
Definition: ZblResource.cpp:50
Definition: ZAndGate.cpp:6
Represents a binary resource file created by Qt&#39;s resource complier.
Definition: ZblResource.h:45
const QString & uri() const
returns the Resource file&#39;s uri
Definition: ZblResource.h:64
QString m_fileName
Resource file name.
Definition: ZblResource.h:118
bool m_loaded
true if the resource has been loaded, false otherwise
Definition: ZblResource.h:123