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

@ -139,11 +139,18 @@ void CLlconServerDlg::OnTimer()
vecpListViewItems[i]->setVisible ( true ); vecpListViewItems[i]->setVisible ( true );
#endif #endif
} }
#ifndef _WIN32
else else
{
#ifdef _WIN32
/* remove text for Windows version */
vecpListViewItems[i]->setText(0,"");
vecpListViewItems[i]->setText(3,"");
vecpListViewItems[i]->setText(4,"");
#else
vecpListViewItems[i]->setVisible ( false ); vecpListViewItems[i]->setVisible ( false );
#endif #endif
} }
}
ListViewMutex.unlock(); ListViewMutex.unlock();

View file

@ -105,11 +105,18 @@ public:
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;
@ -120,12 +127,16 @@ 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 0: LED0.SetLight ( iNewStatus ); break;
case 1: LED1.SetLight ( iNewStatus ); break; case 1: LED1.SetLight ( iNewStatus ); break;
} }