include/readerthread.h
author Markus Bröker <mbroeker@largo.homelinux.org>
Tue, 02 Feb 2010 13:20:45 +0100
changeset 7 f23b595e590e
parent 4 fdf04a93faeb
permissions -rw-r--r--
Resize changes on newer qt versions
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
826dd5531eb0 svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff changeset
     1
/*
826dd5531eb0 svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff changeset
     2
 *  $Id: readerthread.h 2 2007-12-22 14:15:30Z mbroeker $
826dd5531eb0 svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff changeset
     3
 * $URL: http://localhost/svn/cpp/qMonitor/trunk/include/readerthread.h $
826dd5531eb0 svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff changeset
     4
 */
826dd5531eb0 svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff changeset
     5
826dd5531eb0 svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff changeset
     6
#ifndef READERTHREAD_H
826dd5531eb0 svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff changeset
     7
#define READERTHREAD_H
826dd5531eb0 svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff changeset
     8
826dd5531eb0 svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff changeset
     9
#include "monitor.h"
826dd5531eb0 svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff changeset
    10
#include <qthread.h>
826dd5531eb0 svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff changeset
    11
#include <qevent.h>
826dd5531eb0 svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff changeset
    12
#include "PacketParser.h"
826dd5531eb0 svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff changeset
    13
826dd5531eb0 svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff changeset
    14
#define MSG_EVENT 65432
826dd5531eb0 svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff changeset
    15
826dd5531eb0 svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff changeset
    16
class Monitor;
826dd5531eb0 svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff changeset
    17
3
724e07a9f155 PacketWriter.cpp: cstdlib header added
Markus Bröker <mbroeker@largo.homelinux.org>
parents: 0
diff changeset
    18
class DataChangeEvent:public QEvent {
724e07a9f155 PacketWriter.cpp: cstdlib header added
Markus Bröker <mbroeker@largo.homelinux.org>
parents: 0
diff changeset
    19
  public:
724e07a9f155 PacketWriter.cpp: cstdlib header added
Markus Bröker <mbroeker@largo.homelinux.org>
parents: 0
diff changeset
    20
    DataChangeEvent (QString msg_)
4
fdf04a93faeb Codebase indented by me and gnu-indent
Markus Bröker <mbroeker@largo.homelinux.org>
parents: 3
diff changeset
    21
    : QEvent ((QEvent::Type) MSG_EVENT) {
3
724e07a9f155 PacketWriter.cpp: cstdlib header added
Markus Bröker <mbroeker@largo.homelinux.org>
parents: 0
diff changeset
    22
        msg = msg_;
0
826dd5531eb0 svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff changeset
    23
4
fdf04a93faeb Codebase indented by me and gnu-indent
Markus Bröker <mbroeker@largo.homelinux.org>
parents: 3
diff changeset
    24
    };
3
724e07a9f155 PacketWriter.cpp: cstdlib header added
Markus Bröker <mbroeker@largo.homelinux.org>
parents: 0
diff changeset
    25
    QString Text () const {
724e07a9f155 PacketWriter.cpp: cstdlib header added
Markus Bröker <mbroeker@largo.homelinux.org>
parents: 0
diff changeset
    26
        return msg;
4
fdf04a93faeb Codebase indented by me and gnu-indent
Markus Bröker <mbroeker@largo.homelinux.org>
parents: 3
diff changeset
    27
    };
3
724e07a9f155 PacketWriter.cpp: cstdlib header added
Markus Bröker <mbroeker@largo.homelinux.org>
parents: 0
diff changeset
    28
  private:
4
fdf04a93faeb Codebase indented by me and gnu-indent
Markus Bröker <mbroeker@largo.homelinux.org>
parents: 3
diff changeset
    29
    QString msg;
0
826dd5531eb0 svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff changeset
    30
};
826dd5531eb0 svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff changeset
    31
3
724e07a9f155 PacketWriter.cpp: cstdlib header added
Markus Bröker <mbroeker@largo.homelinux.org>
parents: 0
diff changeset
    32
class readerThread:public QThread {
724e07a9f155 PacketWriter.cpp: cstdlib header added
Markus Bröker <mbroeker@largo.homelinux.org>
parents: 0
diff changeset
    33
  public:
724e07a9f155 PacketWriter.cpp: cstdlib header added
Markus Bröker <mbroeker@largo.homelinux.org>
parents: 0
diff changeset
    34
    readerThread (Monitor *);
724e07a9f155 PacketWriter.cpp: cstdlib header added
Markus Bröker <mbroeker@largo.homelinux.org>
parents: 0
diff changeset
    35
    virtual void run ();
724e07a9f155 PacketWriter.cpp: cstdlib header added
Markus Bröker <mbroeker@largo.homelinux.org>
parents: 0
diff changeset
    36
  private:
724e07a9f155 PacketWriter.cpp: cstdlib header added
Markus Bröker <mbroeker@largo.homelinux.org>
parents: 0
diff changeset
    37
      Monitor * handle;
0
826dd5531eb0 svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff changeset
    38
};
826dd5531eb0 svn copy of qmonitor
Markus Bröker <mbroeker@largo.homelinux.org>
parents:
diff changeset
    39
#endif