Implemented version lists.

This commit is contained in:
Andrew
2013-03-08 13:56:26 -06:00
parent 69040f923b
commit 2d6e785e4e
16 changed files with 955 additions and 28 deletions

View File

@ -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;
}

View File

@ -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;