fix for Windows, code style

This commit is contained in:
Volker Fischer 2006-02-22 17:48:25 +00:00
parent f7e8634ca9
commit 070158cb33
2 changed files with 36 additions and 18 deletions

View file

@ -136,13 +136,20 @@ void CLlconServerDlg::OnTimer()
// QString().sprintf("%5.2f", vecdSamOffs[i])); // QString().sprintf("%5.2f", vecdSamOffs[i]));
#ifndef _WIN32 #ifndef _WIN32
vecpListViewItems[i]->setVisible(true); vecpListViewItems[i]->setVisible ( true );
#endif #endif
} }
#ifndef _WIN32 else
else {
vecpListViewItems[i]->setVisible(false); #ifdef _WIN32
#endif /* remove text for Windows version */
vecpListViewItems[i]->setText(0,"");
vecpListViewItems[i]->setText(3,"");
vecpListViewItems[i]->setText(4,"");
#else
vecpListViewItems[i]->setVisible ( false );
#endif
}
} }
ListViewMutex.unlock(); ListViewMutex.unlock();

View file

@ -101,15 +101,22 @@ protected:
class CMultColLEDListViewItem : public CMultiColorLEDbase class CMultColLEDListViewItem : public CMultiColorLEDbase
{ {
public: public:
CMultColLEDListViewItem(const int iNewCol) : iColumn(iNewCol), CMultColLEDListViewItem ( const int iNewCol ) : iColumn ( iNewCol ),
pListViewItem(NULL) {} pListViewItem ( NULL ) {}
void SetListViewItemPointer(QListViewItem* pNewListViewItem) void SetListViewItemPointer ( QListViewItem* pNewListViewItem )
{pListViewItem = pNewListViewItem;} {
pListViewItem = pNewListViewItem;
}
protected: protected:
virtual void SetPixmap(QPixmap& NewBitmap) virtual void SetPixmap ( QPixmap& NewBitmap )
{if (pListViewItem != NULL) pListViewItem->setPixmap(iColumn, NewBitmap);} {
if ( pListViewItem != NULL )
{
pListViewItem->setPixmap ( iColumn, NewBitmap );
}
}
QListViewItem* pListViewItem; QListViewItem* pListViewItem;
int iColumn; int iColumn;
@ -119,15 +126,19 @@ protected:
class CServerListViewItem : public QListViewItem class CServerListViewItem : public QListViewItem
{ {
public: public:
CServerListViewItem(QListView* parent) : LED0(1), LED1(2), CServerListViewItem ( QListView* parent ) : LED0 ( 1 ), LED1 ( 2 ),
QListViewItem(parent) {LED0.SetListViewItemPointer(this); QListViewItem ( parent )
LED1.SetListViewItemPointer(this);} {
LED0.SetListViewItemPointer ( this );
LED1.SetListViewItemPointer ( this );
}
void SetLight(int iWhichLED, int iNewStatus) void SetLight ( int iWhichLED, int iNewStatus )
{ {
switch (iWhichLED) { switch ( iWhichLED )
case 0: LED0.SetLight(iNewStatus); break; {
case 1: LED1.SetLight(iNewStatus); break; case 0: LED0.SetLight ( iNewStatus ); break;
case 1: LED1.SetLight ( iNewStatus ); break;
} }
} }