00001 //-------------------------------------------------------------------- 00002 // 00003 // File: TxqTextView.h 00004 // 00005 // Purpose: Implementation of a Qt Widget to create a text view window 00006 // for logging output. 00007 // 00008 // Version: $Id: TxqTextView.h,v 1.9 2002/02/08 23:28:26 kgl Exp $ 00009 // 00010 // Copyright (c) 2000 by Tech-X Corporation. All rights reserved. 00011 // 00012 // Author: Kelly G. Luetkemeyer 00013 // 00014 //-------------------------------------------------------------------- 00015 00016 #ifndef TXQ_TEXT_VIEW_H 00017 #define TXQ_TEXT_VIEW_H 00018 00019 // Qt includes 00020 #include <qtextview.h> 00021 00033 class TxqTextView : public QTextView 00034 { 00035 Q_OBJECT 00036 00037 public: 00038 00051 TxqTextView(const QString & text, 00052 const QString & context = QString::null, 00053 QWidget * parent=0, const char * name=0); 00054 00058 virtual ~TxqTextView(); 00059 00064 void outlog(const QString& line); 00065 00070 void setBold(bool b); 00071 00076 void setTextColor(QColor c); 00077 00084 void setLogEnabled(bool b); 00085 00090 void customEvent( QCustomEvent *e ); 00091 00092 protected slots: 00093 00097 void copySelection(bool y); 00098 00099 protected: 00100 00104 void timerEvent(QTimerEvent *t); 00105 00109 void start(); 00110 00114 void stop(); 00115 00119 int timer_id; 00120 00124 QString outLine; 00125 QString cacheLine; 00126 00130 bool outFlag; 00131 00135 int oline; 00136 00140 int cacheNumber; 00141 00145 int lineNumber; 00146 00151 bool boldFlag; 00152 00157 bool colorFlag; 00158 00163 QColor textColor; 00164 00168 bool logFlag; 00169 00173 QString logText; 00174 00175 }; 00176 #endif
Copyright Tech-X Corporation, all rights reserved.