]> Shamusworld >> Repos - architektonas/blob - src/forms/selectionwidget.cpp
e177d9d9240495fcc8ee5afffcff75b87af828d7
[architektonas] / src / forms / selectionwidget.cpp
1 // selectionwidget.cpp
2 //
3 // Part of the Architektonas Project
4 // Originally part of QCad Community Edition by Andrew Mustun
5 // Extensively rewritten and refactored by James L. Hammons
6 // (C) 2010 Underground Software
7 //
8 // JLH = James L. Hammons <jlhamm@acm.org>
9 //
10 // Who  When        What
11 // ---  ----------  -----------------------------------------------------------
12 // JLH  05/12/2010  Created this file. :-)
13 //
14
15 #include "selectionwidget.h"
16
17 #include "settings.h"
18
19 SelectionWidget::SelectionWidget(QWidget * parent/*= 0*/, Qt::WindowFlags flags/*= 0*/):
20         QWidget(parent, flags)
21 {
22         ui.setupUi(this);
23
24         ui.lEntities->setText("0");
25
26         int fsize;
27 #ifdef __APPLE__
28         fsize = 9;
29 #else
30         fsize = 7;
31 #endif
32
33         settings.beginGroup("Appearance");
34         fsize = settings.value("StatusBarFontSize", fsize).toInt();
35         settings.endGroup();
36
37         ui.lEntities->setFont(QFont("Helvetica", fsize));
38         ui.lLabel->setFont(QFont("Helvetica", fsize));
39 }
40
41 SelectionWidget::~SelectionWidget()
42 {
43 }
44
45 void SelectionWidget::setNumber(int n)
46 {
47         QString str;
48         str.setNum(n);
49         ui.lEntities->setText(str);
50 }