fix for Windows, code style
This commit is contained in:
parent
f7e8634ca9
commit
070158cb33
2 changed files with 36 additions and 18 deletions
|
@ -136,14 +136,21 @@ void CLlconServerDlg::OnTimer()
|
|||
// QString().sprintf("%5.2f", vecdSamOffs[i]));
|
||||
|
||||
#ifndef _WIN32
|
||||
vecpListViewItems[i]->setVisible(true);
|
||||
vecpListViewItems[i]->setVisible ( true );
|
||||
#endif
|
||||
}
|
||||
#ifndef _WIN32
|
||||
else
|
||||
vecpListViewItems[i]->setVisible(false);
|
||||
{
|
||||
#ifdef _WIN32
|
||||
/* 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();
|
||||
|
||||
|
|
|
@ -101,15 +101,22 @@ protected:
|
|||
class CMultColLEDListViewItem : public CMultiColorLEDbase
|
||||
{
|
||||
public:
|
||||
CMultColLEDListViewItem(const int iNewCol) : iColumn(iNewCol),
|
||||
pListViewItem(NULL) {}
|
||||
CMultColLEDListViewItem ( const int iNewCol ) : iColumn ( iNewCol ),
|
||||
pListViewItem ( NULL ) {}
|
||||
|
||||
void SetListViewItemPointer(QListViewItem* pNewListViewItem)
|
||||
{pListViewItem = pNewListViewItem;}
|
||||
void SetListViewItemPointer ( QListViewItem* pNewListViewItem )
|
||||
{
|
||||
pListViewItem = pNewListViewItem;
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual void SetPixmap(QPixmap& NewBitmap)
|
||||
{if (pListViewItem != NULL) pListViewItem->setPixmap(iColumn, NewBitmap);}
|
||||
virtual void SetPixmap ( QPixmap& NewBitmap )
|
||||
{
|
||||
if ( pListViewItem != NULL )
|
||||
{
|
||||
pListViewItem->setPixmap ( iColumn, NewBitmap );
|
||||
}
|
||||
}
|
||||
|
||||
QListViewItem* pListViewItem;
|
||||
int iColumn;
|
||||
|
@ -119,15 +126,19 @@ protected:
|
|||
class CServerListViewItem : public QListViewItem
|
||||
{
|
||||
public:
|
||||
CServerListViewItem(QListView* parent) : LED0(1), LED1(2),
|
||||
QListViewItem(parent) {LED0.SetListViewItemPointer(this);
|
||||
LED1.SetListViewItemPointer(this);}
|
||||
|
||||
void SetLight(int iWhichLED, int iNewStatus)
|
||||
CServerListViewItem ( QListView* parent ) : LED0 ( 1 ), LED1 ( 2 ),
|
||||
QListViewItem ( parent )
|
||||
{
|
||||
switch (iWhichLED) {
|
||||
case 0: LED0.SetLight(iNewStatus); break;
|
||||
case 1: LED1.SetLight(iNewStatus); break;
|
||||
LED0.SetListViewItemPointer ( this );
|
||||
LED1.SetListViewItemPointer ( this );
|
||||
}
|
||||
|
||||
void SetLight ( int iWhichLED, int iNewStatus )
|
||||
{
|
||||
switch ( iWhichLED )
|
||||
{
|
||||
case 0: LED0.SetLight ( iNewStatus ); break;
|
||||
case 1: LED1.SetLight ( iNewStatus ); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue