/*
convbits - gui for manipulating decimal, hexadecimal and binary representation of integers
Copyright (C) 2011 Cedric Boudinet <bouced@gmx.com>
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 3 of the License, or
(at your option) any later version.
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, see <http://www.gnu.org/licenses/>.
*/
#include "convbitsgui.hpp"
#include <stdio.h>
#include <QLabel>
#include "convbits.xpm"
#include "bitrow.hpp"
#include <QIcon>
#include <QPixmap>
convBitsGui::convBitsGui(QWidget *parent)
: QWidget(parent)
{
_grid = new QGridLayout(this);
_grid->addWidget(new QLabel("Decimal :", this), 0, 0);
_grid->addWidget(new QLabel("Hexadecimal :", this), 0, 1);
for(int i=0;i<NB_BITS_SHOW; i++)
{
_grid->addWidget(new QLabel(QString("%1").arg(NB_BITS_SHOW-i-1),this),0,i+2);
}
for(int i=0;i<NB_ROWS_CONV;i++)
{
bitRow * br = new bitRow(this, 1+i);
}
setWindowIcon(QIcon(QPixmap(convbits_xpm)));
}