Implemented version lists.
This commit is contained in:
@ -13,9 +13,20 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "include/instversionlist.h"
|
||||
#include "instversionlist.h"
|
||||
#include "instversion.h"
|
||||
|
||||
InstVersionList::InstVersionList() :
|
||||
QObject(NULL)
|
||||
InstVersionList::InstVersionList(QObject *parent) :
|
||||
QObject(parent)
|
||||
{
|
||||
}
|
||||
|
||||
const InstVersion *InstVersionList::findVersion(const QString &descriptor)
|
||||
{
|
||||
for (int i = 0; i < count(); i++)
|
||||
{
|
||||
if (at(i)->descriptor() == descriptor)
|
||||
return at(i);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
@ -37,6 +37,11 @@ int Task::getProgress() const
|
||||
return progress;
|
||||
}
|
||||
|
||||
void Task::calcProgress(int parts, int whole)
|
||||
{
|
||||
setProgress((int)((((float)parts) / ((float)whole))*100)); // Not sure if C++ or LISP...
|
||||
}
|
||||
|
||||
void Task::setProgress(int progress)
|
||||
{
|
||||
this->progress = progress;
|
||||
|
Reference in New Issue
Block a user