Rev 440 |
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
/***************************************************************************
* Copyright (C) 2008 by Manuel Schrape *
* manuel.schrape@gmx.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "ToolBox.h"
#include "../libMK/Parser.h"
/**
* specific data for QT
*/
//FIXME: search for something else than sleep
void ToolBox::wait(int Time)
{
#ifndef _WIN32_
usleep(Time);
#else
//TODO: implement sleep for win_32
//(or kick this function completely)
// sleep(Time);
#endif
}
/*
QString ToolBox::get_Float(long Wert, int Count)
{
QString Temp, s_Wert;
s_Wert = QString("%1").arg(Wert);
Temp = s_Wert.left(s_Wert.length() - Count) + QString(".") + s_Wert.right(Count);
return Temp;
}*/
// Datensatz nach QString
QString ToolBox::dataToQString(char data[MAX_DATA_SIZE], int start, int end)
{
return QString(data);
//return QString(Parser::dataToString(data, start, end));
}
// Alle Icons
QIcon ToolBox::Icon(int ID)
{
QIcon Icons[5] ;
Icons[0].addPixmap(QPixmap(QString::fromUtf8(":/LED/Images/16X16/ledred.png")), QIcon::Normal, QIcon::Off);
Icons[1].addPixmap(QPixmap(QString::fromUtf8(":/LED/Images/16X16/ledyellow.png")), QIcon::Normal, QIcon::Off);
Icons[3].addPixmap(QPixmap(QString::fromUtf8(":/LED/Images/16X16/ledyellow.png")), QIcon::Normal, QIcon::Off);
Icons[4].addPixmap(QPixmap(QString::fromUtf8(":/LED/Images/16X16/ledoff.png")), QIcon::Normal, QIcon::Off);
return Icons[ID];
}