connectionLight.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 1992-2010 VT MAK
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 
00008 
00009 #ifndef connectionLight_H_
00010 #define connectionLight_H_
00011 
00012 #include "lgrGui.h"
00013 
00014 #include <QtGui/QColor>
00015 #include <QtGui/QIcon>
00016 #include <QtGui/QWidget>
00017 
00018 
00019 namespace MAKLogger
00020 {
00021    class DtLgrGuiModel;
00022 
00028    class DT_DLL_LGRGUI DtConnectionLight : public QWidget
00029    {
00030       Q_OBJECT
00031 
00032    public:
00033       DtConnectionLight(DtLgrGuiModel& model,bool drawIcons,QWidget* parent);
00034       virtual ~DtConnectionLight();
00035 
00037       bool connected() const;
00038 
00040       bool activity() const;
00041 
00043       void setActivity(bool active);
00044 
00046       void setConnected(bool connected);
00047 
00048    signals:
00049       void displayConnectionInfo();
00050       void toggleConnection();
00051 
00052    public slots:
00053 
00055       void postModelUpdate(DtLgrGuiModel&);
00056 
00057    protected:
00058       virtual void paintEvent( QPaintEvent * );
00059       virtual void contextMenuEvent(QContextMenuEvent*);
00060       virtual void mouseDoubleClickEvent(QMouseEvent*);
00061 
00062       virtual void drawIcons();
00063       virtual void drawLight();
00064 
00065       bool myConnected;
00066       bool myActivity;
00067 
00068       bool myDrawIcons;
00069 
00070       QIcon myConnectionIcon;
00071 
00072       QColor myDisconnectedColor;
00073       QColor myConnectedColor;
00074       QColor myActiveColor;
00075    };
00076 }
00077 
00078 #endif

Document ID: Generated on Tue Oct 11 19:41:03 EDT 2011 from SVN revision 107422
Copyright © 2005-2011 VT MÄK Inc. All Rights Reserved (www.mak.com)