5
* Copyright (C) 2010 David Hubner <hubnerd@ntlworld.com>
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 2 of the License, or
10
* (at your option) any later version.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23
#include "defaultboxwidget.h"
25
DefaultBoxWidget::DefaultBoxWidget()
27
setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Maximum);
28
setObjectName( QLatin1String("OuterFrame" ));
30
m_layout = new QGridLayout(this);
31
m_layout->setAlignment(Qt::AlignTop|Qt::AlignLeft);
32
m_layout->setSpacing(10);
37
void DefaultBoxWidget::createDisplay()
39
m_iconLabel = new QLabel();
40
m_iconLabel->setAlignment(Qt::AlignCenter);
41
m_iconLabel->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
46
m_info0Label = new QLabel();
47
m_info0Label->setFont(bFont);
48
m_info0NameLabel = new QLabel();
50
m_info1Label = new QLabel();
51
m_info1Label->setFont(bFont);
52
m_info1NameLabel = new QLabel();
54
m_info2Label = new QLabel();
55
m_info2Label->setFont(bFont);
56
m_info2NameLabel = new QLabel();
58
m_layout->addWidget(m_iconLabel,1,1,3,1,Qt::AlignCenter);
60
m_layout->addWidget(m_info0Label,1,2,1,1);
61
m_layout->addWidget(m_info0NameLabel,1,3,1,1);
63
m_layout->addWidget(m_info1Label,2,2,1,1);
64
m_layout->addWidget(m_info1NameLabel,2,3,1,1);
66
m_layout->addWidget(m_info2Label,3,2,1,1);
67
m_layout->addWidget(m_info2NameLabel,3,3,1,1);
70
void DefaultBoxWidget::setLabelTitles(const QString &first, const QString &second, const QString &third)
72
m_info0Label->setText(first);
73
m_info1Label->setText(second);
74
m_info2Label->setText(third);
77
void DefaultBoxWidget::setIcon(const KIcon &icon)
79
m_iconLabel->setPixmap(icon.pixmap(64));
82
void DefaultBoxWidget::setLabelOne(const QString &info)
84
m_info0NameLabel->setText(info);
87
void DefaultBoxWidget::setLabelTwo(const QString &info)
89
m_info1NameLabel->setText(info);
92
void DefaultBoxWidget::setLabelThree(const QString &info)
94
m_info2NameLabel->setText(info);