summaryrefslogtreecommitdiff
path: root/noncore/tools/euroconv/calcdisplay.cpp
Unidiff
Diffstat (limited to 'noncore/tools/euroconv/calcdisplay.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/tools/euroconv/calcdisplay.cpp50
1 files changed, 39 insertions, 11 deletions
diff --git a/noncore/tools/euroconv/calcdisplay.cpp b/noncore/tools/euroconv/calcdisplay.cpp
index 06e5158..1659858 100644
--- a/noncore/tools/euroconv/calcdisplay.cpp
+++ b/noncore/tools/euroconv/calcdisplay.cpp
@@ -17,2 +17,3 @@
17#include <qvbox.h> 17#include <qvbox.h>
18#include <qpixmap.h>
18 19
@@ -26,2 +27,6 @@ LCDDisplay::LCDDisplay( QWidget *parent, const char *name )
26 27
28
29this->setMargin(5);
30this->setSpacing(5);
31
27// Create display 32// Create display
@@ -29,4 +34,11 @@ QVBox *vbxlayout = new QVBox (this);
29 34
30grpbxTop = new QVGroupBox(vbxlayout, "grpbxTop"); 35/*************** Top LCD ***********************/
36grpbxTop = new QHGroupBox(vbxlayout, "grpbxTop");
37grpbxStyle = grpbxTop->frameStyle();
38grpbxTop->setMaximumHeight(48);
39
31cbbxTop = new QComboBox(grpbxTop, "cbbxTop"); 40cbbxTop = new QComboBox(grpbxTop, "cbbxTop");
41cbbxTop->setMaximumWidth(50);
42cbbxTop->insertStrList(aCurrency);
43
32lcdTop = new QLCDNumber(10, grpbxTop, "lcdTop"); 44lcdTop = new QLCDNumber(10, grpbxTop, "lcdTop");
@@ -35,6 +47,13 @@ lcdTop->setSmallDecimalPoint(true);
35lcdTop->setSegmentStyle(QLCDNumber::Flat); 47lcdTop->setSegmentStyle(QLCDNumber::Flat);
36cbbxTop->insertStrList(aCurrency);
37 48
38grpbxBottom = new QVGroupBox(vbxlayout, "grpbxBottom"); 49/************** Bottom LCD ************************/
50grpbxBottom = new QHGroupBox(vbxlayout, "grpbxBottom");
51grpbxBottom->setMaximumHeight(46);
52grpbxBottom->setFrameStyle(0);
53grpbxBottom->setFrameShadow(QFrame::MShadow);
54
39cbbxBottom = new QComboBox(grpbxBottom, "cbbxBottom"); 55cbbxBottom = new QComboBox(grpbxBottom, "cbbxBottom");
56cbbxBottom->setMaximumWidth(50);
57cbbxBottom->insertStrList(aCurrency);
58
40lcdBottom = new QLCDNumber(10, grpbxBottom, "lcdBottom"); 59lcdBottom = new QLCDNumber(10, grpbxBottom, "lcdBottom");
@@ -43,3 +62,2 @@ lcdBottom->setSmallDecimalPoint(true);
43lcdBottom->setSegmentStyle(QLCDNumber::Flat); 62lcdBottom->setSegmentStyle(QLCDNumber::Flat);
44cbbxBottom->insertStrList(aCurrency);
45 63
@@ -49,5 +67,6 @@ connect(cbbxBottom, SIGNAL(activated(int)), this, SLOT(cbbxChange()));
49 67
50btnSwap = new QPushButton("S",this, "swap"); 68btnSwap = new QPushButton(this, "swap");
51btnSwap->setMaximumSize(20,50); 69QPixmap imgSwap((const char**) swap_xpm);
52btnSwap->setMinimumSize(20,50); 70btnSwap->setPixmap(imgSwap);
71btnSwap->setFixedSize(20,40);
53// set signal 72// set signal
@@ -58,4 +77,2 @@ iCurrentLCD = 0;
58 77
59//setValue(123.456);
60
61} 78}
@@ -115,4 +132,8 @@ double dCurrentValue;
115if(!iCurrentLCD){ 132if(!iCurrentLCD){
133 // iCurrentLCD = 0, lcdTop has current focus and is going to loose
134 // it
116 dCurrentValue = lcdTop->value(); 135 dCurrentValue = lcdTop->value();
117 iCurrentLCD = 1; 136 iCurrentLCD = 1;
137 grpbxTop->setFrameStyle(0);
138 grpbxBottom->setFrameStyle(grpbxStyle);
118}else{ 139}else{
@@ -120,2 +141,4 @@ if(!iCurrentLCD){
120 iCurrentLCD = 0; 141 iCurrentLCD = 0;
142 grpbxTop->setFrameStyle(grpbxStyle);
143 grpbxBottom->setFrameStyle(0);
121} 144}
@@ -132,4 +155,2 @@ double dCurrentValue;
132 155
133printf("combo changes...\n");
134
135// get current value 156// get current value
@@ -163,2 +184,5 @@ switch (iIndex){
163 break; 184 break;
185
186 default:
187 return 0;
164}//switch (iIndex) 188}//switch (iIndex)
@@ -187,2 +211,6 @@ switch (iIndex){
187}//switch (iIndex) 211}//switch (iIndex)
212
213// we shouldn't come here
214return 0;
215
188}// fct x2Euro 216}// fct x2Euro