PropertyPanel::PropertyPanel( QWidget* parent, const char* name, WFlags fl )
	: PropertyPanelBase( parent, name, fl ),
	  component(0L),
	  port(0L)
{
	setTitleFont();
	setTitleColors();
	connect( kapp, SIGNAL( kdisplayFontChanged() ),
			 this, SLOT( setTitleFont() ));
	connect( kapp, SIGNAL( kdisplayPaletteChanged() ),
			 this, SLOT( setTitleColors() ));
	connect( portValueGroup, SIGNAL( clicked(int) ),
			 this, SLOT( pvModeChanged(int) ));
	connect( constantValueEdit, SIGNAL( returnPressed() ),
			 this, SLOT( writePortProperties() ));
	connect( constantValueComboBox, SIGNAL( activated(int) ),
			 this, SLOT( writePortProperties() ));
	connect( portCombo, SIGNAL( activated(int) ),
			 this, SLOT( comboPortSelected(int) ));
	connect( connectButton, SIGNAL( clicked() ),
			 this, SLOT( connectButtonClicked() ));

	constantValueComboBox->hide();
	setEnabled( false );
	tipLabel->hide();
}
TouchScreenMenu::TouchScreenMenu(TouchScreenMenuItem items[], unsigned int fontSize, unsigned int spacing, unsigned int padding, Justify justify, char *title){
    _controller = &TSC;
    setSpacing(spacing);
    setPadding(padding);
    setFontSize(fontSize);
    setTitleFontSize(2);
    setJustification(justify);
    setItems(items);
    setTitle(title);
    setTitleColors(0xffff, 0x001f);
    setClearScreenOnDraw(false);
}
TouchScreenMenu::TouchScreenMenu(TouchScreenMenuItem items[]){
    _controller = &TSC;
    setSpacing(5);
    setPadding(2);
    setFontSize(2);
    setTitleFontSize(2);
    setJustification(LEFTJ);
    setItems(items);
    setTitle(NULL);
    setTitleColors(0xffff, 0x001f);
    setClearScreenOnDraw(false);
}
TouchScreenForm::TouchScreenForm(char *title, unsigned int titleForeColor, unsigned int titleBackColor, unsigned int titleFontSize){
    _controller = &TSC;
    setTitleSpacing(2);
    setTitlePadding(5);
    setTitleFontSize(titleFontSize);
    setTitle(title);
    setTitleColors(titleForeColor, titleBackColor);
    setClearScreenOnDraw(false);
    setLabels(NULL);
    setButtons(NULL);
    setCircleButtons(NULL);
    setArrowButtons(NULL);
    setSliders(NULL);
}
TouchScreenForm::TouchScreenForm(char *title){
    _controller = &TSC;
    setTitleSpacing(2);
    setTitlePadding(5);
    setTitleFontSize(2);
    setTitle(title);
    setTitleColors(0xffff, 0x001f);
    setClearScreenOnDraw(false);
    setLabels(NULL);
    setButtons(NULL);
    setCircleButtons(NULL);
    setArrowButtons(NULL);
    setSliders(NULL);
}