00001
00002
00003
00004
00005
00006
00007 #include "annot.h"
00008
00009 #include <QHBoxLayout>
00010 #include <QGridLayout>
00011 #include <QVBoxLayout>
00012 #include <QStackedWidget>
00013 #include <QGroupBox>
00014 #include <QTextEdit>
00015 #include <QLabel>
00016 #include <QFrame>
00017 #include <QComboBox>
00018 #include <QLineEdit>
00019 #include <QCheckBox>
00020 #include <QPushButton>
00021 #include <QSpinBox>
00022 #include <QTabWidget>
00023 #include <QWidget>
00024 #include <QRadioButton>
00025 #include <QList>
00026 #include <QStringList>
00027 #include <QSpacerItem>
00028 #include <QToolTip>
00029 #include <QDateTime>
00030 #include <QPixmap>
00031
00032 #include "annotation.h"
00033 #include "buttonicon.h"
00034 #include "cmsettings.h"
00035 #include "colorcombo.h"
00036 #include "colorlistbox.h"
00037 #include "commonstrings.h"
00038 #include "customfdialog.h"
00039 #include "editor.h"
00040 #include "propertiespalette.h"
00041 #include "navigator.h"
00042 #include "pageitem.h"
00043 #include "prefscontext.h"
00044 #include "prefsfile.h"
00045 #include "prefsmanager.h"
00046 #include "sccombobox.h"
00047 #include "scfonts.h"
00048 #include "scimage.h"
00049 #include "scribusstructs.h"
00050 #include "scribusview.h"
00051 #include "selfield.h"
00052 #include "util_formats.h"
00053 #include "util_icon.h"
00054 #include "util.h"
00055
00056 Annot::Annot(QWidget* parent, PageItem *it, int Seite, int b, int h, ColorList Farben, ScribusView* vie)
00057 : QDialog( parent )
00058 {
00059 ScribusDoc* doc = Farben.document();
00060 setModal(true);
00061 setWindowTitle( tr( "Field Properties" ) );
00062 setWindowIcon(QIcon(loadIcon ( "AppIcon.png" )));
00063 item = it;
00064 Breite = b;
00065 Hoehe = h;
00066 OriBreite = b;
00067 OriHoehe = h;
00068 view = vie;
00069 MaxSeite = Seite;
00070 QStringList tl;
00071 dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
00072 if ((item->annotation().ActionType() == 2) || (item->annotation().ActionType() == 7))
00073 {
00074 QString tm = item->annotation().Action();
00075 tl = tm.split(" ", QString::SkipEmptyParts);
00076 }
00077 else
00078 {
00079 tl.append("0");
00080 tl.append("0");
00081 }
00082
00083 AnnotLayout = new QVBoxLayout( this );
00084 AnnotLayout->setSpacing( 5 );
00085 AnnotLayout->setMargin( 10 );
00086
00087 Layout1 = new QHBoxLayout;
00088 Layout1->setSpacing( 5 );
00089 Layout1->setMargin( 0 );
00090
00091 TextLabel1 = new QLabel( this );
00092 TextLabel1->setText( tr( "Type:" ) );
00093 Layout1->addWidget( TextLabel1 );
00094
00095 ComboBox1 = new QComboBox( this );
00096 QString tmp[] = { tr("Button"), tr("Text Field"), tr("Check Box"), tr("Combo Box"), tr("List Box")};
00097 size_t array = sizeof(tmp) / sizeof(*tmp);
00098 for (uint a = 0; a < array; ++a)
00099 ComboBox1->addItem(tmp[a]);
00100 ComboBox1->setEditable(false);
00101 Layout1->addWidget( ComboBox1 );
00102 AnnotLayout->addLayout( Layout1 );
00103 ComboBox1->setCurrentIndex(item->annotation().Type()-2);
00104
00105 Fram = new QStackedWidget(this);
00106 AnnotLayout->addWidget( Fram );
00107
00108 GroupBox10 = new QGroupBox( this );
00109
00110
00111 GroupBox10->setTitle( tr( "Properties" ) );
00112 GroupBox10Layout = new QVBoxLayout( GroupBox10 );
00113 GroupBox10Layout->setSpacing( 5 );
00114 GroupBox10Layout->setMargin( 10 );
00115 GroupBox10Layout->setAlignment( Qt::AlignTop );
00116
00117 Layout60 = new QGridLayout;
00118 Layout60->setSpacing( 5 );
00119 Layout60->setMargin( 0 );
00120 TextLabel20 = new QLabel( GroupBox10 );
00121 TextLabel20->setText( tr( "Name:" ) );
00122 Layout60->addWidget( TextLabel20, 0, 0 );
00123
00124 Tip = new QLineEdit( GroupBox10 );
00125 Tip->setText(item->annotation().ToolTip());
00126 Layout60->addWidget( Tip, 1, 1 );
00127
00128 Name = new NameWidget(GroupBox10);
00129 Name->setText(item->itemName());
00130 Layout60->addWidget( Name, 0, 1 );
00131 OldName = item->itemName();
00132
00133 TextLabel30 = new QLabel( GroupBox10 );
00134 TextLabel30->setText( tr( "Tooltip:" ) );
00135 Layout60->addWidget( TextLabel30, 1, 0);
00136 GroupBox10Layout->addLayout( Layout60 );
00137
00138 TabWidget2 = new QTabWidget( GroupBox10 );
00139
00140 tab = new QWidget( TabWidget2 );
00141 tabLayout = new QVBoxLayout(tab);
00142 tabLayout->setSpacing( 5 );
00143 tabLayout->setMargin( 10 );
00144
00145 GroupBox40 = new QGroupBox( tab );
00146 GroupBox40->setTitle( tr( "Text" ) );
00147 GroupBox40Layout = new QGridLayout( GroupBox40 );
00148 GroupBox40Layout->setSpacing( 5 );
00149 GroupBox40Layout->setMargin( 10 );
00150 GroupBox40Layout->setAlignment( Qt::AlignTop );
00151 TextLabel60 = new QLabel( GroupBox40 );
00152 TextLabel60->setText( tr( "Font for use with PDF 1.3:" ) );
00153 GroupBox40Layout->addWidget( TextLabel60, 0, 0 );
00154 Schrift = new QComboBox(GroupBox40);
00155
00156
00157
00158 QString fonts[]={"Courier", "Courier Bold", "Courier Italic",
00159 "Courier Bold Italic", "Helvetica",
00160 "Helvetica Bold", "Helvetica Italic", "Helvetica Bold Italic",
00161 "Times", "Times Bold",
00162 "Times Italic", "Times Bold Italic", "Zapf Dingbats",
00163 "Symbols"};
00164 size_t fontsArray = sizeof(fonts) / sizeof(*fonts);
00165 for (uint propogate = 0; propogate < fontsArray; ++propogate)
00166 Schrift->addItem(fonts[propogate]);
00167 Schrift->setEditable(false);
00168 Schrift->setCurrentIndex(item->annotation().Font());
00169 GroupBox40Layout->addWidget( Schrift, 0, 1, 1, 2);
00170 tabLayout->addWidget( GroupBox40 );
00171
00172 Layout10 = new QHBoxLayout;
00173 Layout10->setSpacing( 5 );
00174 Layout10->setMargin( 0 );
00175 GroupBox20 = new QGroupBox( tab );
00176 GroupBox20->setTitle( tr( "Border" ) );
00177 GroupBox20Layout = new QGridLayout( GroupBox20 );
00178 GroupBox20Layout->setSpacing( 5 );
00179 GroupBox20Layout->setMargin( 10 );
00180 GroupBox20Layout->setAlignment( Qt::AlignTop );
00181 TextLabel40a = new QLabel( GroupBox20 );
00182 TextLabel40a->setText( tr( "Color:" ) );
00183 GroupBox20Layout->addWidget( TextLabel40a, 0, 0 );
00184 BorderC = new ColorCombo( true, GroupBox20);
00185 ColorList::Iterator cit;
00186 BorderC->addItem(CommonStrings::tr_NoneColor);
00187 if (item->annotation().borderColor() == CommonStrings::None)
00188 BorderC->setCurrentIndex(BorderC->count()-1);
00189 for (cit = Farben.begin(); cit != Farben.end(); ++cit)
00190 {
00191 BorderC->insertSmallItem(cit.value(), doc, cit.key());
00192 if (cit.key() == item->annotation().borderColor())
00193 BorderC->setCurrentIndex(BorderC->count()-1);
00194 }
00195 BorderC->setEditable(false);
00196 GroupBox20Layout->addWidget( BorderC, 0, 1 );
00197 TextLabel40 = new QLabel( GroupBox20 );
00198 TextLabel40->setText( tr( "Width:" ) );
00199 GroupBox20Layout->addWidget( TextLabel40, 1, 0 );
00200 BorderW = new QComboBox( GroupBox20 );
00201
00202 QString borders[] = {CommonStrings::tr_NoneColor, tr("Thin"), tr("Normal"), tr("Wide")};
00203 size_t bordersArray = sizeof(borders) / sizeof(*borders);
00204 for (uint propogate = 0; propogate < bordersArray; ++propogate)
00205 BorderW->addItem(borders[propogate]);
00206 BorderW->setEditable(false);
00207 BorderW->setCurrentIndex(item->annotation().Bwid());
00208 GroupBox20Layout->addWidget( BorderW, 1, 1 );
00209 TextLabel50 = new QLabel( GroupBox20 );
00210 TextLabel50->setText( tr( "Style:" ) );
00211 GroupBox20Layout->addWidget( TextLabel50, 2, 0 );
00212 BorderS = new QComboBox( GroupBox20 );
00213
00214 QString borders2[] = {tr("Solid"), tr("Dashed"), tr("Underline"),
00215 tr("Beveled"), tr("Inset")};
00216 size_t borders2Array = sizeof(borders2) / sizeof(*borders2);
00217 for (uint propogate = 0; propogate < borders2Array; ++propogate)
00218 BorderS->addItem(borders2[propogate]);
00219 BorderS->setEditable(false);
00220 BorderS->setCurrentIndex(item->annotation().Bsty());
00221 GroupBox20Layout->addWidget( BorderS, 2, 1 );
00222 Layout10->addWidget( GroupBox20 );
00223
00224 GroupBox30 = new QGroupBox( tab );
00225 GroupBox30->setTitle( tr( "Other" ) );
00226 GroupBox30Layout = new QGridLayout( GroupBox30 );
00227 GroupBox30Layout->setSpacing( 5 );
00228 GroupBox30Layout->setMargin( 10 );
00229 GroupBox30Layout->setAlignment( Qt::AlignTop );
00230 ReadOnly = new QCheckBox( GroupBox30 );
00231 ReadOnly->setText( tr( "Read Only" ) );
00232 if (item->annotation().Type() == 2)
00233 ReadOnly->setEnabled(false);
00234 ReadOnly->setChecked(item->annotation().Flag() & 1);
00235 GroupBox30Layout->addWidget( ReadOnly, 0, 0, 1, 2 );
00236 Required = new QCheckBox( GroupBox30 );
00237 Required->setText( tr( "Required" ) );
00238 if (item->annotation().Type() == 2)
00239 Required->setEnabled(false);
00240 Required->setChecked(item->annotation().Flag() & 2);
00241 GroupBox30Layout->addWidget( Required, 1, 0, 1, 2 );
00242 NoExport = new QCheckBox( GroupBox30 );
00243 NoExport->setText( tr( "Do Not Export Value" ) );
00244 if (item->annotation().Type() == 2)
00245 NoExport->setEnabled(false);
00246 NoExport->setChecked(item->annotation().Flag() & 4);
00247 GroupBox30Layout->addWidget( NoExport, 2, 0, 1, 2 );
00248 TextLabel90 = new QLabel( GroupBox30 );
00249 TextLabel90->setText( tr( "Visibility:" ) );
00250 GroupBox30Layout->addWidget( TextLabel90, 3, 0 );
00251 Visib = new QComboBox( GroupBox30 );
00252
00253 QString visible[] = {tr("Visible"), tr("Hidden"), tr("No Print"),
00254 tr("No View")};
00255 size_t visibleArray = sizeof(visible) / sizeof(*visible);
00256 for (uint propogate = 0; propogate < visibleArray; ++propogate)
00257 Visib->addItem(visible[propogate]);
00258 Visib->setEditable(false);
00259 Visib->setCurrentIndex(item->annotation().Vis());
00260 GroupBox30Layout->addWidget( Visib, 3, 1 );
00261 Layout10->addWidget( GroupBox30 );
00262 tabLayout->addLayout( Layout10 );
00263 TabWidget2->addTab( tab, tr( "Appearance" ) );
00264
00265 tab_3 = new QWidget( TabWidget2 );
00266 tabLayout_3 = new QVBoxLayout( tab_3 );
00267 tabLayout_3->setSpacing( 5 );
00268 tabLayout_3->setMargin( 10 );
00269 FramOp = new QStackedWidget(tab_3);
00270 Frame4a = new QFrame( tab_3 );
00271 Frame4aLayout = new QGridLayout( Frame4a );
00272 Frame4aLayout->setSpacing( 0 );
00273 Frame4aLayout->setMargin( 0 );
00274 GroupBox40a = new QGroupBox( Frame4a );
00275 GroupBox40a->setTitle( tr( "Text" ) );
00276 GroupBox40aLayout = new QGridLayout( GroupBox40a );
00277 GroupBox40aLayout->setSpacing( 5 );
00278 GroupBox40aLayout->setMargin( 10 );
00279 GroupBox40aLayout->setAlignment( Qt::AlignTop );
00280 CheckBox30 = new QLabel( GroupBox40a );
00281 CheckBox30->setText( tr( "Text for Button Down" ) );
00282 GroupBox40aLayout->addWidget( CheckBox30, 0, 0, 1, 2 );
00283 CheckBox40 = new QLabel( GroupBox40a );
00284 CheckBox40->setText( tr( "Text for Roll Over" ) );
00285 GroupBox40aLayout->addWidget( CheckBox40, 1, 0, 1, 2 );
00286 DownT = new QLineEdit( GroupBox40a );
00287 DownT->setText(item->annotation().Down());
00288 GroupBox40aLayout->addWidget( DownT, 0, 2 );
00289 TextO = new QLineEdit( GroupBox40a );
00290 TextO->setText(item->annotation().RollOver());
00291 GroupBox40aLayout->addWidget( TextO, 1, 2 );
00292 Frame4aLayout->addWidget( GroupBox40a, 0, 0, 1, 2 );
00293
00294 OptIcons = new QGroupBox( Frame4a );
00295 OptIcons->setTitle( tr( "Icons" ) );
00296 OptIconsLayout = new QVBoxLayout( OptIcons );
00297 OptIconsLayout->setSpacing( 5 );
00298 OptIconsLayout->setMargin( 10 );
00299 OptIconsLayout->setAlignment( Qt::AlignTop );
00300 UseIcons = new QCheckBox(OptIcons);
00301 UseIcons->setText( tr("Use Icons"));
00302 UseIcons->setChecked(item->annotation().UseIcons());
00303 OptIconsLayout->addWidget(UseIcons);
00304 Layout17 = new QHBoxLayout;
00305 Layout17->setSpacing( 5 );
00306 Layout17->setMargin( 0 );
00307
00308 Layout14 = new QGridLayout;
00309 Layout14->setSpacing( 5 );
00310 Layout14->setMargin( 0 );
00311 IconN = new QPushButton( OptIcons );
00312 IconN->setText( tr( "Normal" ) );
00313 Layout14->addWidget( IconN, 0, 0, 1, 3);
00314 NiconPrev = new QLabel( OptIcons );
00315 NiconPrev->setMinimumSize( QSize( 25, 25 ) );
00316 NiconPrev->setMaximumSize( QSize( 25, 25 ) );
00317 NiconPrev->setFrameShape( QLabel::Panel );
00318 NiconPrev->setFrameShadow( QLabel::Raised );
00319 NiconPrev->setScaledContents( true );
00320 Layout14->addWidget( NiconPrev, 1, 1 );
00321 IconNR = new QPushButton( OptIcons );
00322 IconNR->setText( tr( "Remove" ) );
00323 Layout14->addWidget( IconNR, 2, 0, 1, 3);
00324 Layout17->addLayout( Layout14 );
00325
00326 Layout15 = new QGridLayout;
00327 Layout15->setSpacing( 5 );
00328 Layout15->setMargin( 0 );
00329 IconP = new QPushButton( OptIcons );
00330 IconP->setText( tr( "Pressed" ) );
00331 Layout15->addWidget( IconP, 0, 0, 1, 3 );
00332 PiconPrev = new QLabel( OptIcons );
00333 PiconPrev->setMinimumSize( QSize( 25, 25 ) );
00334 PiconPrev->setMaximumSize( QSize( 25, 25 ) );
00335 PiconPrev->setFrameShape( QLabel::Panel );
00336 PiconPrev->setFrameShadow( QLabel::Raised );
00337 PiconPrev->setScaledContents( true );
00338 Layout15->addWidget( PiconPrev, 1, 1 );
00339 IconPR = new QPushButton( OptIcons );
00340 IconPR->setText( tr( "Remove" ) );
00341 Layout15->addWidget( IconPR, 2, 0, 1, 3);
00342 Layout17->addLayout( Layout15 );
00343
00344 Layout16 = new QGridLayout;
00345 Layout16->setSpacing( 5 );
00346 Layout16->setMargin( 0 );
00347 IconR = new QPushButton( OptIcons );
00348 IconR->setText( tr( "Roll Over" ) );
00349 Layout16->addWidget( IconR, 0, 0, 1, 3 );
00350 RiconPrev = new QLabel( OptIcons );
00351 RiconPrev->setMinimumSize( QSize( 25, 25 ) );
00352 RiconPrev->setMaximumSize( QSize( 25, 25 ) );
00353 RiconPrev->setFrameShape( QLabel::Panel );
00354 RiconPrev->setFrameShadow( QLabel::Raised );
00355 RiconPrev->setScaledContents( true );
00356 Layout16->addWidget( RiconPrev, 1, 1 );
00357 IconRR = new QPushButton( OptIcons );
00358 IconRR->setText( tr( "Remove" ) );
00359 Layout16->addWidget( IconRR, 2, 0, 1, 3);
00360 Layout17->addLayout( Layout16 );
00361 OptIconsLayout->addLayout( Layout17 );
00362
00363 Layout18 = new QHBoxLayout;
00364 Layout18->setSpacing( 5 );
00365 Layout18->setMargin( 0 );
00366 PlaceIcon = new QPushButton( OptIcons );
00367 PlaceIcon->setText( tr( "Icon Placement..." ) );
00368 Layout18->addWidget( PlaceIcon );
00369 QSpacerItem* spacer_2x = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
00370 Layout18->addItem( spacer_2x );
00371 OptIconsLayout->addLayout( Layout18 );
00372 IconNR->setEnabled(false);
00373 IconPR->setEnabled(false);
00374 IconRR->setEnabled(false);
00375 if (!UseIcons->isChecked())
00376 {
00377 IconN->setEnabled(false);
00378 IconP->setEnabled(false);
00379 IconR->setEnabled(false);
00380 NiconPrev->setEnabled(false);
00381 PiconPrev->setEnabled(false);
00382 RiconPrev->setEnabled(false);
00383 PlaceIcon->setEnabled(false);
00384 }
00385 else
00386 {
00387 QPixmap pmI1;
00388 ScImage im;
00389 CMSettings cms(view->Doc, "", 0);
00390 if (!item->Pfile.isEmpty())
00391 {
00392 im.LoadPicture(item->Pfile, cms, false, false, ScImage::RGBData, 72);
00393 pmI1=QPixmap::fromImage(im.qImage());
00394 NiconPrev->setPixmap(pmI1);
00395 IconNR->setEnabled(true);
00396 }
00397 if (!item->Pfile2.isEmpty())
00398 {
00399 im.LoadPicture(item->Pfile2, cms, false, false, ScImage::RGBData, 72);
00400 pmI1=QPixmap::fromImage(im.qImage());
00401 PiconPrev->setPixmap(pmI1);
00402 IconPR->setEnabled(true);
00403 }
00404 if (!item->Pfile3.isEmpty())
00405 {
00406 im.LoadPicture(item->Pfile3, cms, false, false, ScImage::RGBData, 72);
00407 pmI1=QPixmap::fromImage(im.qImage());
00408 RiconPrev->setPixmap(pmI1);
00409 IconRR->setEnabled(true);
00410 }
00411 }
00412 Frame4aLayout->addWidget( OptIcons, 1, 0 );
00413
00414 GroupBox30a = new QGroupBox( Frame4a );
00415 GroupBox30a->setTitle( tr( "Highlight" ) );
00416 GroupBox30aLayout = new QGridLayout( GroupBox30a );
00417 GroupBox30aLayout->setSpacing( 5 );
00418 GroupBox30aLayout->setMargin( 10 );
00419 GroupBox30aLayout->setAlignment( Qt::AlignTop );
00420 ComboBox7_2 = new QComboBox(GroupBox30a);
00421
00422 QString combo[] = {tr("None", "highlight"), tr("Invert"), tr("Outlined"), tr("Push")};
00423 size_t comboArray = sizeof(combo) / sizeof(*combo);
00424 for (uint propogate = 0; propogate < comboArray; ++propogate)
00425 ComboBox7_2->addItem(combo[propogate]);
00426 ComboBox7_2->setEditable(false);
00427 ComboBox7_2->setCurrentIndex(item->annotation().Feed());
00428 GroupBox30aLayout->addWidget( ComboBox7_2, 0, 0 );
00429 Frame4aLayout->addWidget( GroupBox30a, 1, 1 );
00430 FramOp->addWidget( Frame4a );
00431
00432 OptTextFeld = new QGroupBox( tab_3 );
00433 OptTextFeld->setTitle( "" );
00434 OptTextFeldLayout = new QVBoxLayout( OptTextFeld );
00435 OptTextFeldLayout->setSpacing( 5 );
00436 OptTextFeldLayout->setMargin( 10 );
00437 OptTextFeldLayout->setAlignment( Qt::AlignTop );
00438 MultiL = new QCheckBox( OptTextFeld );
00439 MultiL->setText( tr( "Multi-Line" ) );
00440 MultiL->setChecked(item->annotation().Flag() & 4096);
00441 OptTextFeldLayout->addWidget( MultiL );
00442 Passwd = new QCheckBox( OptTextFeld );
00443 Passwd->setText( tr( "Password" ) );
00444 Passwd->setChecked(item->annotation().Flag() & 8192);
00445 OptTextFeldLayout->addWidget( Passwd );
00446 Layout8 = new QHBoxLayout;
00447 Layout8->setSpacing( 5 );
00448 Layout8->setMargin( 0 );
00449 Limit = new QCheckBox( OptTextFeld );
00450 Limit->setText( tr( "Limit of" ) );
00451 Layout8->addWidget( Limit );
00452 MaxChars = new QSpinBox( OptTextFeld );
00453 MaxChars->setMinimum(0);
00454 MaxChars->setMaximum(32768);
00455 bool setter = item->annotation().MaxChar() != -1 ? true : false;
00456 MaxChars->setValue(setter == true ? item->annotation().MaxChar() : 0);
00457 Limit->setChecked(setter);
00458 MaxChars->setEnabled(setter);
00459 Layout8->addWidget( MaxChars );
00460 TextLabel2_2 = new QLabel( OptTextFeld );
00461 TextLabel2_2->setText( tr( "Characters" ) );
00462 Layout8->addWidget( TextLabel2_2 );
00463 QSpacerItem* spacer_2 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
00464 Layout8->addItem( spacer_2 );
00465 OptTextFeldLayout->addLayout( Layout8 );
00466 NoScroll = new QCheckBox( OptTextFeld );
00467 NoScroll->setText( tr( "Do Not Scroll" ) );
00468 NoScroll->setChecked(item->annotation().Flag() & 8388608);
00469 OptTextFeldLayout->addWidget( NoScroll );
00470 NoSpell = new QCheckBox( OptTextFeld );
00471 NoSpell->setText( tr( "Do Not Spell Check" ) );
00472 NoSpell->setChecked(item->annotation().Flag() & 4194304);
00473 OptTextFeldLayout->addWidget( NoSpell );
00474 FramOp->addWidget( OptTextFeld );
00475
00476 OptCheck = new QGroupBox( tab_3 );
00477 OptCheck->setTitle( "" );
00478 OptCheckLayout = new QVBoxLayout( OptCheck );
00479 OptCheckLayout->setSpacing( 5 );
00480 OptCheckLayout->setMargin( 10 );
00481 OptCheckLayout->setAlignment( Qt::AlignTop );
00482 ChkLayout = new QHBoxLayout;
00483 ChkLayout->setSpacing( 5 );
00484 ChkLayout->setMargin( 0 );
00485 CText1 = new QLabel( OptCheck );
00486 CText1->setText( tr( "Check Style:" ) );
00487 ChkLayout->addWidget( CText1 );
00488 ChkStil = new QComboBox( OptCheck );
00489 QString tmp_chkstil2[]={ tr("Check"), tr("Cross"), tr("Diamond"), tr("Circle"), tr("Star"), tr("Square")};
00490 size_t array_chk2 = sizeof(tmp_chkstil2) / sizeof(*tmp_chkstil2);
00491
00492 for (uint propogate = 0; propogate < array_chk2; ++propogate)
00493 ChkStil->addItem(tmp_chkstil2[propogate]);
00494
00495 ChkStil->setEditable(false);
00496 ChkStil->setCurrentIndex(item->annotation().ChkStil());
00497 ChkLayout->addWidget( ChkStil );
00498 QSpacerItem* spacerC = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
00499 ChkLayout->addItem( spacerC );
00500 OptCheckLayout->addLayout( ChkLayout );
00501
00502 isChkd = new QCheckBox( OptCheck );
00503 isChkd->setText( tr( "Default is Checked" ) );
00504 isChkd->setChecked(item->annotation().IsChk());
00505 OptCheckLayout->addWidget( isChkd );
00506 FramOp->addWidget( OptCheck );
00507
00508 OptCombo = new QGroupBox( tab_3 );
00509 OptCombo->setTitle( "" );
00510 OptComboLayout = new QVBoxLayout( OptCombo );
00511 OptComboLayout->setSpacing( 5 );
00512 OptComboLayout->setMargin( 10 );
00513 OptComboLayout->setAlignment( Qt::AlignTop );
00514 CanEdit = new QCheckBox( OptCombo );
00515 CanEdit->setText( tr( "Editable" ) );
00516 CanEdit->setChecked(item->annotation().Flag() & 262144);
00517 OptComboLayout->addWidget( CanEdit );
00518 FramOp->addWidget( OptCombo );
00519
00520 tabLayout_3->addWidget( FramOp );
00521
00522 TabWidget2->addTab( tab_3, tr( "Options" ) );
00523
00524 tab_2 = new QWidget( TabWidget2 );
00525 tabLayout_2 = new QVBoxLayout( tab_2 );
00526 tabLayout_2->setSpacing( 5 );
00527 tabLayout_2->setMargin( 10 );
00528
00529 Layout20 = new QHBoxLayout;
00530 Layout20->setSpacing( 5 );
00531 Layout20->setMargin( 0 );
00532
00533 TextLabel70 = new QLabel( tab_2 );
00534 TextLabel70->setText( tr( "Type:" ) );
00535 Layout20->addWidget( TextLabel70 );
00536
00537 ActionCombo = new QComboBox(tab_2);
00538 QString tmp_actcom[] = {tr("None", "action"), tr("JavaScript"), tr("Go To"),
00539 tr("Submit Form"), tr("Reset Form"), tr("Import Data")};
00540 size_t array_act = sizeof(tmp_actcom) / sizeof(*tmp_actcom);
00541
00542 for (uint propogate = 0; propogate < array_act; ++propogate)
00543 ActionCombo->addItem(tmp_actcom[propogate]);
00544 ActionCombo->setEditable(false);
00545 int tmpac = item->annotation().ActionType();
00546 if (item->annotation().ActionType() < 0)
00547 tmpac = 1;
00548 ActionCombo->setCurrentIndex(tmpac == 7 ? 2 : tmpac);
00549
00550 Layout20->addWidget( ActionCombo );
00551 tabLayout_2->addLayout( Layout20 );
00552
00553 Fram2 = new QStackedWidget(tab_2);
00554 tabLayout_2->addWidget( Fram2 );
00555
00556 Frame4 = new QFrame( tab_2 );
00557 Frame4->setFrameShape( QFrame::NoFrame );
00558 Frame4->setFrameShadow( QFrame::Raised );
00559 Fram2->addWidget( Frame4 );
00560
00561 Frame3 = new QFrame( tab_2 );
00562 Frame3->setFrameShape( QFrame::Box );
00563 Frame3->setFrameShadow( QFrame::Sunken );
00564 Frame3Layout = new QVBoxLayout( Frame3 );
00565 Frame3Layout->setSpacing( 5 );
00566 Frame3Layout->setMargin( 10 );
00567 Layout7 = new QHBoxLayout;
00568 Layout7->setSpacing( 5 );
00569 Layout7->setMargin( 0 );
00570 AcText1 = new QLabel( Frame3 );
00571 AcText1->setText( tr( "Event:" ) );
00572 Layout7->addWidget( AcText1 );
00573 SelAction = new QComboBox(Frame3);
00574 QString tmp_selact[]={tr("Mouse Up"), tr("Mouse Down"), tr("Mouse Enter"),
00575 tr("Mouse Exit"), tr("On Focus"), tr("On Blur")};
00576 size_t array_sel = sizeof(tmp_selact) / sizeof(*tmp_selact);
00577
00578 for (uint propogate = 0; propogate < array_sel; ++propogate)
00579 SelAction->addItem(tmp_selact[propogate]);
00580 SelAction->setEditable(false);
00581 Layout7->addWidget( SelAction );
00582 QSpacerItem* spacerac = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
00583 Layout7->addItem( spacerac );
00584 Frame3Layout->addLayout( Layout7 );
00585 AcText2 = new QLabel( Frame3 );
00586 AcText2->setText( tr( "Script:" ) );
00587 Frame3Layout->addWidget( AcText2 );
00588 Layout71 = new QHBoxLayout;
00589 Layout71->setSpacing( 5 );
00590 Layout71->setMargin( 0 );
00591 EditJava = new QTextEdit( Frame3 );
00592 QPalette palTxt = EditJava->palette();
00593 palTxt.setColor(QPalette::Base, palette().color(QPalette::Window));
00594 if ((item->annotation().ActionType() == 1) || (item->annotation().AAact()))
00595 EditJava->setPlainText(item->annotation().Action());
00596 ScrEdited = 0;
00597 SelAction->setCurrentIndex(0);
00598 EditJava->setReadOnly(true);
00599 EditJava->setAutoFillBackground(true);
00600 EditJava->setPalette(palTxt);
00601 EditJava->setMinimumSize( QSize( 0, 50 ) );
00602 EditJava->setFocusPolicy(Qt::NoFocus);
00603 Layout71->addWidget( EditJava );
00604 EditJ = new QPushButton( Frame3 );
00605 EditJ->setText( tr( "Edit..." ) );
00606 Layout71->addWidget( EditJ );
00607 Frame3Layout->addLayout( Layout71 );
00608 Fram2->addWidget( Frame3 );
00609
00610 GroupBox11 = new QGroupBox( tab_2 );
00611 GroupBox11->setTitle( tr( "Destination" ) );
00612 GroupBox11Layout = new QGridLayout( GroupBox11 );
00613 GroupBox11Layout->setSpacing( 5 );
00614 GroupBox11Layout->setMargin( 10 );
00615 GroupBox11Layout->setAlignment( Qt::AlignTop );
00616 LExtern = new QCheckBox(GroupBox11);
00617 LExtern->setText( tr("To File:"));
00618 GroupBox11Layout->addWidget( LExtern, 0, 0 );
00619 Destfile = new QLineEdit(GroupBox11);
00620 Destfile->setText(item->annotation().Extern());
00621 Destfile->setReadOnly(true);
00622 GroupBox11Layout->addWidget( Destfile, 0, 1 );
00623 ChFile = new QPushButton(GroupBox11);
00624 ChFile->setText( tr("Change..."));
00625 GroupBox11Layout->addWidget( ChFile, 0, 2 );
00626 T