src/job_editor_widget/jobtextedit.h

Go to the documentation of this file.
00001 #ifndef JOBTEXTEDIT_H
00002 #define JOBTEXTEDIT_H
00003 
00004 
00011 #include <QTextEdit>
00012 #include "highlighter.h"
00013 
00014 class JobTextEditProperty;
00015 
00019 class JobTextEdit : public QTextEdit
00020 {
00021     Q_OBJECT
00022 
00023 public:
00024     JobTextEditProperty * outPty; // -o
00025     JobTextEditProperty * errPty; // -e
00026     JobTextEditProperty * joinPty; // -j
00027     JobTextEditProperty * mailPty; // -M; TODO: -m?
00028     JobTextEditProperty * namePty; // -N
00029     JobTextEditProperty * walltimePty; // -l walltime
00030     JobTextEditProperty * nodesPty; // -l nodes
00031     JobTextEditProperty * nicePty; // -l nice
00032     JobTextEditProperty * cputPty; // -l cput
00033     JobTextEditProperty * pcputPty; // -l pcput
00034     JobTextEditProperty * filePty; // -l file
00035     JobTextEditProperty * memPty; // -l mem
00036     JobTextEditProperty * pmemPty; // -l pmem
00037     JobTextEditProperty * vmemPty; // -l vmem
00038     JobTextEditProperty * pvmemPty; // -l pvmem    
00039     JobTextEditProperty * archPty; // -l arch
00040     JobTextEditProperty * hostPty; // -l host
00041     JobTextEditProperty * otherPty; // -l other
00042     JobTextEditProperty * opsysPty; // -l opsys
00043     JobTextEditProperty * softwarePty; // -l software
00044 
00045     JobTextEdit(QWidget *parent = 0);
00046     ~JobTextEdit();
00047 
00048 private:
00049     Highlighter * highlighter;
00050 private slots:
00051     void onTextChanged();
00052 };
00053 
00057 class JobTextEditProperty : public QObject
00058 {
00059     Q_OBJECT
00060 
00061 public:
00062     JobTextEditProperty() {}
00063     JobTextEditProperty(QString name,
00064                         QString opt,
00065                         QString rxPattern,
00066                         JobTextEdit * jte);
00067     void checkForPropertyChanged();
00068 public slots:
00069     void setProperty(const QString & pty);
00070 signals:
00076     void propertyChanged(const QString & pty);
00077 
00078 private:
00079     void addPBSProperty(const QString & str);
00080     QString _value;
00081     QString _name;
00082     QString _opt;
00083     QRegExp _rx;
00084     JobTextEdit * _jte;
00085 };
00086 
00087 #endif // JOBTEXTEDIT_H

Generated on Mon Mar 16 18:46:05 2009 for QCJM by  doxygen 1.5.4