CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
ConfigBox Class Reference

#include <ConfigBox.h>

Inheritance diagram for ConfigBox:
WebElement

Public Member Functions

 ConfigBox (std::string the_url, std::string top, std::string left)
 
void printHTML (xgi::Output *out)
 
 ~ConfigBox ()
 
- Public Member Functions inherited from WebElement
std::string get_pix_left ()
 
std::string get_pix_top ()
 
std::string get_url ()
 
 WebElement (std::string the_url, std::string top, std::string left)
 
virtual ~WebElement ()
 

Private Attributes

std::string callback
 

Detailed Description

This is the class that should be instantiated in case the user wants to have a box that resets the configuration of the DQM client. Submitting the information of this box should result in an attempt to connect to a new collector according to the information submitted.

Definition at line 16 of file ConfigBox.h.

Constructor & Destructor Documentation

ConfigBox::ConfigBox ( std::string  the_url,
std::string  top,
std::string  left 
)
inline

Definition at line 24 of file ConfigBox.h.

References callback.

24  : WebElement(the_url, top, left)
25  {
26  callback = "Configure";
27  }
WebElement(std::string the_url, std::string top, std::string left)
Definition: WebElement.h:21
std::string callback
Definition: ConfigBox.h:20
ConfigBox::~ConfigBox ( )
inline

Definition at line 28 of file ConfigBox.h.

29  {
30  }

Member Function Documentation

void ConfigBox::printHTML ( xgi::Output out)
virtual

Implements WebElement.

Definition at line 3 of file ConfigBox.cc.

References WebElement::get_pix_left(), WebElement::get_pix_top(), WebElement::get_url(), LaserDQM_cfg::input, position, and asciidump::table.

4 {
5  std::string position = "position:absolute; left:" + get_pix_left() + "; top:" + get_pix_top();
6  *out << cgicc::div().set("style", position.c_str()) << std::endl;
7  *out << cgicc::form().set("name", "ConfigurationForm") << std::endl;
8  *out << cgicc::table().set("border", "0") << std::endl;
9  *out << cgicc::tr()
10  << cgicc::td() << "Hostname:" << cgicc::td()
11  << cgicc::td() << cgicc::input().set("type", "text").set("name", "Hostname") << cgicc::td()
12  << cgicc::tr() << std::endl;
13  *out << cgicc::tr()
14  << cgicc::td() << "Port:" << cgicc::td()
15  << cgicc::td() << cgicc::input().set("type", "text").set("name", "Port") << cgicc::td()
16  << cgicc::tr() << std::endl;
17  *out << cgicc::tr()
18  << cgicc::td() << "Client Name:" << cgicc::td()
19  << cgicc::td() << cgicc::input().set("type", "text").set("name", "Name") << cgicc::td()
20  << cgicc::tr() << std::endl;
21 
22  std::string js_command = "submitConfigure('" + get_url() + "', form)";
23  *out << cgicc::tr()
24  << cgicc::td() << cgicc::input().set("type", "button").set("value", "(Re)configure!").set("onClick", js_command) << cgicc::td()
25  << cgicc::tr() << std::endl;
26  *out << cgicc::table() << std::endl;
27  *out << cgicc::form() << std::endl;
28  *out << cgicc::div() << std::endl;
29 }
std::string get_pix_left()
Definition: WebElement.h:38
list table
Definition: asciidump.py:386
std::string get_url()
Definition: WebElement.h:32
tuple out
Definition: dbtoconf.py:99
std::string get_pix_top()
Definition: WebElement.h:37
static int position[264][3]
Definition: ReadPGInfo.cc:509

Member Data Documentation

std::string ConfigBox::callback
private

Definition at line 20 of file ConfigBox.h.

Referenced by ConfigBox().