"SfR Fresh" - the SfR Freeware/Shareware Archive

Member "scribus-1.3.3.12/scribus/annot.cpp" of archive scribus-1.3.3.12.tar.gz:


As a special service "SfR Fresh" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.
    1 /*
    2 For general Scribus (>=1.3.2) copyright and licensing information please refer
    3 to the COPYING file provided with the program. Following this notice may exist
    4 a copyright and/or license notice that predates the release of Scribus 1.3.2
    5 for which a new license (GPL+exception) is in place.
    6 */
    7 #include "scfonts.h"
    8 #include "annot.h"
    9 #include "annot.moc"
   10 #include "editor.h"
   11 #include "selfield.h"
   12 #include "customfdialog.h"
   13 #include "buttonicon.h"
   14 #include "annotation.h"
   15 #include "mpalette.h"
   16 #include <qstringlist.h>
   17 #include <qdatetime.h>
   18 #include <qpixmap.h>
   19 #include "colorm.h"
   20 #include "prefsmanager.h"
   21 #include "prefsfile.h"
   22 #include "scimage.h"
   23 #include "pageitem.h"
   24 #include "navigator.h"
   25 #include "scribusview.h"
   26 #include "util.h"
   27 #include "prefscontext.h"
   28 #include "scribusstructs.h"
   29 #include "commonstrings.h"
   30 #include "sccombobox.h"
   31 #include "colorcombo.h"
   32 
   33 extern QPixmap loadIcon(QString nam);
   34 
   35 Annot::Annot(QWidget* parent, PageItem *it, int Seite, int b, int h, ColorList Farben, ScribusView* vie)
   36 		: QDialog( parent, "AN", true, 0 )
   37 {
   38 	setCaption( tr( "Field Properties" ) );
   39 	setIcon(loadIcon("AppIcon.png"));
   40 	item = it;
   41 	Breite = b;
   42 	Hoehe = h;
   43 	OriBreite = b;
   44 	OriHoehe = h;
   45 	view = vie;
   46 	MaxSeite = Seite;
   47 	QStringList tl;
   48 	dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
   49 	if ((item->annotation().ActionType() == 2) || (item->annotation().ActionType() == 7))
   50 	{
   51 		QString tm = item->annotation().Action();
   52 		tl = tl.split(" ", tm);
   53 	}
   54 	else
   55 	{
   56 		tl.append("0");
   57 		tl.append("0");
   58 	}
   59 
   60 	AnnotLayout = new QVBoxLayout( this );
   61 	AnnotLayout->setSpacing( 6 );
   62 	AnnotLayout->setMargin( 11 );
   63 
   64 	Layout1 = new QHBoxLayout;
   65 	Layout1->setSpacing( 6 );
   66 	Layout1->setMargin( 0 );
   67 
   68 	TextLabel1 = new QLabel( this, "TextLabel1" );
   69 	TextLabel1->setText( tr( "Type:" ) );
   70 	Layout1->addWidget( TextLabel1 );
   71 
   72 	ComboBox1 = new QComboBox( true, this, "ComboBox1" );
   73 	QString tmp[] = { tr("Button"), tr("Text Field"), tr("Check Box"), tr("Combo Box"), tr("List Box")};
   74 	size_t array = sizeof(tmp) / sizeof(*tmp);
   75 	for (uint a = 0; a < array; ++a)
   76 		ComboBox1->insertItem(tmp[a]);
   77 	ComboBox1->setEditable(false);
   78 	Layout1->addWidget( ComboBox1 );
   79 	AnnotLayout->addLayout( Layout1 );
   80 	ComboBox1->setCurrentItem(item->annotation().Type()-2);
   81 
   82 	Fram = new QWidgetStack(this);
   83 	AnnotLayout->addWidget( Fram );
   84 
   85 	GroupBox10 = new QGroupBox( this, "GroupBox1" );
   86 	GroupBox10->setGeometry( QRect( 11, 41, 360, 350 ) );
   87 	GroupBox10->setTitle( tr( "Properties" ) );
   88 	GroupBox10->setColumnLayout(0, Qt::Vertical );
   89 	GroupBox10->layout()->setSpacing( 5 );
   90 	GroupBox10->layout()->setMargin( 10 );
   91 	GroupBox10Layout = new QVBoxLayout( GroupBox10->layout() );
   92 	GroupBox10Layout->setAlignment( Qt::AlignTop );
   93 
   94 	Layout60 = new QGridLayout( 0, 1, 1, 0, 5, "Layout6");
   95 	TextLabel20 = new QLabel( GroupBox10, "TextLabel2" );
   96 	TextLabel20->setText( tr( "Name:" ) );
   97 	Layout60->addWidget( TextLabel20, 0, 0 );
   98 
   99 	Tip = new QLineEdit( GroupBox10, "Tip" );
  100 	Tip->setText(item->annotation().ToolTip());
  101 	Layout60->addWidget( Tip, 1, 1 );
  102 
  103 	Name = new NameWidget(GroupBox10);
  104 	Name->setText(item->itemName());
  105 	Layout60->addWidget( Name, 0, 1 );
  106 	OldName = item->itemName();
  107 
  108 	TextLabel30 = new QLabel( GroupBox10, "TextLabel3" );
  109 	TextLabel30->setText( tr( "Tool-Tip:" ) );
  110 	Layout60->addWidget( TextLabel30, 1, 0);
  111 	GroupBox10Layout->addLayout( Layout60 );
  112 
  113 	TabWidget2 = new QTabWidget( GroupBox10, "TabWidget2" );
  114 
  115 	tab = new QWidget( TabWidget2, "tab" );
  116 	tabLayout = new QVBoxLayout( tab, 10, 5, "tabLayout");
  117 
  118 	GroupBox40 = new QGroupBox( tab, "GroupBox40" );
  119 	GroupBox40->setTitle( tr( "Text" ) );
  120 	GroupBox40->setColumnLayout(0, Qt::Vertical );
  121 	GroupBox40->layout()->setSpacing( 5 );
  122 	GroupBox40->layout()->setMargin( 10 );
  123 	GroupBox40Layout = new QGridLayout( GroupBox40->layout() );
  124 	GroupBox40Layout->setAlignment( Qt::AlignTop );
  125 	TextLabel60 = new QLabel( GroupBox40, "TextLabel6" );
  126 	TextLabel60->setText( tr( "Font for use with PDF 1.3:" ) );
  127 	GroupBox40Layout->addWidget( TextLabel60, 0, 0 );
  128 	Schrift = new QComboBox( true, GroupBox40, "Schrift" );
  129 	/* PFJ - 28/02/04 - Altered from char* to QString. Renamed to fonts and the
  130 	                    loop changed from uint to int and the name to propogate */
  131 	/* FS - 08.03.04 - loop variable must be uint otherwise you get a compiler warning */
  132 	QString fonts[]={"Courier", "Courier Bold", "Courier Italic",
  133 	                 "Courier Bold Italic", "Helvetica",
  134 	                 "Helvetica Bold", "Helvetica Italic", "Helvetica Bold Italic",
  135 	                 "Times", "Times Bold",
  136 	                 "Times Italic", "Times Bold Italic", "Zapf Dingbats",
  137 	                 "Symbols"};
  138 	size_t fontsArray = sizeof(fonts) / sizeof(*fonts);
  139 	for (uint propogate = 0; propogate < fontsArray; ++propogate)
  140 		Schrift->insertItem(fonts[propogate]);
  141 	Schrift->setEditable(false);
  142 	Schrift->setCurrentItem(item->annotation().Font());
  143 	GroupBox40Layout->addMultiCellWidget( Schrift, 0, 0, 1, 2);
  144 	tabLayout->addWidget( GroupBox40 );
  145 
  146 	Layout10 = new QHBoxLayout( 0, 0, 5, "Layout1");
  147 	GroupBox20 = new QGroupBox( tab, "GroupBox2" );
  148 	GroupBox20->setTitle( tr( "Border" ) );
  149 	GroupBox20->setColumnLayout(0, Qt::Vertical );
  150 	GroupBox20->layout()->setSpacing( 5 );
  151 	GroupBox20->layout()->setMargin( 10 );
  152 	GroupBox20Layout = new QGridLayout( GroupBox20->layout() );
  153 	GroupBox20Layout->setAlignment( Qt::AlignTop );
  154 	TextLabel40a = new QLabel( GroupBox20, "TextLabel4a" );
  155 	TextLabel40a->setText( tr( "Color:" ) );
  156 	GroupBox20Layout->addWidget( TextLabel40a, 0, 0 );
  157 	BorderC = new ColorCombo( true, GroupBox20, "BorderC" );
  158 	ColorList::Iterator cit;
  159 	BorderC->insertItem(CommonStrings::NoneColor);
  160 	if (item->annotation().borderColor() == CommonStrings::None)
  161 		BorderC->setCurrentItem(BorderC->count()-1);
  162 	for (cit = Farben.begin(); cit != Farben.end(); ++cit)
  163 	{
  164 		BorderC->insertSmallItem(Farben[cit.key()], cit.key());
  165 		if (cit.key() == item->annotation().borderColor())
  166 			BorderC->setCurrentItem(BorderC->count()-1);
  167 	}
  168 	BorderC->setEditable(false);
  169 	GroupBox20Layout->addWidget( BorderC, 0, 1 );
  170 	TextLabel40 = new QLabel( GroupBox20, "TextLabel4" );
  171 	TextLabel40->setText( tr( "Width:" ) );
  172 	GroupBox20Layout->addWidget( TextLabel40, 1, 0 );
  173 	BorderW = new QComboBox( true, GroupBox20, "BorderW" );
  174 	// PFJ - 28/02/04 - Altered to the QString/size_t/for style
  175 	QString borders[] = {CommonStrings::NoneColor, tr("Thin"), tr("Normal"), tr("Wide")};
  176 	size_t bordersArray = sizeof(borders) / sizeof(*borders);
  177 	for (uint propogate = 0; propogate < bordersArray; ++propogate)
  178 		BorderW->insertItem(borders[propogate]);
  179 	BorderW->setEditable(false);
  180 	BorderW->setCurrentItem(item->annotation().Bwid());
  181 	GroupBox20Layout->addWidget( BorderW, 1, 1 );
  182 	TextLabel50 = new QLabel( GroupBox20, "TextLabel5" );
  183 	TextLabel50->setText( tr( "Style:" ) );
  184 	GroupBox20Layout->addWidget( TextLabel50, 2, 0 );
  185 	BorderS = new QComboBox( true, GroupBox20, "BorderS" );
  186 	/* PFJ - 28/02/04 - Altered to the QString/size_t/for style */
  187 	QString borders2[] = {tr("Solid"), tr("Dashed"), tr("Underline"),
  188 	                      tr("Beveled"), tr("Inset")};
  189 	size_t borders2Array = sizeof(borders2) / sizeof(*borders2);
  190 	for (uint propogate = 0; propogate < borders2Array; ++propogate)
  191 		BorderS->insertItem(borders2[propogate]);
  192 	BorderS->setEditable(false);
  193 	BorderS->setCurrentItem(item->annotation().Bsty());
  194 	GroupBox20Layout->addWidget( BorderS, 2, 1 );
  195 	Layout10->addWidget( GroupBox20 );
  196 
  197 	GroupBox30 = new QGroupBox( tab, "GroupBox3" );
  198 	GroupBox30->setTitle( tr( "Other" ) );
  199 	GroupBox30->setColumnLayout(0, Qt::Vertical );
  200 	GroupBox30->layout()->setSpacing( 5 );
  201 	GroupBox30->layout()->setMargin( 10 );
  202 	GroupBox30Layout = new QGridLayout( GroupBox30->layout() );
  203 	GroupBox30Layout->setAlignment( Qt::AlignTop );
  204 	ReadOnly = new QCheckBox( GroupBox30, "ReadOnly" );
  205 	ReadOnly->setText( tr( "Read Only" ) );
  206 	if (item->annotation().Type() == 2)
  207 		ReadOnly->setEnabled(false);
  208 	ReadOnly->setChecked(item->annotation().Flag() & 1);
  209 	GroupBox30Layout->addMultiCellWidget( ReadOnly, 0, 0, 0, 1 );
  210 	Required = new QCheckBox( GroupBox30, "ReadOnly" );
  211 	Required->setText( tr( "Required" ) );
  212 	if (item->annotation().Type() == 2)
  213 		Required->setEnabled(false);
  214 	Required->setChecked(item->annotation().Flag() & 2);
  215 	GroupBox30Layout->addMultiCellWidget( Required, 1, 1, 0, 1 );
  216 	NoExport = new QCheckBox( GroupBox30, "NoExport" );
  217 	NoExport->setText( tr( "Don't Export Value" ) );
  218 	if (item->annotation().Type() == 2)
  219 		NoExport->setEnabled(false);
  220 	NoExport->setChecked(item->annotation().Flag() & 4);
  221 	GroupBox30Layout->addMultiCellWidget( NoExport, 2, 2, 0, 1 );
  222 	TextLabel90 = new QLabel( GroupBox30, "TextLabel9" );
  223 	TextLabel90->setText( tr( "Visibility:" ) );
  224 	GroupBox30Layout->addWidget( TextLabel90, 3, 0 );
  225 	Visib = new QComboBox( true, GroupBox30, "Visib" );
  226 	/* PFJ - 28/02/04 - Altered to the QString/size_t/for style */
  227 	QString visible[] = {tr("Visible"), tr("Hidden"), tr("No Print"),
  228 	                     tr("No View")};
  229 	size_t visibleArray = sizeof(visible) / sizeof(*visible);
  230 	for (uint propogate = 0; propogate < visibleArray; ++propogate)
  231 		Visib->insertItem(visible[propogate]);
  232 	Visib->setEditable(false);
  233 	Visib->setCurrentItem(item->annotation().Vis());
  234 	GroupBox30Layout->addWidget( Visib, 3, 1 );
  235 	Layout10->addWidget( GroupBox30 );
  236 	tabLayout->addLayout( Layout10 );
  237 	TabWidget2->insertTab( tab, tr( "Appearance" ) );
  238 
  239 	tab_3 = new QWidget( TabWidget2, "tab_3" );
  240 	tabLayout_3 = new QVBoxLayout( tab_3, 11, 6, "tabLayout_3");
  241 	FramOp = new QWidgetStack(tab_3);
  242 	Frame4a = new QGroupBox( tab_3, "GroupBox1" );
  243 	Frame4a->setTitle("");
  244 	Frame4a->setFrameShape( QFrame::NoFrame );
  245 	Frame4a->setColumnLayout(0, Qt::Vertical );
  246 	Frame4a->layout()->setSpacing( 0 );
  247 	Frame4a->layout()->setMargin( 0 );
  248 	Frame4aLayout = new QGridLayout( Frame4a->layout());
  249 	GroupBox40a = new QGroupBox( Frame4a, "GroupBox40" );
  250 	GroupBox40a->setTitle( tr( "Text" ) );
  251 	GroupBox40a->setColumnLayout(0, Qt::Vertical );
  252 	GroupBox40a->layout()->setSpacing( 5 );
  253 	GroupBox40a->layout()->setMargin( 10 );
  254 	GroupBox40aLayout = new QGridLayout( GroupBox40a->layout() );
  255 	GroupBox40aLayout->setAlignment( Qt::AlignTop );
  256 	CheckBox30 = new QLabel( GroupBox40a, "CheckBox3" );
  257 	CheckBox30->setText( tr( "Text for Button Down" ) );
  258 	GroupBox40aLayout->addMultiCellWidget( CheckBox30, 0, 0, 0, 1 );
  259 	CheckBox40 = new QLabel( GroupBox40a, "CheckBox4" );
  260 	CheckBox40->setText( tr( "Text for Roll Over" ) );
  261 	GroupBox40aLayout->addMultiCellWidget( CheckBox40, 1, 1, 0, 1 );
  262 	DownT = new QLineEdit( GroupBox40a, "DownT" );
  263 	DownT->setText(item->annotation().Down());
  264 	GroupBox40aLayout->addWidget( DownT, 0, 2 );
  265 	TextO = new QLineEdit( GroupBox40a, "TextO" );
  266 	TextO->setText(item->annotation().RollOver());
  267 	GroupBox40aLayout->addWidget( TextO, 1, 2 );
  268 	Frame4aLayout->addMultiCellWidget( GroupBox40a, 0, 0, 0, 1 );
  269 
  270 	OptIcons = new QGroupBox( Frame4a, "OptIcons" );
  271 	OptIcons->setTitle( tr( "Icons" ) );
  272 	OptIcons->setColumnLayout(0, Qt::Vertical );
  273 	OptIcons->layout()->setSpacing( 6 );
  274 	OptIcons->layout()->setMargin( 11 );
  275 	OptIconsLayout = new QVBoxLayout( OptIcons->layout() );
  276 	OptIconsLayout->setAlignment( Qt::AlignTop );
  277 	UseIcons = new QCheckBox(OptIcons, "UIc");
  278 	UseIcons->setText( tr("Use Icons"));
  279 	UseIcons->setChecked(item->annotation().UseIcons());
  280 	OptIconsLayout->addWidget(UseIcons);
  281 	Layout17 = new QHBoxLayout( 0, 0, 6, "Layout17");
  282 
  283 	Layout14 = new QGridLayout( 0, 0, 6, "Layout14");
  284 	IconN = new QPushButton( OptIcons, "IconN" );
  285 	IconN->setText( tr( "Normal" ) );
  286 	Layout14->addMultiCellWidget( IconN, 0, 0, 0, 2);
  287 	NiconPrev = new QLabel( OptIcons, "NiconPrev" );
  288 	NiconPrev->setMinimumSize( QSize( 25, 25 ) );
  289 	NiconPrev->setMaximumSize( QSize( 25, 25 ) );
  290 	NiconPrev->setFrameShape( QLabel::Panel );
  291 	NiconPrev->setFrameShadow( QLabel::Raised );
  292 	NiconPrev->setScaledContents( true );
  293 	Layout14->addWidget( NiconPrev, 1, 1 );
  294 	IconNR = new QPushButton( OptIcons, "IconNr" );
  295 	IconNR->setText( tr( "Remove" ) );
  296 	Layout14->addMultiCellWidget( IconNR, 2, 2, 0, 2);
  297 	Layout17->addLayout( Layout14 );
  298 
  299 	Layout15 = new QGridLayout( 0, 0, 6, "Layout15");
  300 	IconP = new QPushButton( OptIcons, "IconP" );
  301 	IconP->setText( tr( "Pressed" ) );
  302 	Layout15->addMultiCellWidget( IconP, 0, 0, 0, 2 );
  303 	PiconPrev = new QLabel( OptIcons, "PiconPrev" );
  304 	PiconPrev->setMinimumSize( QSize( 25, 25 ) );
  305 	PiconPrev->setMaximumSize( QSize( 25, 25 ) );
  306 	PiconPrev->setFrameShape( QLabel::Panel );
  307 	PiconPrev->setFrameShadow( QLabel::Raised );
  308 	PiconPrev->setScaledContents( true );
  309 	Layout15->addWidget( PiconPrev, 1, 1 );
  310 	IconPR = new QPushButton( OptIcons, "Iconrr" );
  311 	IconPR->setText( tr( "Remove" ) );
  312 	Layout15->addMultiCellWidget( IconPR, 2, 2, 0, 2);
  313 	Layout17->addLayout( Layout15 );
  314 
  315 	Layout16 = new QGridLayout( 0, 0, 6, "Layout16");
  316 	IconR = new QPushButton( OptIcons, "IconR" );
  317 	IconR->setText( tr( "Roll Over" ) );
  318 	Layout16->addMultiCellWidget( IconR, 0, 0, 0, 2 );
  319 	RiconPrev = new QLabel( OptIcons, "RiconPrev" );
  320 	RiconPrev->setMinimumSize( QSize( 25, 25 ) );
  321 	RiconPrev->setMaximumSize( QSize( 25, 25 ) );
  322 	RiconPrev->setFrameShape( QLabel::Panel );
  323 	RiconPrev->setFrameShadow( QLabel::Raised );
  324 	RiconPrev->setScaledContents( true );
  325 	Layout16->addWidget( RiconPrev, 1, 1 );
  326 	IconRR = new QPushButton( OptIcons, "IconrNr" );
  327 	IconRR->setText( tr( "Remove" ) );
  328 	Layout16->addMultiCellWidget( IconRR, 2, 2, 0, 2);
  329 	Layout17->addLayout( Layout16 );
  330 	OptIconsLayout->addLayout( Layout17 );
  331 
  332 	Layout18 = new QHBoxLayout( 0, 0, 6, "Layout18");
  333 	PlaceIcon = new QPushButton( OptIcons, "PlaceIcon" );
  334 	PlaceIcon->setText( tr( "Icon Placement..." ) );
  335 	Layout18->addWidget( PlaceIcon );
  336 	QSpacerItem* spacer_2x = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
  337 	Layout18->addItem( spacer_2x );
  338 	OptIconsLayout->addLayout( Layout18 );
  339 	IconNR->setEnabled(false);
  340 	IconPR->setEnabled(false);
  341 	IconRR->setEnabled(false);
  342 	if (!UseIcons->isChecked())
  343 	{
  344 		IconN->setEnabled(false);
  345 		IconP->setEnabled(false);
  346 		IconR->setEnabled(false);
  347 		NiconPrev->setEnabled(false);
  348 		PiconPrev->setEnabled(false);
  349 		RiconPrev->setEnabled(false);
  350 		PlaceIcon->setEnabled(false);
  351 	}
  352 	else
  353 	{
  354 		QPixmap pmI1;
  355 		ScImage im;
  356 		if (!item->Pfile.isEmpty())
  357 		{
  358 			im.LoadPicture(item->Pfile, "", 0, false, false, ScImage::RGBData, 72);
  359 			pmI1.convertFromImage(im);
  360 			NiconPrev->setPixmap(pmI1);
  361 			IconNR->setEnabled(true);
  362 		}
  363 		if (!item->Pfile2.isEmpty())
  364 		{
  365 			im.LoadPicture(item->Pfile2, "", 0, false, false, ScImage::RGBData, 72);
  366 			pmI1.convertFromImage(im);
  367 			PiconPrev->setPixmap(pmI1);
  368 			IconPR->setEnabled(true);
  369 		}
  370 		if (!item->Pfile3.isEmpty())
  371 		{
  372 			im.LoadPicture(item->Pfile3, "", 0, false, false, ScImage::RGBData, 72);
  373 			pmI1.convertFromImage(im);
  374 			RiconPrev->setPixmap(pmI1);
  375 			IconRR->setEnabled(true);
  376 		}
  377 	}
  378 	Frame4aLayout->addWidget( OptIcons, 1, 0 );
  379 
  380 	GroupBox30a = new QGroupBox( Frame4a, "GroupBox3" );
  381 	GroupBox30a->setTitle( tr( "Highlight" ) );
  382 	GroupBox30a->setColumnLayout(0, Qt::Vertical );
  383 	GroupBox30a->layout()->setSpacing( 5 );
  384 	GroupBox30a->layout()->setMargin( 10 );
  385 	GroupBox30aLayout = new QGridLayout( GroupBox30a->layout() );
  386 	GroupBox30aLayout->setAlignment( Qt::AlignTop );
  387 	ComboBox7_2 = new QComboBox( true, GroupBox30a, "ComboBox7_2" );
  388 	// PFJ - 28/02/04 - Altered to QString/size_t/for style
  389 	QString combo[] = {tr("None", "highlight"), tr("Invert"), tr("Outlined"), tr("Push")};
  390 	size_t comboArray = sizeof(combo) / sizeof(*combo);
  391 	for (uint propogate = 0; propogate < comboArray; ++propogate)
  392 		ComboBox7_2->insertItem(combo[propogate]);
  393 	ComboBox7_2->setEditable(false);
  394 	ComboBox7_2->setCurrentItem(item->annotation().Feed());
  395 	GroupBox30aLayout->addWidget( ComboBox7_2, 0, 0 );
  396 	Frame4aLayout->addWidget( GroupBox30a, 1, 1 );
  397 	FramOp->addWidget( Frame4a , 2);
  398 
  399 	OptTextFeld = new QGroupBox( tab_3, "OptTextFeld" );
  400 	OptTextFeld->setTitle( "" );
  401 	OptTextFeld->setColumnLayout(0, Qt::Vertical );
  402 	OptTextFeld->layout()->setSpacing( 6 );
  403 	OptTextFeld->layout()->setMargin( 11 );
  404 	OptTextFeldLayout = new QVBoxLayout( OptTextFeld->layout() );
  405 	OptTextFeldLayout->setAlignment( Qt::AlignTop );
  406 	MultiL = new QCheckBox( OptTextFeld, "MultiL" );
  407 	MultiL->setText( tr( "Multi-Line" ) );
  408 	MultiL->setChecked(item->annotation().Flag() & 4096);
  409 	OptTextFeldLayout->addWidget( MultiL );
  410 	Passwd = new QCheckBox( OptTextFeld, "Passwd" );
  411 	Passwd->setText( tr( "Password" ) );
  412 	Passwd->setChecked(item->annotation().Flag() & 8192);
  413 	OptTextFeldLayout->addWidget( Passwd );
  414 	Layout8 = new QHBoxLayout( 0, 0, 5, "Layout8");
  415 	Limit = new QCheckBox( OptTextFeld, "Limit" );
  416 	Limit->setText( tr( "Limit of" ) );
  417 	Layout8->addWidget( Limit );
  418 	MaxChars = new QSpinBox( OptTextFeld, "MaxChars" );
  419 	MaxChars->setMinValue(0);
  420 	MaxChars->setMaxValue(32768);
  421 	bool setter = item->annotation().MaxChar() != -1 ? true : false;
  422 	MaxChars->setValue(setter == true ? item->annotation().MaxChar() : 0);
  423 	Limit->setChecked(setter);
  424 	MaxChars->setEnabled(setter);
  425 	Layout8->addWidget( MaxChars );
  426 	TextLabel2_2 = new QLabel( OptTextFeld, "TextLabel2_2" );
  427 	TextLabel2_2->setText( tr( "Characters" ) );
  428 	Layout8->addWidget( TextLabel2_2 );
  429 	QSpacerItem* spacer_2 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
  430 	Layout8->addItem( spacer_2 );
  431 	OptTextFeldLayout->addLayout( Layout8 );
  432 	NoScroll = new QCheckBox( OptTextFeld, "ncs" );
  433 	NoScroll->setText( tr( "Do Not Scroll" ) );
  434 	NoScroll->setChecked(item->annotation().Flag() & 8388608);
  435 	OptTextFeldLayout->addWidget( NoScroll );
  436 	NoSpell = new QCheckBox( OptTextFeld, "nsp" );
  437 	NoSpell->setText( tr( "Do Not Spell Check" ) );
  438 	NoSpell->setChecked(item->annotation().Flag() & 4194304);
  439 	OptTextFeldLayout->addWidget( NoSpell );
  440 	FramOp->addWidget( OptTextFeld , 3);
  441 
  442 	OptCheck = new QGroupBox( tab_3, "OptCheck" );
  443 	OptCheck->setTitle( "" );
  444 	OptCheck->setColumnLayout(0, Qt::Vertical );
  445 	OptCheck->layout()->setSpacing( 6 );
  446 	OptCheck->layout()->setMargin( 11 );
  447 	OptCheckLayout = new QVBoxLayout( OptCheck->layout() );
  448 	OptCheckLayout->setAlignment( Qt::AlignTop );
  449 	ChkLayout = new QHBoxLayout( 0, 0, 5, "ChkLayout");
  450 	CText1 = new QLabel( OptCheck, "CText1" );
  451 	CText1->setText( tr( "Check Style:" ) );
  452 	ChkLayout->addWidget( CText1 );
  453 	ChkStil = new QComboBox( true, OptCheck, "ChkStil" );
  454 	QString tmp_chkstil2[]={ tr("Check"), tr("Cross"), tr("Diamond"), tr("Circle"), tr("Star"), tr("Square")};
  455 	size_t array_chk2 = sizeof(tmp_chkstil2) / sizeof(*tmp_chkstil2);
  456 	/* PFJ - 28/02/04 - Altered from uint to int and altered var name */
  457 	for (uint propogate = 0; propogate < array_chk2; ++propogate)
  458 		ChkStil->insertItem(tmp_chkstil2[propogate]);
  459 
  460 	ChkStil->setEditable(false);
  461 	ChkStil->setCurrentItem(item->annotation().ChkStil());
  462 	ChkLayout->addWidget( ChkStil );
  463 	QSpacerItem* spacerC = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
  464 	ChkLayout->addItem( spacerC );
  465 	OptCheckLayout->addLayout( ChkLayout );
  466 
  467 	isChkd = new QCheckBox( OptCheck, "isChkd" );
  468 	isChkd->setText( tr( "Default is Checked" ) );
  469 	isChkd->setChecked(item->annotation().IsChk());
  470 	OptCheckLayout->addWidget( isChkd );
  471 	FramOp->addWidget( OptCheck, 4);
  472 
  473 	OptCombo = new QGroupBox( tab_3, "OptCombo" );
  474 	OptCombo->setTitle( "" );
  475 	OptCombo->setColumnLayout(0, Qt::Vertical );
  476 	OptCombo->layout()->setSpacing( 6 );
  477 	OptCombo->layout()->setMargin( 11 );
  478 	OptComboLayout = new QVBoxLayout( OptCombo->layout() );
  479 	OptComboLayout->setAlignment( Qt::AlignTop );
  480 	CanEdit = new QCheckBox( OptCombo, "isEdit" );
  481 	CanEdit->setText( tr( "Editable" ) );
  482 	CanEdit->setChecked(item->annotation().Flag() & 262144);
  483 	OptComboLayout->addWidget( CanEdit );
  484 	FramOp->addWidget( OptCombo, 5);
  485 
  486 	tabLayout_3->addWidget( FramOp );
  487 
  488 	TabWidget2->insertTab( tab_3, tr( "Options" ) );
  489 
  490 	tab_2 = new QWidget( TabWidget2, "tab_2" );
  491 	tabLayout_2 = new QVBoxLayout( tab_2, 11, 6, "tabLayout_2");
  492 
  493 	Layout20 = new QHBoxLayout( 0, 0, 5, "Layout2");
  494 
  495 	TextLabel70 = new QLabel( tab_2, "TextLabel7" );
  496 	TextLabel70->setText( tr( "Type:" ) );
  497 	Layout20->addWidget( TextLabel70 );
  498 
  499 	ActionCombo = new QComboBox( true, tab_2, "ActTyp" );
  500 	QString tmp_actcom[] = {tr("None", "action"), tr("JavaScript"), tr("Go To"),
  501 	                        tr("Submit Form"), tr("Reset Form"), tr("Import Data")};
  502 	size_t array_act = sizeof(tmp_actcom) / sizeof(*tmp_actcom);
  503 	/* PFJ - 28/02/04 - Altered from uint to int and var name */
  504 	for (uint propogate = 0; propogate < array_act; ++propogate)
  505 		ActionCombo->insertItem(tmp_actcom[propogate]);
  506 	ActionCombo->setEditable(false);
  507 	int tmpac = item->annotation().ActionType();
  508 	if (item->annotation().ActionType() < 0)
  509 		tmpac = 1;
  510 	ActionCombo->setCurrentItem(tmpac == 7 ? 2 : tmpac);
  511 
  512 	Layout20->addWidget( ActionCombo );
  513 	tabLayout_2->addLayout( Layout20 );
  514 
  515 	Fram2 = new QWidgetStack(tab_2);
  516 	tabLayout_2->addWidget( Fram2 );
  517 
  518 	Frame4 = new QFrame( tab_2, "Frame4" );
  519 	Frame4->setFrameShape( QFrame::NoFrame );
  520 	Frame4->setFrameShadow( QFrame::Raised );
  521 	Fram2->addWidget( Frame4 ,