예제 #1
0
파일: mask1.cpp 프로젝트: 376473984/pvb
static int generated_defineMask(PARAM *p)
{
  int w,h,depth;

  if(p == NULL) return 1;
  w = h = depth = strcmp(toolTip[0],whatsThis[0]);
  if(w==h) depth=0; // fool the compiler
  pvStartDefinition(p,ID_END_OF_WIDGETS);

  pvQLabel(p,obj1,0);
  pvSetGeometry(p,obj1,20,25,310,30);
  pvSetText(p,obj1,"rlDataAcquisition Test");

  pvQLabel(p,obj2,0);
  pvSetGeometry(p,obj2,20,55,430,30);
  pvSetText(p,obj2,"test/int1");
  pvToolTip(p,obj2,"test/int1");

  pvQLabel(p,obj3,0);
  pvSetGeometry(p,obj3,20,85,435,30);
  pvSetText(p,obj3,"test/int2");
  pvToolTip(p,obj3,"test/int2");

  pvQPushButton(p,buttonHello,0);
  pvSetGeometry(p,buttonHello,20,120,100,30);
  pvSetText(p,buttonHello,"Hello World");


  pvEndDefinition(p);
  return 0;
}
예제 #2
0
파일: mask1.cpp 프로젝트: liuxiaohao/pvb
static int generated_defineMask(PARAM *p)
{
  int w,h,depth;

  if(p == NULL) return 1;
  w = h = depth = strcmp(toolTip[0],whatsThis[0]);
  if(w==h) depth=0; // fool the compiler
  pvStartDefinition(p,ID_END_OF_WIDGETS);

  pvQIconView(p,iconView1,0);
  pvSetGeometry(p,iconView1,20,85,665,515);

  pvQLabel(p,welcomeLabel,0);
  pvSetGeometry(p,welcomeLabel,20,10,500,25);
  pvSetText(p,welcomeLabel,"Welcome to pvbrowser pvsexample");
  pvSetFont(p,welcomeLabel,"Sans Serif",18,1,1,0,0);

  pvQLabel(p,helpLabel,0);
  pvSetGeometry(p,helpLabel,20,40,265,30);
  pvSetText(p,helpLabel,"Click on icon to see further masks ...");

  pvQLayoutVbox(p,ID_MAIN_WIDGET,-1);

  pvAddWidgetOrLayout(p,ID_MAIN_WIDGET,welcomeLabel,-1,-1);
  pvAddWidgetOrLayout(p,ID_MAIN_WIDGET,helpLabel,-1,-1);
  pvAddWidgetOrLayout(p,ID_MAIN_WIDGET,iconView1,-1,-1);

  pvEndDefinition(p);
  return 0;
}
예제 #3
0
파일: mask1.cpp 프로젝트: arhunn/pvbaddon
static int generated_defineMask(PARAM *p)
{
  int w,h,depth;

  if(p == NULL) return 1;
  w = h = depth = strcmp(toolTip[0],whatsThis[0]);
  if(widgetType[0] == -1) return 1;
  if(w==h) depth=0; // fool the compiler
  pvStartDefinition(p,ID_END_OF_WIDGETS);

  pvQDraw(p,svga,0);
  pvSetGeometry(p,svga,1,1,420,400);
  pvSetFont(p,svga,"Sans Serif",10,0,0,0,0);
  pvSetWhatsThis(p,svga,pvtr("Anlage.svg"));

  pvQDraw(p,svgs,0);
  pvSetGeometry(p,svgs,420,1,410,400);
  pvSetFont(p,svgs,"Sans Serif",10,0,0,0,0);
  pvSetWhatsThis(p,svgs,pvtr("statemachine.svg"));

  pvDownloadFile(p,"en.png");
  pvQImage(p,en,svgs,"en.png",&w,&h,&depth);
  pvSetGeometry(p,en,365,5,20,15);
  pvSetFont(p,en,"Sans Serif",10,0,0,0,0);
  pvSetWhatsThis(p,en,pvtr("en.png"));

  pvDownloadFile(p,"de.png");
  pvQImage(p,de,svgs,"de.png",&w,&h,&depth);
  pvSetGeometry(p,de,385,5,20,15);
  pvSetFont(p,de,"Sans Serif",10,0,0,0,0);
  pvSetWhatsThis(p,de,pvtr("de.png"));

  pvQwtPlotWidget(p,plot,0,10,1000);
  pvSetGeometry(p,plot,0,400,830,185);
  qpwSetCanvasBackground(p,plot,213,209,207);
  qpwEnableAxis(p,plot,yLeft);
  qpwEnableAxis(p,plot,xBottom);

  pvQSlider(p,slider1,0,0,100,1,0,Vertical);
  pvSetGeometry(p,slider1,905,120,30,285);
  pvSetFont(p,slider1,"Sans Serif",10,0,0,0,0);

  pvQSlider(p,slider2,0,0,100,1,0,Vertical);
  pvSetGeometry(p,slider2,980,125,30,280);
  pvSetFont(p,slider2,"Sans Serif",10,0,0,0,0);

  pvQSlider(p,slider3,0,0,100,1,0,Vertical);
  pvSetGeometry(p,slider3,1035,125,30,280);
  pvSetFont(p,slider3,"Sans Serif",10,0,0,0,0);


  pvEndDefinition(p);
  return 0;
}
예제 #4
0
static int generated_defineMask(PARAM *p)
{
    int w,h,depth;

    if(p == NULL) return 1;
    w = h = depth = strcmp(toolTip[0],whatsThis[0]);
    if(widgetType[0] == -1) return 1;
    if(w==h) depth=0; // fool the compiler
    pvStartDefinition(p,ID_END_OF_WIDGETS);

    pvQGroupBox(p,obj2,0,-1,HORIZONTAL,"Event Log");
    pvSetGeometry(p,obj2,310,45,120,130);

    pvQPushButton(p,buttonViewEventLog,obj2);
    pvSetGeometry(p,buttonViewEventLog,10,20,100,30);
    pvSetText(p,buttonViewEventLog,"View");

    pvQGroupBox(p,obj3,0,-1,HORIZONTAL,"Process List");
    pvSetGeometry(p,obj3,5,45,300,130);

    pvQPushButton(p,buttonView,obj3);
    pvSetGeometry(p,buttonView,185,20,100,30);
    pvSetText(p,buttonView,"View");

    pvQPushButton(p,buttonLogin,obj3);
    pvSetGeometry(p,buttonLogin,185,55,100,30);
    pvSetText(p,buttonLogin,"Login");

    pvQPushButton(p,buttonChange,obj3);
    pvSetGeometry(p,buttonChange,185,90,100,30);
    pvSetText(p,buttonChange,"Change Pass");

    pvQLineEdit(p,editPass,obj3);
    pvSetGeometry(p,editPass,80,55,100,30);

    pvQLabel(p,obj8,obj3);
    pvSetGeometry(p,obj8,10,55,70,30);
    pvSetText(p,obj8,"Password:"******"pcontrol - Control your processes and view event logs");
    pvSetFont(p,obj9,"Sans Serif",12,1,0,0,0);


    pvEndDefinition(p);
    return 0;
}
예제 #5
0
파일: mask1.cpp 프로젝트: arhunn/pvbaddon
static int generated_defineMask(PARAM *p)
{
  int w,h,depth;

  if(p == NULL) return 1;
  w = h = depth = strcmp(toolTip[0],whatsThis[0]);
  if(w==h) depth=0; // fool the compiler
  pvStartDefinition(p,ID_END_OF_WIDGETS);

  pvQLabel(p,output,0);
  pvSetGeometry(p,output,10,10,685,35);
  pvSetText(p,output,"Output:");

  pvQSpinBox(p,spinBit,0,0,100,1);
  pvSetGeometry(p,spinBit,130,60,100,30);

  pvQSpinBox(p,spinByte,0,0,100,1);
  pvSetGeometry(p,spinByte,130,95,100,30);

  pvQSpinBox(p,spinInt,0,0,100,1);
  pvSetGeometry(p,spinInt,130,130,100,30);

  pvQSpinBox(p,spinFloat,0,0,100,1);
  pvSetGeometry(p,spinFloat,130,165,100,30);

  pvQLabel(p,obj1,0);
  pvSetGeometry(p,obj1,10,60,100,30);
  pvSetText(p,obj1,"Bit");

  pvQLabel(p,obj2,0);
  pvSetGeometry(p,obj2,10,95,100,30);
  pvSetText(p,obj2,"Byte");

  pvQLabel(p,obj3,0);
  pvSetGeometry(p,obj3,10,130,100,30);
  pvSetText(p,obj3,"Int");

  pvQLabel(p,obj4,0);
  pvSetGeometry(p,obj4,10,165,100,30);
  pvSetText(p,obj4,"Float");


  pvEndDefinition(p);
  return 0;
}
예제 #6
0
파일: mask9.cpp 프로젝트: arhunn/pvbaddon
static int generated_defineMask(PARAM *p)
{
  int w,h,depth;

  if(p == NULL) return 1;
  w = h = depth = strcmp(toolTip[0],whatsThis[0]);
  if(w==h) depth=0; // fool the compiler
  pvStartDefinition(p,ID_END_OF_WIDGETS);

  pvQPushButton(p,back,0);
  pvSetGeometry(p,back,15,10,100,30);
  pvSetText(p,back,"&Back");

  pvQListView(p,listView1,0);
  pvSetGeometry(p,listView1,15,60,525,710);
  pvSetMultiSelection(p,listView1,0);

  pvQListBox(p,listBox1,0);
  pvSetGeometry(p,listBox1,550,60,350,710);
  pvSetMultiSelection(p,listBox1,0);
  pvSetMaxSize(p,listBox1,350,99999);

  pvQLayoutVbox(p,ID_MAIN_WIDGET,-1);

  pvQLayoutHbox(p,layout1,ID_MAIN_WIDGET);

  pvQLayoutHbox(p,layout2,ID_MAIN_WIDGET);

  pvAddWidgetOrLayout(p,layout1,back,-1,-1);
  pvAddStretch(p,layout1,1);
  pvAddWidgetOrLayout(p,layout2,listView1,-1,-1);
  pvAddWidgetOrLayout(p,layout2,listBox1,-1,-1);
  pvAddWidgetOrLayout(p,ID_MAIN_WIDGET,layout1,-1,-1);
  pvAddWidgetOrLayout(p,ID_MAIN_WIDGET,layout2,-1,-1);

  pvEndDefinition(p);
  return 0;
}
예제 #7
0
파일: mask1.cpp 프로젝트: arhunn/pvbaddon
static int generated_defineMask(PARAM *p)
{
  int w,h,depth;

  if(p == NULL) return 1;
  w = h = depth = strcmp(toolTip[0],whatsThis[0]);
  if(widgetType[0] == -1) return 1;
  if(w==h) depth=0; // fool the compiler
  pvStartDefinition(p,ID_END_OF_WIDGETS);

  pvQTextBrowser(p,htmlBottom,0);
  pvSetGeometry(p,htmlBottom,5,60,955,460);
  pvSetFont(p,htmlBottom,"Sans Serif",10,0,0,0,0);

  pvQPushButton(p,buttonSearch,0);
  pvSetGeometry(p,buttonSearch,475,15,100,30);
  pvSetText(p,buttonSearch,"Search");
  pvSetFont(p,buttonSearch,"Sans Serif",10,0,0,0,0);

  pvQLineEdit(p,lineEditSearch,0);
  pvSetGeometry(p,lineEditSearch,230,15,225,30);
  pvSetFont(p,lineEditSearch,"Sans Serif",10,0,0,0,0);

  pvQLayoutHbox(p,ID_MAIN_WIDGET,-1);

  pvQLayoutVbox(p,layout1,ID_MAIN_WIDGET);

  pvQLayoutHbox(p,layout2,layout1);

  pvAddWidgetOrLayout(p,ID_MAIN_WIDGET,layout1,-1,-1);
  pvAddWidgetOrLayout(p,layout1,layout2,-1,-1);
  pvAddWidgetOrLayout(p,layout1,htmlBottom,-1,-1);
  pvAddWidgetOrLayout(p,layout2,lineEditSearch,-1,-1);
  pvAddWidgetOrLayout(p,layout2,buttonSearch,-1,-1);

  pvEndDefinition(p);
  return 0;
}
예제 #8
0
파일: Mask2.cpp 프로젝트: 376473984/pvb
static int defineMask(PARAM *p)
{
    int x,y,w,h,depth;

    pvStartDefinition(p,ID_END_OF_WIDGETS);

    // define buttons
    pvQPushButton(p,ID_BUTTON_MASK1,0);
    pvQPushButton(p,ID_BUTTON_MASK2,0);
    pvQPushButton(p,ID_BUTTON_MASK3,0);
    x = 0;
    y = 0;
    pvSetGeometry(p,ID_BUTTON_MASK1,x,y,100,30);
    x = 0;
    y += 30;
    pvSetGeometry(p,ID_BUTTON_MASK2,x,y,100,30);
    x = 0;
    y += 30;
    pvSetGeometry(p,ID_BUTTON_MASK3,x,y,100,30);
    pvSetText(p,ID_BUTTON_MASK1,"Show Mask1");
    pvSetText(p,ID_BUTTON_MASK2,"Show Mask2");
    pvSetText(p,ID_BUTTON_MASK3,"Show Mask3");

    x = 0;
    y += 30;
    pvQLabel(p,ID_LABEL,0);
    pvSetGeometry(p,ID_LABEL,x,y,100,30);
    pvSetText(p,ID_LABEL,"This is mask 2");

    pvQImage(p,ID_IMAGE,0,"caster.bmp", &w, &h, &depth);
    pvSetGeometry(p,ID_IMAGE,100,0,w,h);

    x = 100+w;
    pvQLabel(p,ID_TEMP,0);
    pvSetGeometry(p,ID_TEMP,x,0,100,20);
    pvSetBackgroundColor(p,ID_TEMP,RED);

    pvQLabel(p,ID_LABEL_ON_IMAGE,ID_IMAGE);
    pvSetGeometry(p,ID_LABEL_ON_IMAGE,350,400,60,30);

    pvQPushButton(p,ID_BUTTON_ON_IMAGE,ID_IMAGE);
    pvSetGeometry(p,ID_BUTTON_ON_IMAGE,350,430,60,30);
    pvSetText(p,ID_BUTTON_ON_IMAGE,"Button");

    pvEndDefinition(p);
    return 0;
}
예제 #9
0
파일: mask1.cpp 프로젝트: arhunn/pvbaddon
static int generated_defineMask(PARAM *p)
{
  int w,h,depth;

  if(p == NULL) return 1;
  w = h = depth = strcmp(toolTip[0],whatsThis[0]);
  if(widgetType[0] == -1) return 1;
  if(w==h) depth=0; // fool the compiler
  pvStartDefinition(p,ID_END_OF_WIDGETS);

  pvQPushButton(p,button,0);
  pvSetGeometry(p,button,15,20,100,30);
  pvSetText(p,button,pvtr("Click me"));
  pvSetFont(p,button,"Sans Serif",10,0,0,0,0);
  pvToolTip(p,button,pvtr("a tool tip"));
  pvSetWhatsThis(p,button,pvtr("a\\nwhats\\nthis"));

  pvQLabel(p,label,0);
  pvSetGeometry(p,label,140,20,100,30);
  pvSetText(p,label,pvtr("Label"));
  pvSetFont(p,label,"Sans Serif",10,0,0,0,0);

  pvQPushButton(p,english,0);
  pvSetGeometry(p,english,15,70,100,30);
  pvSetText(p,english,pvtr("English"));
  pvSetFont(p,english,"Sans Serif",10,0,0,0,0);

  pvQPushButton(p,german,0);
  pvSetGeometry(p,german,15,100,100,30);
  pvSetText(p,german,pvtr("German"));
  pvSetFont(p,german,"Sans Serif",10,0,0,0,0);


  pvEndDefinition(p);
  return 0;
}
예제 #10
0
파일: mask4.cpp 프로젝트: arhunn/pvbaddon
static int generated_defineMask(PARAM *p)
{
  int w,h,depth;

  if(p == NULL) return 1;
  w = h = depth = strcmp(toolTip[0],whatsThis[0]);
  if(w==h) depth=0; // fool the compiler
  pvStartDefinition(p,ID_END_OF_WIDGETS);

  pvQLabel(p,obj1,0);
  pvSetGeometry(p,obj1,10,45,445,35);
  pvSetText(p,obj1,"Modal dialogs are the same as normal masks.");

  pvQPushButton(p,back,0);
  pvSetGeometry(p,back,10,10,100,30);
  pvSetText(p,back,"&Close");

  pvQSpinBox(p,spinBox1,0,0,100,1);
  pvSetGeometry(p,spinBox1,225,15,65,30);


  pvEndDefinition(p);
  return 0;
}
예제 #11
0
파일: mask1.cpp 프로젝트: arhunn/pvbaddon
static int generated_defineMask(PARAM *p)
{
  int w,h,depth;

  if(p == NULL) return 1;
  w = h = depth = strcmp(toolTip[0],whatsThis[0]);
  if(widgetType[0] == -1) return 1;
  if(w==h) depth=0; // fool the compiler
  pvStartDefinition(p,ID_END_OF_WIDGETS);

  pvQTable(p,obj1,0,2,2);
  pvSetGeometry(p,obj1,15,15,950,605);


  pvEndDefinition(p);
  return 0;
}
예제 #12
0
파일: mask5.cpp 프로젝트: arhunn/pvbaddon
static int generated_defineMask(PARAM *p)
{
  int w,h,depth;

  if(p == NULL) return 1;
  w = h = depth = strcmp(toolTip[0],whatsThis[0]);
  if(widgetType[0] == -1) return 1;
  if(w==h) depth=0; // fool the compiler
  pvStartDefinition(p,ID_END_OF_WIDGETS);

  pvQPushButton(p,buttonCancel,0);
  pvSetGeometry(p,buttonCancel,95,110,100,30);
  pvSetText(p,buttonCancel,"Cancel");

  pvQLabel(p,obj2,0);
  pvSetGeometry(p,obj2,10,10,130,30);
  pvSetText(p,obj2,"Old password");

  pvQLabel(p,obj4,0);
  pvSetGeometry(p,obj4,10,70,125,30);
  pvSetText(p,obj4,"Verify new password");

  pvQLabel(p,obj5,0);
  pvSetGeometry(p,obj5,10,40,120,30);
  pvSetText(p,obj5,"New Password");

  pvQPushButton(p,buttonOk,0);
  pvSetGeometry(p,buttonOk,200,110,100,30);
  pvSetText(p,buttonOk,"Ok");

  pvQLineEdit(p,editOld,0);
  pvSetGeometry(p,editOld,135,15,165,30);

  pvQLineEdit(p,editNew,0);
  pvSetGeometry(p,editNew,135,45,165,30);

  pvQLineEdit(p,editVerify,0);
  pvSetGeometry(p,editVerify,135,75,165,30);


  pvEndDefinition(p);
  return 0;
}
예제 #13
0
파일: mask1.cpp 프로젝트: arhunn/pvbaddon
static int generated_defineMask(PARAM *p)
{
  int w,h,depth;

  if(p == NULL) return 1;
  w = h = depth = strcmp(toolTip[0],whatsThis[0]);
  if(widgetType[0] == -1) return 1;
  if(w==h) depth=0; // fool the compiler
  pvStartDefinition(p,ID_END_OF_WIDGETS);

  pvQPushButton(p,obj1,0);
  pvSetGeometry(p,obj1,30,40,100,30);
  pvSetText(p,obj1,"PushButton");


  pvEndDefinition(p);
  return 0;
}
예제 #14
0
파일: mask1.cpp 프로젝트: arhunn/pvbaddon
static int generated_defineMask(PARAM *p)
{
  int w,h,depth;

  if(p == NULL) return 1;
  w = h = depth = strcmp(toolTip[0],whatsThis[0]);
  if(w==h) depth=0; // fool the compiler
  pvStartDefinition(p,ID_END_OF_WIDGETS);

  pvQPushButton(p,buttonTest,0);
  pvSetGeometry(p,buttonTest,300,60,100,30);
  pvSetText(p,buttonTest,"PushButton");
  pvToolTip(p,buttonTest,"/0/1/000");

  pvQLabel(p,obj2,0);
  pvSetGeometry(p,obj2,15,5,210,45);
  pvSetText(p,obj2,"EIBnet/IP Test");
  pvSetFont(p,obj2,"Sans Serif",16,0,0,0,0);

  pvQLabel(p,label1,0);
  pvSetGeometry(p,label1,300,100,100,30);
  pvSetText(p,label1,"0");
  pvSetFont(p,label1,"Sans Serif",16,0,0,0,0);
  pvToolTip(p,label1,"/0/1/000");

  pvQLCDNumber(p,lcd1,0,3,Outline,Hex);
  pvSetGeometry(p,lcd1,300,135,100,30);
  pvToolTip(p,lcd1,"/0/1/000");

  pvDownloadFile(p,"etage.png");
  pvQImage(p,obj3,0,"etage.png",&w,&h,&depth);
  pvSetGeometry(p,obj3,15,60,275,330);

  pvQPushButton(p,obj4,obj3);
  pvSetGeometry(p,obj4,85,120,25,25);
  pvToolTip(p,obj4,"/0/1/000");

  pvQPushButton(p,obj5,0);
  pvSetGeometry(p,obj5,300,185,100,30);
  pvSetText(p,obj5,"Reset");
  pvToolTip(p,obj5,"test.csv");


  pvEndDefinition(p);
  return 0;
}
예제 #15
0
파일: mask1.cpp 프로젝트: arhunn/pvbaddon
static int generated_defineMask(PARAM *p)
{
  int w,h,depth;

  if(p == NULL) return 1;
  if(widgetName[0] == NULL) return 1; // suppress unused warning
  w = h = depth = strcmp(toolTip[0],whatsThis[0]);
  if(widgetType[0] == -1) return 1;
  if(w==h) depth=0; // fool the compiler
  pvStartDefinition(p,ID_END_OF_WIDGETS);

  pvDownloadFile(p,"beeyard.jpg");
  pvQImage(p,obj1,0,"beeyard.jpg",&w,&h,&depth);
  pvSetGeometry(p,obj1,0,0,700,545);
  pvSetWhatsThis(p,obj1,pvtr("beeyard.jpg"));

  pvQTextBrowser(p,textBrowser,obj1);
  pvSetGeometry(p,textBrowser,5,5,265,330);
  pvSetFont(p,textBrowser,"Sans Serif",10,0,0,0,0);

  pvQLabel(p,label1,textBrowser);
  pvSetGeometry(p,label1,10,280,245,30);
  pvSetText(p,label1,pvtr("Label"));
  pvSetFont(p,label1,"Sans Serif",10,0,0,0,0);

  pvQDraw(p,svgCal,obj1);
  pvSetGeometry(p,svgCal,315,10,305,410);
  pvSetFont(p,svgCal,"Sans Serif",10,0,0,0,0);
  pvSetWhatsThis(p,svgCal,pvtr("calendar.svg"));

  pvQPushButton(p,pbRedraw,0);
  pvSetGeometry(p,pbRedraw,705,5,100,30);
  pvSetText(p,pbRedraw,pvtr("Redraw"));
  pvSetFont(p,pbRedraw,"Sans Serif",10,0,0,0,0);

  pvQTextBrowser(p,htmlTest,0);
  pvSetGeometry(p,htmlTest,1,510,640,320);
  pvSetFont(p,htmlTest,"Sans Serif",10,0,0,0,0);


  pvEndDefinition(p);
  return 0;
}
예제 #16
0
파일: mask3.cpp 프로젝트: 376473984/pvb
static int generated_defineMask(PARAM *p)
{
  int w,h,depth;

  if(p == NULL) return 1;
  w = h = depth = strcmp(toolTip[0],whatsThis[0]);
  if(w==h) depth=0; // fool the compiler
  pvStartDefinition(p,ID_END_OF_WIDGETS);

  pvQPushButton(p,back,0);
  pvSetGeometry(p,back,15,10,100,30);
  pvSetText(p,back,"Back");

  pvQTabWidget(p,ID_TAB_DIALOG,0);
  pvSetGeometry(p,ID_TAB_DIALOG,15,50,1185,725);

  pvQWidget(p,ID_TAB_01,ID_TAB_DIALOG);
  pvAddTab(p,ID_TAB_DIALOG,ID_TAB_01,"Tab1");

  pvQButtonGroup(p,groupBtn1,ID_TAB_01,-1,HORIZONTAL,"Display");
  pvSetGeometry(p,groupBtn1,870,40,140,105);

  pvQRadioButton(p,radioButton1,groupBtn1);
  pvSetGeometry(p,radioButton1,10,20,115,21);
  pvSetText(p,radioButton1,"Sinus");

  pvQRadioButton(p,radioButton2,groupBtn1);
  pvSetGeometry(p,radioButton2,10,45,115,21);
  pvSetText(p,radioButton2,"Cosinus");

  pvQRadioButton(p,radioButton3,groupBtn1);
  pvSetGeometry(p,radioButton3,10,70,115,21);
  pvSetText(p,radioButton3,"Both");
  pvSetChecked(p,radioButton3,1);

  pvQProgressBar(p,progressBar1,ID_TAB_01,100);
  pvSetGeometry(p,progressBar1,870,190,140,24);

  pvQCheckBox(p,checkBox1,ID_TAB_01);
  pvSetGeometry(p,checkBox1,870,10,140,21);
  pvSetText(p,checkBox1,"Pause");

  pvQLCDNumber(p,lCDNumber1,ID_TAB_01,3,Outline,Dec);
  pvSetGeometry(p,lCDNumber1,870,155,140,23);

  pvQSlider(p,slider1,ID_TAB_01,1,100,4,1,Vertical);
  pvSetGeometry(p,slider1,840,5,24,270);

  pvQMultiLineEdit(p,multiLine1,ID_TAB_01,0,10);
  pvSetGeometry(p,multiLine1,870,230,140,120);

  pvQwtPlotWidget(p,qwtPlot1,ID_TAB_01,2,360);
  pvSetGeometry(p,qwtPlot1,10,5,815,630);
  qpwSetCanvasBackground(p,qwtPlot1,239,239,239);
  qpwEnableAxis(p,qwtPlot1,yLeft);
  qpwEnableAxis(p,qwtPlot1,xBottom);

  pvQwtWheel(p,qwtWheel1,ID_TAB_01);
  pvSetGeometry(p,qwtWheel1,35,655,790,24);
  qwtWheelSetMass(p,qwtWheel1,0.200000f);
  qwtWheelSetTotalAngle(p,qwtWheel1,175.000000f);
  qwtWheelSetViewAngle(p,qwtWheel1,175.000000f);
  qwtWheelSetTickCnt(p,qwtWheel1,10);
  qwtWheelSetInternalBorder(p,qwtWheel1,2);

  pvQPushButton(p,buttonModalDialog,ID_TAB_01);
  pvSetGeometry(p,buttonModalDialog,875,650,135,30);
  pvSetText(p,buttonModalDialog,"ModalDialog");

  pvQWidget(p,ID_TAB_02,ID_TAB_DIALOG);
  pvAddTab(p,ID_TAB_DIALOG,ID_TAB_02,"Tab2");

  pvQDraw(p,qDraw1,ID_TAB_02);
  pvSetGeometry(p,qDraw1,15,15,1145,665);


  pvEndDefinition(p);
  return 0;
}
예제 #17
0
static int generated_defineMask(PARAM *p)
{
    int w,h,depth;

    if(p == NULL) return 1;
    w = h = depth = strcmp(toolTip[0],whatsThis[0]);
    if(widgetType[0] == -1) return 1;
    if(w==h) depth=0; // fool the compiler
    pvStartDefinition(p,ID_END_OF_WIDGETS);

    pvQLabel(p,obj1,0);
    pvSetGeometry(p,obj1,10,15,190,30);
    pvSetText(p,obj1,"Label");
    pvToolTip(p,obj1,"H7:0");

    pvQLabel(p,obj2,0);
    pvSetGeometry(p,obj2,10,40,100,30);
    pvSetText(p,obj2,"Label");
    pvToolTip(p,obj2,"H7:1");

    pvQLabel(p,obj3,0);
    pvSetGeometry(p,obj3,10,65,100,30);
    pvSetText(p,obj3,"Label");
    pvToolTip(p,obj3,"H7:2");

    pvQLabel(p,obj4,0);
    pvSetGeometry(p,obj4,10,90,100,30);
    pvSetText(p,obj4,"Label");
    pvToolTip(p,obj4,"H7:3");

    pvQLabel(p,obj5,0);
    pvSetGeometry(p,obj5,10,115,100,30);
    pvSetText(p,obj5,"Label");
    pvToolTip(p,obj5,"H7:4");

    pvQLabel(p,obj6,0);
    pvSetGeometry(p,obj6,10,140,100,30);
    pvSetText(p,obj6,"Label");
    pvToolTip(p,obj6,"H7:5");

    pvQLabel(p,obj7,0);
    pvSetGeometry(p,obj7,10,165,100,30);
    pvSetText(p,obj7,"Label");
    pvToolTip(p,obj7,"H7:6");

    pvQLabel(p,obj8,0);
    pvSetGeometry(p,obj8,10,190,100,30);
    pvSetText(p,obj8,"Label");
    pvToolTip(p,obj8,"H7:7");

    pvQPushButton(p,buttonIncrement,0);
    pvSetGeometry(p,buttonIncrement,235,20,100,30);
    pvSetText(p,buttonIncrement,"Increment");

    pvQPushButton(p,buttonList,0);
    pvSetGeometry(p,buttonList,235,65,100,30);
    pvSetText(p,buttonList,"List");


    pvEndDefinition(p);
    return 0;
}
예제 #18
0
파일: mask1.cpp 프로젝트: arhunn/pvbaddon
static int generated_defineMask(PARAM *p)
{
  int w,h,depth;

  if(p == NULL) return 1;
  w = h = depth = strcmp(toolTip[0],whatsThis[0]);
  if(widgetType[0] == -1) return 1;
  if(w==h) depth=0; // fool the compiler
  pvStartDefinition(p,ID_END_OF_WIDGETS);

  pvQLabel(p,obj1,0);
  pvSetGeometry(p,obj1,10,10,345,30);
  pvSetText(p,obj1,"Label");
  pvToolTip(p,obj1,"byteORG_M(0,0,0)");

  pvQLabel(p,obj2,0);
  pvSetGeometry(p,obj2,10,40,345,30);
  pvSetText(p,obj2,"Label");
  pvToolTip(p,obj2,"byteORG_M(0,0,1)");

  pvQLabel(p,obj3,0);
  pvSetGeometry(p,obj3,10,65,345,30);
  pvSetText(p,obj3,"Label");
  pvToolTip(p,obj3,"byteORG_M(0,0,2)");

  pvQLabel(p,obj4,0);
  pvSetGeometry(p,obj4,10,90,345,30);
  pvSetText(p,obj4,"Label");
  pvToolTip(p,obj4,"byteORG_M(0,0,3)");

  pvQLabel(p,obj5,0);
  pvSetGeometry(p,obj5,10,115,345,30);
  pvSetText(p,obj5,"Label");
  pvToolTip(p,obj5,"byteORG_M(0,0,4)");

  pvQLabel(p,obj6,0);
  pvSetGeometry(p,obj6,10,140,345,30);
  pvSetText(p,obj6,"Label");
  pvToolTip(p,obj6,"byteORG_M(0,0,5)");

  pvQLabel(p,obj7,0);
  pvSetGeometry(p,obj7,10,165,345,30);
  pvSetText(p,obj7,"Label");
  pvToolTip(p,obj7,"byteORG_M(0,0,6)");

  pvQPushButton(p,buttonList,0);
  pvSetGeometry(p,buttonList,355,10,130,30);
  pvSetText(p,buttonList,"List");

  pvQLabel(p,obj8,0);
  pvSetGeometry(p,obj8,10,190,345,30);
  pvSetText(p,obj8,"Label");
  pvToolTip(p,obj8,"byteORG_M(0,0,7)");

  pvQLabel(p,obj9,0);
  pvSetGeometry(p,obj9,10,215,345,30);
  pvSetText(p,obj9,"Label");
  pvToolTip(p,obj9,"byteORG_M(0,0,8)");

  pvQLabel(p,obj10,0);
  pvSetGeometry(p,obj10,10,240,345,30);
  pvSetText(p,obj10,"Label");
  pvToolTip(p,obj10,"byteORG_M(0,0,9)");

  pvQLabel(p,obj11,0);
  pvSetGeometry(p,obj11,355,50,60,30);
  pvSetText(p,obj11,"Bit");

  pvQLabel(p,obj12,0);
  pvSetGeometry(p,obj12,355,85,60,30);
  pvSetText(p,obj12,"Byte");

  pvQLabel(p,obj13,0);
  pvSetGeometry(p,obj13,355,120,60,30);
  pvSetText(p,obj13,"Int");

  pvQLabel(p,obj14,0);
  pvSetGeometry(p,obj14,355,155,60,30);
  pvSetText(p,obj14,"Float");

  pvQSpinBox(p,spinByte,0,0,255,1);
  pvSetGeometry(p,spinByte,430,85,100,30);

  pvQSpinBox(p,spinInt,0,0,10000,1);
  pvSetGeometry(p,spinInt,430,120,100,30);

  pvQSpinBox(p,spinFloat,0,-100,100,1);
  pvSetGeometry(p,spinFloat,430,155,100,30);

  pvQSpinBox(p,spinBit,0,0,1,1);
  pvSetGeometry(p,spinBit,430,50,100,30);

  pvQLabel(p,obj15,0);
  pvSetGeometry(p,obj15,540,105,280,35);
  pvSetText(p,obj15,"set ORG_M, slave=1, dbnum=0, adr=0");

  pvQGroupBox(p,obj16,0,-1,HORIZONTAL,"Bits in Byte 2");
  pvSetGeometry(p,obj16,355,200,285,260);

  pvQRadioButton(p,bit0,obj16);
  pvSetGeometry(p,bit0,5,20,100,30);
  pvSetText(p,bit0,"Bit 0");

  pvQRadioButton(p,bit1,obj16);
  pvSetGeometry(p,bit1,5,45,100,30);
  pvSetText(p,bit1,"Bit 1");

  pvQRadioButton(p,bit2,obj16);
  pvSetGeometry(p,bit2,5,75,100,30);
  pvSetText(p,bit2,"Bit 2");

  pvQRadioButton(p,bit3,obj16);
  pvSetGeometry(p,bit3,5,105,100,30);
  pvSetText(p,bit3,"Bit 3");

  pvQRadioButton(p,bit4,obj16);
  pvSetGeometry(p,bit4,5,135,100,30);
  pvSetText(p,bit4,"Bit 4");

  pvQRadioButton(p,bit5,obj16);
  pvSetGeometry(p,bit5,5,165,100,30);
  pvSetText(p,bit5,"Bit 5");

  pvQRadioButton(p,bit6,obj16);
  pvSetGeometry(p,bit6,5,195,100,30);
  pvSetText(p,bit6,"Bit 6");

  pvQRadioButton(p,bit7,obj16);
  pvSetGeometry(p,bit7,5,225,100,30);
  pvSetText(p,bit7,"Bit 7");

  pvQRadioButton(p,bit_0_1_2,obj16);
  pvSetGeometry(p,bit_0_1_2,170,20,100,30);
  pvSetText(p,bit_0_1_2,"Bit 0 1 2");

  pvQPushButton(p,buttonSet0,obj16);
  pvSetGeometry(p,buttonSet0,170,60,100,30);
  pvSetText(p,buttonSet0,"Set value=0");


  pvEndDefinition(p);
  return 0;
}
예제 #19
0
파일: Mask3.cpp 프로젝트: nrj123/pvb
static int defineMask(PARAM *p)
{
int x,y,w,h,depth;

  pvStartDefinition(p,ID_END_OF_WIDGETS);

  // define buttons
  pvQPushButton(p,ID_BUTTON_MASK1,0);
  pvQPushButton(p,ID_BUTTON_MASK2,0);
  pvQPushButton(p,ID_BUTTON_MASK3,0);
  x = 0; y = 0;
  pvSetGeometry(p,ID_BUTTON_MASK1,x,y,100,30);
  x = 0; y += 30;
  pvSetGeometry(p,ID_BUTTON_MASK2,x,y,100,30);
  x = 0; y += 30;
  pvSetGeometry(p,ID_BUTTON_MASK3,x,y,100,30);
  pvSetText(p,ID_BUTTON_MASK1,"Show Mask1");
  pvSetText(p,ID_BUTTON_MASK2,"Show Mask2");
  pvSetText(p,ID_BUTTON_MASK3,"Show Mask3");

  x = 0; y += 30;
  pvQLabel(p,ID_LABEL,0);
  pvSetGeometry(p,ID_LABEL,x,y,100,30);
  pvSetText(p,ID_LABEL,"This is mask 3");

  pvQImage(p,ID_IMAGE,0,"homer.bmp", &w, &h, &depth);
  if(w>0 && h>0) pvSetGeometry(p,ID_IMAGE,100,0,w,h);

  pvQLCDNumber(p,ID_LCD1,0,5,Outline,HEX);
  pvQLCDNumber(p,ID_LCD2,0,5,Filled,DEC);
  pvQLCDNumber(p,ID_LCD3,0,5,Flat,DEC);
  pvSetGeometry(p,ID_LCD1,100+w,0,100,50);
  pvSetGeometry(p,ID_LCD2,100+w,50,100,50);
  pvSetGeometry(p,ID_LCD3,100+w,100,100,50);

  pvQFrame(p,ID_FRAME,ID_IMAGE,Box,Raised,3,3);
  pvSetGeometry(p,ID_FRAME,20,20,200+6,150+6);
  pvQDraw(p,ID_GRAPHIC,ID_FRAME);
  pvSetGeometry(p,ID_GRAPHIC,3,3,200,150);
  pvQPushButton(p,ID_PRINT,ID_GRAPHIC);
  pvSetGeometry(p,ID_PRINT,5,5,50,20);
  pvSetText(p,ID_PRINT,"Print");

  pvQFrame(p,ID_FRAME2,0,Box,Sunken,3,3);
  pvSetGeometry(p,ID_FRAME2,100+w,150,400+6,300+6);
  pvQDraw(p,ID_GRAPHIC2,ID_FRAME2);
  pvSetGeometry(p,ID_GRAPHIC2,3,3,400,300);
  //pvSetGeometry(p,ID_GRAPHIC2,100+w,150,400,300);
  pvSetBackgroundColor(p,ID_GRAPHIC2,128,128,128);

  pvQComboBox(p,ID_COMBO1,0,0,AtTop);
  pvSetGeometry(p,ID_COMBO1,150+w,h-200,200,30);
  pvSetText(p,ID_COMBO1,"one");
  pvSetText(p,ID_COMBO1,"two");
  pvSetText(p,ID_COMBO1,"three");
  pvSetText(p,ID_COMBO1,"four");
  pvSetText(p,ID_COMBO1,"fife");
  pvQComboBox(p,ID_COMBO2,0,1,AtTop);
  pvSetGeometry(p,ID_COMBO2,150+w,h-150,200,30);
  pvSetText(p,ID_COMBO2,"one test");
  pvSetText(p,ID_COMBO2,"two test");
  pvSetText(p,ID_COMBO2,"three test");
  pvSetText(p,ID_COMBO2,"four test");
  pvSetText(p,ID_COMBO2,"fife test");

  pvEndDefinition(p);
  return 0;
}
예제 #20
0
파일: mask2.cpp 프로젝트: arhunn/pvbaddon
static int generated_defineMask(PARAM *p)
{
  int w,h,depth;

  if(p == NULL) return 1;
  w = h = depth = strcmp(toolTip[0],whatsThis[0]);
  if(w==h) depth=0; // fool the compiler
  pvStartDefinition(p,ID_END_OF_WIDGETS);

  pvQPushButton(p,back,0);
  pvSetGeometry(p,back,10,10,100,30);
  pvSetText(p,back,"&Back");

  pvQLabel(p,textLabelNumThreads,0);
  pvSetGeometry(p,textLabelNumThreads,125,10,100,30);
  pvSetText(p,textLabelNumThreads,"numThreads");

  pvQMultiLineEdit(p,textEditOutput,0,0,-1);
  pvSetGeometry(p,textEditOutput,10,55,635,290);

  pvQMultiLineEdit(p,textEditInput,0,1,-1);
  pvSetGeometry(p,textEditInput,10,355,635,200);
  pvSetMaxSize(p,textEditInput,99999,200);

  pvQPushButton(p,pushButtonSend,0);
  pvSetGeometry(p,pushButtonSend,545,570,100,30);
  pvSetText(p,pushButtonSend,"&Send <ESC>");

  pvQLineEdit(p,lineEditAlias,0);
  pvSetGeometry(p,lineEditAlias,120,575,180,30);
  pvSetText(p,lineEditAlias,"unknown");

  pvQLabel(p,labelChat,0);
  pvSetGeometry(p,labelChat,535,15,110,30);
  pvSetText(p,labelChat,"pvbrowser Chat");
  pvSetFont(p,labelChat,"Sans Serif",9,1,1,0,0);

  pvQLabel(p,labelAlias,0);
  pvSetGeometry(p,labelAlias,10,575,100,30);
  pvSetText(p,labelAlias,"Alias:");

  pvQLayoutVbox(p,ID_MAIN_WIDGET,-1);

  pvQLayoutHbox(p,layout1,ID_MAIN_WIDGET);

  pvQLayoutHbox(p,layout2,ID_MAIN_WIDGET);

  pvAddWidgetOrLayout(p,layout1,back,-1,-1);
  pvAddWidgetOrLayout(p,layout1,textLabelNumThreads,-1,-1);
  pvAddStretch(p,layout1,1);
  pvAddWidgetOrLayout(p,layout1,labelChat,-1,-1);
  pvAddWidgetOrLayout(p,layout2,labelAlias,-1,-1);
  pvAddWidgetOrLayout(p,layout2,lineEditAlias,-1,-1);
  pvAddStretch(p,layout2,1);
  pvAddWidgetOrLayout(p,layout2,pushButtonSend,-1,-1);
  pvAddWidgetOrLayout(p,ID_MAIN_WIDGET,layout1,-1,-1);
  pvAddWidgetOrLayout(p,ID_MAIN_WIDGET,textEditOutput,-1,-1);
  pvAddWidgetOrLayout(p,ID_MAIN_WIDGET,textEditInput,-1,-1);
  pvAddWidgetOrLayout(p,ID_MAIN_WIDGET,layout2,-1,-1);

  pvEndDefinition(p);
  return 0;
}
예제 #21
0
파일: mask1.cpp 프로젝트: Strongc/pvbaddon
static int generated_defineMask(PARAM *p)
{
  int w,h,depth;

  if(p == NULL) return 1;
  if(widgetName[0] == NULL) return 1; // suppress unused warning
  w = h = depth = strcmp(toolTip[0],whatsThis[0]);
  if(widgetType[0] == -1) return 1;
  if(w==h) depth=0; // fool the compiler
  pvStartDefinition(p,ID_END_OF_WIDGETS);

  pvQTabWidget(p,obj2,0);
  pvSetGeometry(p,obj2,10,50,770,540);
  pvSetFont(p,obj2,"Sans Serif",9,0,0,0,0);

  pvQWidget(p,obj1,obj2);
  pvAddTab(p,obj2,obj1,pvtr("OPC UA test"));
  pvSetFont(p,obj1,"Sans Serif",9,0,0,0,0);

  pvQLabel(p,obj8,obj1);
  pvSetGeometry(p,obj8,5,15,750,15);
  pvSetText(p,obj8,pvtr("0#61#FolderType#FolderType"));
  pvSetFont(p,obj8,"Sans Serif",9,0,0,0,0);
  pvToolTip(p,obj8,pvtr("0#61#FolderType#FolderType"));

  pvQLabel(p,obj9,obj1);
  pvSetGeometry(p,obj9,5,30,720,15);
  pvSetText(p,obj9,pvtr("0#2253#Server#Server"));
  pvSetFont(p,obj9,"Sans Serif",9,0,0,0,0);
  pvToolTip(p,obj9,pvtr("0#2253#Server#Server"));

  pvQLabel(p,obj10,obj1);
  pvSetGeometry(p,obj10,5,45,740,15);
  pvSetText(p,obj10,pvtr("1#95#current time#current time"));
  pvSetFont(p,obj10,"Sans Serif",9,0,0,0,0);
  pvToolTip(p,obj10,pvtr("1#95#current time#current time"));

  pvQLabel(p,obj11,obj1);
  pvSetGeometry(p,obj11,5,60,735,15);
  pvSetText(p,obj11,pvtr("1#96#cpu temperature#cpu temperature"));
  pvSetFont(p,obj11,"Sans Serif",9,0,0,0,0);
  pvToolTip(p,obj11,pvtr("1#96#cpu temperature#cpu temperature"));

  pvQLabel(p,obj12,obj1);
  pvSetGeometry(p,obj12,5,75,745,15);
  pvSetText(p,obj12,pvtr("1#97#status LED#status LED"));
  pvSetFont(p,obj12,"Sans Serif",9,0,0,0,0);
  pvToolTip(p,obj12,pvtr("1#97#status LED#status LED"));

  pvQLabel(p,obj13,obj1);
  pvSetGeometry(p,obj13,5,90,735,15);
  pvSetText(p,obj13,pvtr("1#the.answer#the answer#the answer"));
  pvSetFont(p,obj13,"Sans Serif",9,0,0,0,0);
  pvToolTip(p,obj13,pvtr("1#the.answer#the answer#the answer"));

  pvQLabel(p,obj14,obj1);
  pvSetGeometry(p,obj14,5,105,740,15);
  pvSetText(p,obj14,pvtr("1#50000#Demo#Demo"));
  pvSetFont(p,obj14,"Sans Serif",9,0,0,0,0);
  pvToolTip(p,obj14,pvtr("1#50000#Demo#Demo"));

  pvQPushButton(p,buttonIncrementAnswer,obj1);
  pvSetGeometry(p,buttonIncrementAnswer,5,140,135,30);
  pvSetText(p,buttonIncrementAnswer,pvtr("IncTheAnswer"));
  pvSetFont(p,buttonIncrementAnswer,"Sans Serif",9,0,0,0,0);

  pvQWidget(p,obj6,obj2);
  pvAddTab(p,obj2,obj6,pvtr("tmp test"));
  pvSetFont(p,obj6,"Sans Serif",9,0,0,0,0);

  pvQPushButton(p,buttonInt16,obj6);
  pvSetGeometry(p,buttonInt16,5,95,100,30);
  pvSetText(p,buttonInt16,pvtr("Incremt Int16"));
  pvSetFont(p,buttonInt16,"Sans Serif",9,0,0,0,0);

  pvQPushButton(p,buttonInt32,obj6);
  pvSetGeometry(p,buttonInt32,110,95,100,30);
  pvSetText(p,buttonInt32,pvtr("Increment Int32"));
  pvSetFont(p,buttonInt32,"Sans Serif",9,0,0,0,0);

  pvQPushButton(p,buttonFloat,obj6);
  pvSetGeometry(p,buttonFloat,215,95,100,30);
  pvSetText(p,buttonFloat,pvtr("Increment Float"));
  pvSetFont(p,buttonFloat,"Sans Serif",9,0,0,0,0);

  pvQPushButton(p,buttonDouble,obj6);
  pvSetGeometry(p,buttonDouble,320,95,100,30);
  pvSetText(p,buttonDouble,pvtr("Increment Double"));
  pvSetFont(p,buttonDouble,"Sans Serif",9,0,0,0,0);

  pvQPushButton(p,buttonHello,obj6);
  pvSetGeometry(p,buttonHello,425,95,100,30);
  pvSetText(p,buttonHello,pvtr("Hello"));
  pvSetFont(p,buttonHello,"Sans Serif",9,0,0,0,0);

  pvQPushButton(p,buttonWorld,obj6);
  pvSetGeometry(p,buttonWorld,530,95,100,30);
  pvSetText(p,buttonWorld,pvtr("World"));
  pvSetFont(p,buttonWorld,"Sans Serif",9,0,0,0,0);

  pvQLabel(p,labelWriteErrorCount,obj6);
  pvSetGeometry(p,labelWriteErrorCount,5,130,620,15);
  pvSetText(p,labelWriteErrorCount,pvtr("writeErrorCount"));
  pvSetFont(p,labelWriteErrorCount,"Sans Serif",9,0,0,0,0);

  pvQLabel(p,labelReadErrorCount,obj6);
  pvSetGeometry(p,labelReadErrorCount,5,145,625,15);
  pvSetText(p,labelReadErrorCount,pvtr("readErrorCount"));
  pvSetFont(p,labelReadErrorCount,"Sans Serif",9,0,0,0,0);

  pvQLabel(p,obj7,0);
  pvSetGeometry(p,obj7,10,10,1005,35);
  pvSetText(p,obj7,pvtr("OPC UA Example using opc.tcp://localhost:16664"));
  pvSetFont(p,obj7,"Sans Serif",14,1,0,0,0);


  pvEndDefinition(p);
  return 0;
}
예제 #22
0
파일: Mask1.cpp 프로젝트: nrj123/pvb
static int defineMask(PARAM *p)
{
int i,x,y,obj;

  pvStartDefinition(p,ID_END_OF_WIDGETS);

  // define buttons
  pvQPushButton(p,ID_BUTTON_MASK1,0);
  pvQPushButton(p,ID_BUTTON_MASK2,0);
  pvQPushButton(p,ID_BUTTON_MASK3,0);
  pvQPushButton(p,ID_BUTTON_MASK4,0);
  pvQPushButton(p,ID_BUTTON_PERIODIC,0);
  pvQPushButton(p,ID_BUTTON_MASKVTK,0);
  pvQPushButton(p,ID_BUTTON_MASKQWT,0);
  pvQPushButton(p,ID_BUTTON_REQUEST,0);
  pvQLineEdit(p,ID_LINE_EDIT,0);
  x = 0; y = 0;
  pvSetGeometry(p,ID_BUTTON_MASK1,x,y,100,30);
  x = 0; y += 30;
  pvSetGeometry(p,ID_BUTTON_MASK2,x,y,100,30);
  x = 0; y += 30;
  pvSetGeometry(p,ID_BUTTON_MASK3,x,y,100,30);
  x = 0; y += 30;
  pvSetGeometry(p,ID_BUTTON_MASK4,x,y,100,30);
  x = 0; y += 30;
  pvSetGeometry(p,ID_BUTTON_PERIODIC,x,y,100,30);
  x = 0; y += 30;
  pvSetGeometry(p,ID_BUTTON_MASKVTK,x,y,100,30);
  x = 0; y += 30;
  pvSetGeometry(p,ID_BUTTON_MASKQWT,x,y,100,30);
  x = 0; y += 30;
  pvSetGeometry(p,ID_BUTTON_REQUEST,x,y,100,30);
  x = 0; y += 30;
  pvSetGeometry(p,ID_LINE_EDIT,x,y,100,30);
  pvSetText(p,ID_BUTTON_MASK1,"Show Mask1");
  pvSetText(p,ID_BUTTON_MASK2,"Show Mask2");
  pvSetText(p,ID_BUTTON_MASK3,"Show Mask3");
  pvSetText(p,ID_BUTTON_MASK4,"Show OpenGL");
  pvSetText(p,ID_BUTTON_PERIODIC,"\"Show Periodic\"");
  pvSetText(p,ID_BUTTON_MASKVTK,"Show VTK");
  pvSetText(p,ID_BUTTON_MASKQWT,"Show QWT");
  pvSetText(p,ID_BUTTON_REQUEST,"Request text's");

  pvToolTip(p,ID_BUTTON_MASK1,"äöüß This is the ToolTip for BUTTON_MASK1耶和华见证人:守望台圣经书社正式网页");

  // define the lines
  pvQLabel(p,ID_LINE1,0);
  pvSetGeometry(p,ID_LINE1,150, 10,800,3);
  pvSetBackgroundColor(p,ID_LINE1,255,255,0);
  pvQLabel(p,ID_LINE2,0);
  pvSetGeometry(p,ID_LINE2,150,180,800,3);
  pvSetBackgroundColor(p,ID_LINE2,255,255,0);
  pvQLabel(p,ID_LINE3,0);
  pvSetGeometry(p,ID_LINE3,150,220,800,3);
  pvSetBackgroundColor(p,ID_LINE3,255,255,0);

  // define the arrays
  obj = ID_SPEED_LABEL;
  x = 150; y = 20;
  pvQLabel(p,obj,0);
  pvSetGeometry(p,obj,x,y,130,30);
  pvPrintf(p,obj,"Speed (m/sec):");
  x += 130;
  obj++;
  FORi
  {
    pvQLabel(p,obj,0);
    pvSetGeometry(p,obj,x,y,50,30);
    x += 80;
    obj++;
  }
  obj = ID_TEMP_LABEL;
  x = 150; y += 30;
  pvQLabel(p,obj,0);
  pvSetGeometry(p,obj,x,y,130,30);
  pvPrintf(p,obj,"Temperature (degC) :");
  x += 130;
  obj++;
  FORi
  {
    pvQLabel(p,obj,0);
    pvSetGeometry(p,obj,x,y,50,30);
    x += 80;
    obj++;
  }
  obj = ID_FORCE_LABEL;
  x = 150; y += 30;
  pvQLabel(p,obj,0);
  pvSetGeometry(p,obj,x,y,130,30);
  pvPrintf(p,obj,"Force (kN):");
  x += 130;
  obj++;
  FORi
  {
    pvQLabel(p,obj,0);
    pvSetGeometry(p,obj,x,y,50,30);
    x += 80;
    obj++;
  }
  obj = ID_THICK_LABEL;
  x = 150; y += 30;
  pvQLabel(p,obj,0);
  pvSetGeometry(p,obj,x,y,130,30);
  pvPrintf(p,obj,"Thickness (mm):");
  x += 130;
  obj++;
  FORi
  {
    pvQLabel(p,obj,0);
    pvSetGeometry(p,obj,x,y,50,30);
    x += 80;
    obj++;
  }

  // define the single values
  obj = ID_TARGET_THICK;
  x = 150; y = 187;
  pvQLabel(p,obj,0);
  pvSetGeometry(p,obj,x,y,250,30);
  obj++; x += 270;
  pvQLabel(p,obj,0);
  pvSetGeometry(p,obj,x,y,250,30);
  obj++; x += 270;
  pvQLabel(p,obj,0);
  pvSetGeometry(p,obj,x,y,250,30);
  obj++; x += 270;

  x = 150; y = 250;
  pvQTabWidget(p,ID_TAB_DIALOG,0);
  pvSetGeometry(p,ID_TAB_DIALOG,x,y,400,200);
  pvSetTabPosition(p,ID_TAB_DIALOG,Bottom);

  pvQWidget(p,ID_TAB1,ID_TAB_DIALOG);
  pvQWidget(p,ID_TAB2,ID_TAB_DIALOG);
  pvQWidget(p,ID_TAB3,ID_TAB_DIALOG);

  pvAddTab(p,ID_TAB_DIALOG,ID_TAB1,"Tab1");
  pvAddTab(p,ID_TAB_DIALOG,ID_TAB2,"Tab2");
  pvAddTab(p,ID_TAB_DIALOG,ID_TAB3,"Tab3");

  pvQPushButton(p,ID_TAB_BUTTON1,ID_TAB1);
  pvSetGeometry(p,ID_TAB_BUTTON1,10,10,100,30);
  pvSetText(p,ID_TAB_BUTTON1,"A TabWidget");

  pvEndDefinition(p);
  return 0;
}
예제 #23
0
파일: mask11.cpp 프로젝트: GeanlinZh/pvb
static int generated_defineMask(PARAM *p)
{
  int w,h,depth;

  if(p == NULL) return 1;
  w = h = depth = strcmp(toolTip[0],whatsThis[0]);
  if(widgetType[0] == -1) return 1;
  if(w==h) depth=0; // fool the compiler
  pvStartDefinition(p,ID_END_OF_WIDGETS);

  printf("generated_defineMaks 1\n");
  pvQGL(p,OpenGL1,0);
  printf("generated_defineMaks 2\n");
  pvSetGeometry(p,OpenGL1,105,0,1024,768);
  printf("generated_defineMaks 3\n");
  pvGlBegin(p,OpenGL1);
  printf("generated_defineMaks 4\n");
  initializeGL(p);    // (todo: write your gl initialization routine) see example
  printf("generated_defineMaks 5\n");
  resizeGL(p,1024,768);  // (todo: write your resize routine) see example
  printf("generated_defineMaks 6\n");
  pvGlEnd(p);
  printf("generated_defineMaks 7\n");

  pvQGroupBox(p,group1,0,-1,HORIZONTAL,"w2d");
  pvSetGeometry(p,group1,0,0,100,515);
  pvSetFont(p,group1,"Sans Serif",10,0,0,0,0);
  pvSetMaxSize(p,group1,100,99999);

  pvQSlider(p,sliderPos,group1,0,100,1,10,Horizontal);
  pvSetGeometry(p,sliderPos,10,145,80,30);
  pvSetFont(p,sliderPos,"Sans Serif",10,0,0,0,0);

  pvQSlider(p,sliderScale,group1,0,100,1,31,Vertical);
  pvSetGeometry(p,sliderScale,70,55,25,75);
  pvSetFont(p,sliderScale,"Sans Serif",10,0,0,0,0);

  pvDownloadFile(p,"1center.png");
  pvQImage(p,btCenter,group1,"1center.png",&w,&h,&depth);
  pvSetGeometry(p,btCenter,25,85,25,25);
  pvSetFont(p,btCenter,"Sans Serif",10,0,0,0,0);

  pvDownloadFile(p,"1leftarrow.png");
  pvQImage(p,btLeft,group1,"1leftarrow.png",&w,&h,&depth);
  pvSetGeometry(p,btLeft,5,85,25,25);
  pvSetFont(p,btLeft,"Sans Serif",10,0,0,0,0);

  pvDownloadFile(p,"1rightarrow.png");
  pvQImage(p,btRight,group1,"1rightarrow.png",&w,&h,&depth);
  pvSetGeometry(p,btRight,45,85,25,25);
  pvSetFont(p,btRight,"Sans Serif",10,0,0,0,0);

  pvDownloadFile(p,"1uparrow.png");
  pvQImage(p,btUp,group1,"1uparrow.png",&w,&h,&depth);
  pvSetGeometry(p,btUp,25,65,25,25);
  pvSetFont(p,btUp,"Sans Serif",10,0,0,0,0);

  pvDownloadFile(p,"1downarrow.png");
  pvQImage(p,btDown,group1,"1downarrow.png",&w,&h,&depth);
  pvSetGeometry(p,btDown,25,105,25,25);
  pvSetFont(p,btDown,"Sans Serif",10,0,0,0,0);

  pvQLabel(p,obj1,group1);
  pvSetGeometry(p,obj1,80,45,15,15);
  pvSetText(p,obj1,"+");
  pvSetFont(p,obj1,"Sans Serif",10,0,0,0,0);

  pvQPushButton(p,btBack,group1);
  pvSetGeometry(p,btBack,5,25,75,30);
  pvSetText(p,btBack,"Back");
  pvSetFont(p,btBack,"Sans Serif",10,0,0,0,0);

  pvQLabel(p,obj2,group1);
  pvSetGeometry(p,obj2,80,135,15,15);
  pvSetText(p,obj2,"-");
  pvSetFont(p,obj2,"Sans Serif",10,0,0,0,0);

  pvQLayoutHbox(p,ID_MAIN_WIDGET,-1);

  pvQLayoutVbox(p,layout1,-1);

  pvAddWidgetOrLayout(p,ID_MAIN_WIDGET,layout1,-1,-1);
  pvAddWidgetOrLayout(p,ID_MAIN_WIDGET,OpenGL1,-1,-1);
  pvAddWidgetOrLayout(p,layout1,group1,-1,-1);

  printf("generated_defineMaks x\n");
  pvEndDefinition(p);
  printf("generated_defineMaks end\n");
  return 0;
}
예제 #24
0
static int generated_defineMask(PARAM *p)
{
  int w,h,depth;

  if(p == NULL) return 1;
  w = h = depth = strcmp(toolTip[0],whatsThis[0]);
  if(widgetType[0] == -1) return 1;
  if(w==h) depth=0; // fool the compiler
  pvStartDefinition(p,ID_END_OF_WIDGETS);

  pvQTextBrowser(p,upperWidget,0);
  pvSetGeometry(p,upperWidget,5,5,945,200);
  pvSetFont(p,upperWidget,"Sans Serif",10,0,0,0,0);
  pvSetMinSize(p,upperWidget,0,200);
  pvSetMaxSize(p,upperWidget,99999,200);

  pvQTextBrowser(p,leftWidget,0);
  pvSetGeometry(p,leftWidget,5,215,175,445);
  pvSetFont(p,leftWidget,"Sans Serif",10,0,0,0,0);
  pvSetMaxSize(p,leftWidget,200,99999);

  pvQDraw(p,centerWidget,0);
  pvSetGeometry(p,centerWidget,190,215,580,425);
  pvSetFont(p,centerWidget,"Sans Serif",10,0,0,0,0);
  pvSetWhatsThis(p,centerWidget,"test.svg");
  pvSetMinSize(p,centerWidget,100,100);

  pvQGroupBox(p,rightWidget,0,-1,HORIZONTAL,"Tools");
  pvSetGeometry(p,rightWidget,780,210,170,450);
  pvSetFont(p,rightWidget,"Sans Serif",10,0,0,0,0);
  pvSetMaxSize(p,rightWidget,200,99999);

  pvQLabel(p,obj1,rightWidget);
  pvSetGeometry(p,obj1,10,150,145,35);
  pvSetText(p,obj1,"Put your tools here");
  pvSetFont(p,obj1,"Sans Serif",10,0,0,0,0);

  pvDownloadFile(p,"1center.png");
  pvQImage(p,iCenter,rightWidget,"1center.png",&w,&h,&depth);
  pvSetGeometry(p,iCenter,35,65,22,22);
  pvSetFont(p,iCenter,"Sans Serif",10,0,0,0,0);
  pvSetWhatsThis(p,iCenter,"1center.png");

  pvDownloadFile(p,"1uparrow.png");
  pvQImage(p,iUp,rightWidget,"1uparrow.png",&w,&h,&depth);
  pvSetGeometry(p,iUp,35,40,22,22);
  pvSetFont(p,iUp,"Sans Serif",10,0,0,0,0);
  pvSetWhatsThis(p,iUp,"1uparrow.png");

  pvDownloadFile(p,"1downarrow.png");
  pvQImage(p,iDown,rightWidget,"1downarrow.png",&w,&h,&depth);
  pvSetGeometry(p,iDown,35,90,22,22);
  pvSetFont(p,iDown,"Sans Serif",10,0,0,0,0);
  pvSetWhatsThis(p,iDown,"1downarrow.png");

  pvDownloadFile(p,"1leftarrow.png");
  pvQImage(p,iLeft,rightWidget,"1leftarrow.png",&w,&h,&depth);
  pvSetGeometry(p,iLeft,10,65,22,22);
  pvSetFont(p,iLeft,"Sans Serif",10,0,0,0,0);
  pvSetWhatsThis(p,iLeft,"1leftarrow.png");

  pvDownloadFile(p,"1rightarrow.png");
  pvQImage(p,iRight,rightWidget,"1rightarrow.png",&w,&h,&depth);
  pvSetGeometry(p,iRight,60,65,22,22);
  pvSetFont(p,iRight,"Sans Serif",10,0,0,0,0);
  pvSetWhatsThis(p,iRight,"1rightarrow.png");

  pvQSlider(p,sliderZoom,rightWidget,10,200,1,10,Vertical);
  pvSetGeometry(p,sliderZoom,125,30,25,100);
  pvSetFont(p,sliderZoom,"Sans Serif",10,0,0,0,0);

  pvQLayoutHbox(p,ID_MAIN_WIDGET,-1);

  pvQLayoutVbox(p,layout1,-1);

  pvQLayoutHbox(p,layout2,-1);

  pvAddWidgetOrLayout(p,ID_MAIN_WIDGET,layout1,-1,-1);
  pvAddWidgetOrLayout(p,layout1,upperWidget,-1,-1);
  pvAddWidgetOrLayout(p,layout1,layout2,-1,-1);
  pvAddWidgetOrLayout(p,layout2,leftWidget,-1,-1);
  pvAddWidgetOrLayout(p,layout2,centerWidget,-1,-1);
  pvAddWidgetOrLayout(p,layout2,rightWidget,-1,-1);

  pvEndDefinition(p);
  return 0;
}
예제 #25
0
파일: mask1.cpp 프로젝트: arhunn/pvbaddon
static int generated_defineMask(PARAM *p)
{
  int w,h,depth;

  if(p == NULL) return 1;
  w = h = depth = strcmp(toolTip[0],whatsThis[0]);
  if(widgetType[0] == -1) return 1;
  if(w==h) depth=0; // fool the compiler
  pvStartDefinition(p,ID_END_OF_WIDGETS);

  pvDownloadFile(p,"BioCompactSchm.png");
  pvQImage(p,obj1,0,"BioCompactSchm.png",&w,&h,&depth);
  pvSetGeometry(p,obj1,5,5,979,441);
  pvSetFont(p,obj1,"Sans Serif",10,0,0,0,0);
  pvSetWhatsThis(p,obj1,pvtr("BioCompactSchm.png"));

  pvDownloadFile(p,"grey.png");
  pvQImage(p,markFlow,obj1,"grey.png",&w,&h,&depth);
  pvSetGeometry(p,markFlow,31,189,35,35);
  pvSetFont(p,markFlow,"Sans Serif",10,0,0,0,0);
  pvSetWhatsThis(p,markFlow,pvtr("grey.png"));

  pvDownloadFile(p,"green.png");
  pvQImage(p,markBlower1,obj1,"green.png",&w,&h,&depth);
  pvSetGeometry(p,markBlower1,165,19,35,35);
  pvSetFont(p,markBlower1,"Sans Serif",10,0,0,0,0);
  pvSetWhatsThis(p,markBlower1,pvtr("green.png"));

  pvDownloadFile(p,"red.png");
  pvQImage(p,markBlower2,obj1,"red.png",&w,&h,&depth);
  pvSetGeometry(p,markBlower2,346,19,35,35);
  pvSetFont(p,markBlower2,"Sans Serif",10,0,0,0,0);
  pvSetWhatsThis(p,markBlower2,pvtr("red.png"));

  pvDownloadFile(p,"grey.png");
  pvQImage(p,markUVunit,obj1,"grey.png",&w,&h,&depth);
  pvSetGeometry(p,markUVunit,800,124,35,35);
  pvSetFont(p,markUVunit,"Sans Serif",10,0,0,0,0);
  pvSetWhatsThis(p,markUVunit,pvtr("grey.png"));

  pvDownloadFile(p,"grey.png");
  pvQImage(p,markPump,obj1,"grey.png",&w,&h,&depth);
  pvSetGeometry(p,markPump,840,329,35,35);
  pvSetFont(p,markPump,"Sans Serif",10,0,0,0,0);
  pvSetWhatsThis(p,markPump,pvtr("grey.png"));

  pvQLabel(p,label1,0);
  pvSetGeometry(p,label1,5,465,550,30);
  pvSetText(p,label1,pvtr("Label1"));
  pvSetFont(p,label1,"Sans Serif",10,0,0,0,0);

  pvQLabel(p,label2,0);
  pvSetGeometry(p,label2,5,495,550,30);
  pvSetText(p,label2,pvtr("Label2"));
  pvSetFont(p,label2,"Sans Serif",10,0,0,0,0);

  pvQLabel(p,label3,0);
  pvSetGeometry(p,label3,5,525,550,30);
  pvSetText(p,label3,pvtr("Label3"));
  pvSetFont(p,label3,"Sans Serif",10,0,0,0,0);

  pvQLabel(p,label4,0);
  pvSetGeometry(p,label4,5,555,550,30);
  pvSetText(p,label4,pvtr("Label4"));
  pvSetFont(p,label4,"Sans Serif",10,0,0,0,0);

  pvQLabel(p,label5,0);
  pvSetGeometry(p,label5,5,585,550,30);
  pvSetText(p,label5,pvtr("Label5"));
  pvSetFont(p,label5,"Sans Serif",10,0,0,0,0);


  pvEndDefinition(p);
  return 0;
}