Esempio n. 1
0
/*
 QLabel *label;
  QLineEdit *lineEdit;

  bool mMoveing;
  QPoint mMovePosition;
*/
VdtWindow::VdtWindow(QWidget *parent)
 :QWidget(parent)
#ifdef MOUSE_EVENT
 ,mMoveing(false)
 ,mMovePosition(0, 0)
#endif
{
  // init window
  setWindowFlags(Qt::FramelessWindowHint | Qt::WindowMinimizeButtonHint | Qt::WindowStaysOnTopHint);
  // setStyleSheet(tr("QWidget{border:2px solic green;"));
  mainLayout = new QVBoxLayout;
  statusBar = new QStatusBar;
  tabWidget = new QTabWidget;
  
  dateLabel = new QLabel;
  typeLabel = new QLabel;
  msgLabel = new QLabel;

  loginWidget = new VdtLoginWidget;
  queryWidget = new QWidget;
  configWidget = new VdtConfigWidget;
#ifdef VDT_TEST_WIDGET
  testWidget = new VdtTestWidget;
#endif
  msgMtx = zmutex_create();
  tmnConfig = NULL;
  // init vdt terminal and run
  ztrace_reg(ztrace_console, NULL);
  tmn_reg_callback(tmnCallback, (void*)this);
  tmn_init();
  //tmn_run();
  timerId = startTimer(1000);
  now[0] = 0;
}
Esempio n. 2
0
int main(int argc, char **argv){
  int i;
  int j;
  printf("tst_trace server you...\n");
  ztrace_reg(tst_trace, (void*)0);
  zdbg("zdbg(int<%d>)", 11111);
  zmsg("zmdg(double<%f>)", 3.1415926);
  zwar("zwar(string<%s>)", "string test");
  zerr("zerr(<int:%d, dobule:%f, string:%s)",222,3.1415,"string test");
  ZDBG("ZDBG(int<%04d>)",333);
  ZMSG("ZMSG(float<%.2f>", 2.1415);
  ZWAR("ZWAR(int:%d .2f:%.2f, string:%s", 444, 3.156, "test string");
  ZERR("ZERR");
  
  ZERRCX(ZOK);
  ZERRC(ZOK);
  for(i=1; i<=ZE_END; i++){
    j = i | ZEMASK;
    ZERRCX(j);
  }
  return(0);
}