Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

idform.ui.h

Go to the documentation of this file.
00001 /****************************************************************************
00002 ** ui.h extension file, included from the uic-generated form implementation.
00003 **
00004 ** If you wish to add, delete or rename functions or slots use
00005 ** Qt Designer which will update this file, preserving your code. Create an
00006 ** init() function in place of a constructor, and a destroy() function in
00007 ** place of a destructor.
00008 *****************************************************************************/
00009 
00010 #include <qregexp.h>
00011 
00012 enum {
00013         LOGIN,
00014         GROUP,
00015   NAME,
00016   EMAIL,
00017   FORMATION,
00018   REGISTERED,
00019   BIRTHDAY,
00020   KICKNB,
00021   KICKEDNB,
00022   VAR, //on since / last on
00023   HOST,
00024   CLIENT,
00025   CHANNEL,
00026   IDLE,
00027   LOGINNB,
00028   TOTAL,
00029   PLAN
00030     };
00031 
00032 void IdForm::append(const QString& msg) {
00033     QString m(msg);
00034     switch( state++ ) {
00035     case LOGIN:
00036   login_label->setText("<h2>" + m.replace(QRegExp("Login      : "),"") + "</h2>");
00037   plan_edit->clear();
00038         break;
00039     case GROUP:
00040   group_label->setText("<h2>" + m.replace(QRegExp("Group      : "),"") + "</h2>");
00041   break;
00042     case VAR:
00043   if(m.contains("Last on")) {
00044       state = LOGINNB;
00045   }
00046   break;
00047     case NAME:
00048   name_edit->setText("<h3>" + m.replace(QRegExp("Name       : "),"") + "</h3>");
00049   break;
00050     case EMAIL:
00051   email_edit->setText("<h3>" + m.replace(QRegExp("EMail      : "),"") + "</h3>");
00052   break;
00053     case FORMATION:
00054   formation_edit->setText("<h3>" + m.replace(QRegExp("Formation  : "),"") + "</h3>");
00055   break;
00056     case BIRTHDAY:
00057   birthday_edit->setText("<h3>" + m.replace(QRegExp("Birthday   : "),"") + "</h3>");
00058   break;
00059     case PLAN:
00060   if(m.contains("End of finger")) {
00061       state = LOGIN;
00062       repaint();
00063   }
00064   else {
00065       if(!m.contains("Plan       :")) {
00066 //    plan_edit->append(m.replace(QRegExp("^[^\\d]*"),""));
00067     plan_edit->append(m);   
00068       }
00069       state = PLAN;
00070   }
00071   break;
00072     default:
00073         break;
00074     }
00075 }
00076 
00077 void IdForm::init() {
00078     state = LOGIN;
00079 }

Generated on Sat May 10 15:09:26 2003 for qnet by doxygen1.3