11#include <tqpopupmenu.h>
13#include <tqradiobutton.h>
14#include <tqcheckbox.h>
16#include <tqobjectlist.h>
22#include <tqvaluevector.h>
25#include <kpushbutton.h>
28#include <tdelistbox.h>
30#include <tdelistview.h>
32#include <kiconloader.h>
33#include <kgenericfactory.h>
36#include <ktimewidget.h>
37#include <kdatewidget.h>
38#include <kdatetimewidget.h>
43#include "formmanager.h"
44#include "widgetlibrary.h"
45#include "widgetpropertyset.h"
46#include <koproperty/property.h>
48#include "stdwidgetfactory.h"
51KexiPictureLabel::KexiPictureLabel( const TQPixmap &pix, TQWidget *parent, const char *name)
52 : TQLabel(parent, name)
55 setScaledContents( false);
59KexiPictureLabel::setProperty( const char *name, const TQVariant &value)
61 if(TQString(name) == "pixmap")
62 resize(value.toPixmap().height(), value.toPixmap().width());
63 return TQLabel::setProperty(name, value);
66Line::Line(TQt::Orientation orient, TQWidget *parent, const char *name)
67 : TQFrame(parent, name)
69 setFrameShadow(Sunken);
70 if(orient ==TQt::Horizontal)
77Line::setOrientation(TQt::Orientation orient)
79 if(orient ==TQt::Horizontal)
86Line::orientation() const
88 if(frameShape() == HLine)
89 return TQt::Horizontal;
100 wFormWidget->setPixmap( "form");
101 wFormWidget->setClassName( "FormWidgetBase");
102 wFormWidget->setName(i18n( "Form"));
103 wFormWidget->setNamePrefix(i18n( "This string will be used to name widgets of this class. It must _not_ contain white "
104 "spaces and non latin1 characters.", "form"));
105 wFormWidget->setDescription(i18n( "A simple form widget"));
109 wCustomWidget->setPixmap( "unknown_widget");
110 wCustomWidget->setClassName( "CustomWidget");
111 wCustomWidget->setName(i18n( "Custom Widget"));
112 wCustomWidget->setNamePrefix(i18n( "This string will be used to name widgets of this class. It must _not_ contain white "
113 "spaces and non latin1 characters.", "customWidget"));
114 wCustomWidget->setDescription(i18n( "A custom or non-supported widget"));
118 wLabel->setPixmap( "label");
119 wLabel->setClassName( "TQLabel");
120 wLabel->setName(i18n( "Text Label"));
121 wLabel->setNamePrefix(
122 i18n( "Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "label"));
123 wLabel->setDescription(i18n( "A widget to display text"));
127 wPixLabel->setPixmap( "pixmaplabel");
128 wPixLabel->setClassName( "KexiPictureLabel");
129 wPixLabel->setName(i18n( "Picture Label"));
133 wPixLabel->setNamePrefix(
134 i18n( "Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "picture"));
135 wPixLabel->setDescription(i18n( "A widget to display pictures"));
139 wLineEdit->setPixmap( "lineedit");
140 wLineEdit->setClassName( "KLineEdit");
143 wLineEdit->setName(i18n( "Line Edit"));
144 wLineEdit->setNamePrefix(
145 i18n( "Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "lineEdit"));
146 wLineEdit->setDescription(i18n( "A widget to input text"));
150 wSpring->setPixmap( "spring");
151 wSpring->setClassName( "Spring");
152 wSpring->setName(i18n( "Spring"));
153 wSpring->setNamePrefix(
154 i18n( "Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "spring"));
155 wSpring->setDescription(i18n( "A spring to place between widgets"));
159 wPushButton->setPixmap( "button");
160 wPushButton->setClassName( "KPushButton");
163 wPushButton->setName(i18n( "Push Button"));
164 wPushButton->setNamePrefix(
165 i18n( "Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "button"));
166 wPushButton->setDescription(i18n( "A simple push button to execute actions"));
170 wRadioButton->setPixmap( "radio");
171 wRadioButton->setClassName( "TQRadioButton");
172 wRadioButton->setName(i18n( "Option Button"));
173 wRadioButton->setNamePrefix(
174 i18n( "Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "optionButton"));
175 wRadioButton->setDescription(i18n( "An option button with text or pixmap label"));
179 wCheckBox->setPixmap( "check");
180 wCheckBox->setClassName( "TQCheckBox");
181 wCheckBox->setName(i18n( "Check Box"));
182 wCheckBox->setNamePrefix(
183 i18n( "Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "checkBox"));
184 wCheckBox->setDescription(i18n( "A check box with text or pixmap label"));
188 wSpinBox->setPixmap( "spin");
189 wSpinBox->setClassName( "KIntSpinBox");
192 wSpinBox->setName(i18n( "Spin Box"));
193 wSpinBox->setNamePrefix(
194 i18n( "Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "spinBox"));
195 wSpinBox->setDescription(i18n( "A spin box widget"));
199 wComboBox->setPixmap( "combo");
200 wComboBox->setClassName( "KComboBox");
203 wComboBox->setName(i18n( "Combo Box"));
204 wComboBox->setNamePrefix(
205 i18n( "Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "comboBox"));
206 wComboBox->setDescription(i18n( "A combo box widget"));
210 wListBox->setPixmap( "listbox");
211 wListBox->setClassName( "TDEListBox");
214 wListBox->setName(i18n( "List Box"));
215 wListBox->setNamePrefix(
216 i18n( "Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "listBox"));
217 wListBox->setDescription(i18n( "A simple list widget"));
221 wTextEdit->setPixmap( "textedit");
222 wTextEdit->setClassName( "KTextEdit");
225 wTextEdit->setName(i18n( "Text Editor"));
226 wTextEdit->setNamePrefix(
227 i18n( "Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "textEditor"));
228 wTextEdit->setDescription(i18n( "A simple single-page rich text editor"));
232 wListView->setPixmap( "listview");
233 wListView->setClassName( "TDEListView");
236 wListView->setName(i18n( "List View"));
237 wListView->setNamePrefix(
238 i18n( "Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "listView"));
239 wListView->setDescription(i18n( "A list (or tree) widget"));
243 wSlider->setPixmap( "slider");
244 wSlider->setClassName( "TQSlider");
245 wSlider->setName(i18n( "Slider"));
246 wSlider->setNamePrefix(
247 i18n( "Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "slider"));
248 wSlider->setDescription(i18n( "An horizontal slider"));
252 wProgressBar->setPixmap( "progress");
253 wProgressBar->setClassName( "KProgress");
256 wProgressBar->setName(i18n( "Progress Bar"));
257 wProgressBar->setNamePrefix(
258 i18n( "Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "progressBar"));
259 wProgressBar->setDescription(i18n( "A progress indicator widget"));
263 wLine->setPixmap( "line");
264 wLine->setClassName( "Line");
265 wLine->setName(i18n( "Line"));
266 wLine->setNamePrefix(
267 i18n( "Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "line"));
268 wLine->setDescription(i18n( "A line to be used as a separator"));
272 wDate->setPixmap( "dateedit");
273 wDate->setClassName( "KDateWidget");
276 wDate->setName(i18n( "Date Widget"));
277 wDate->setNamePrefix(
278 i18n( "Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "dateWidget"));
279 wDate->setDescription(i18n( "A widget to input and display a date"));
283 wTime->setPixmap( "timeedit");
284 wTime->setClassName( "KTimeWidget");
287 wTime->setName(i18n( "Time Widget"));
288 wTime->setNamePrefix(
289 i18n( "Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "timeWidget"));
290 wTime->setDescription(i18n( "A widget to input and display a time"));
294 wDateTime->setPixmap( "datetimeedit");
295 wDateTime->setClassName( "KDateTimeWidget");
298 wDateTime->setName(i18n( "Date/Time Widget"));
299 wDateTime->setNamePrefix(
300 i18n( "Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "dateTimeWidget"));
301 wDateTime->setDescription(i18n( "A widget to input and display a time and a date"));
305 m_propDesc[ "autoRepeat"] = i18n( "Auto Repeat");
306 m_propDesc[ "autoDefault"] = i18n( "Auto Default");
310 i18n( "Echo mode for Line Edit widget eg. Normal, NoEcho, Password", "Echo Mode");
313 m_propDesc[ "orientation"] = i18n( "Orientation");
315 m_propDesc[ "checked"] = i18n( "Checked checkbox", "Checked");
316 m_propDesc[ "tristate"] = i18n( "Tristate checkbox", "Tristate");
319 m_propValDesc[ "Normal"] = i18n( "For Echo Mode", "Normal");
320 m_propValDesc[ "NoEcho"] = i18n( "For Echo Mode", "No Echo");
321 m_propValDesc[ "Password"] = i18n( "For Echo Mode", "Password");
327 m_propDesc[ "textFormat"] = i18n( "Text Format");
328 m_propValDesc[ "PlainText"] = i18n( "For Text Format", "Plain");
329 m_propValDesc[ "RichText"] = i18n( "For Text Format", "Hypertext");
330 m_propValDesc[ "AutoText"] = i18n( "For Text Format", "Auto");
331 m_propValDesc[ "LogText"] = i18n( "For Text Format", "Log");
334 m_propDesc[ "tabStopWidth"] = i18n( "Tab Stop Width");
335 m_propDesc[ "tabChangesFocus"] = i18n( "Tab Changes Focus");
336 m_propDesc[ "wrapPolicy"] = i18n( "Word Wrap Policy");
337 m_propValDesc[ "AtWordBoundary"] = i18n( "For Word Wrap Policy", "At Word Boundary");
338 m_propValDesc[ "Anywhere"] = i18n( "For Word Wrap Policy", "Anywhere");
339 m_propValDesc[ "AtWordOrDocumentBoundary"] = i18n( "For Word Wrap Policy", "At Word Boundary If Possible");
340 m_propDesc[ "wordWrap"] = i18n( "Word Wrapping");
341 m_propDesc[ "wrapColumnOrWidth"] = i18n( "Word Wrap Position");
342 m_propValDesc[ "NoWrap"] = i18n( "For Word Wrap Position", "None");
343 m_propValDesc[ "WidgetWidth"] = i18n( "For Word Wrap Position", "Widget's Width");
344 m_propValDesc[ "FixedPixelWidth"] = i18n( "For Word Wrap Position", "In Pixels");
345 m_propValDesc[ "FixedColumnWidth"] = i18n( "For Word Wrap Position", "In Columns");
346 m_propDesc[ "linkUnderline"] = i18n( "Links Underlined");
352 setInternalProperty( "Line", "orientationSelectionPopup:horizontalText",i18n( "Insert &Horizontal Line"));
353 setInternalProperty( "Line", "orientationSelectionPopup:verticalText",i18n( "Insert &Vertical Line"));
357 setInternalProperty( "Spring", "orientationSelectionPopup:horizontalText",i18n( "Insert &Horizontal Spring"));
358 setInternalProperty( "Spring", "orientationSelectionPopup:verticalText",i18n( "Insert &Vertical Spring"));
361StdWidgetFactory::~StdWidgetFactory()
370 TQString text( container-> form()-> library()->textForWidgetName(n, c) );
374 w = new TQLabel(text, p, n);
375 else if(c == "KexiPictureLabel")
376 w = new KexiPictureLabel(DesktopIcon( "image-x-generic"), p, n);
378 else if(c == "KLineEdit")
380 w = new KLineEdit(p, n);
382 w->setCursor(TQCursor(TQt::ArrowCursor));
384 else if(c == "KPushButton")
385 w = new KPushButton(text, p, n);
387 else if(c == "TQRadioButton")
388 w = new TQRadioButton(text, p, n);
390 else if(c == "TQCheckBox")
391 w = new TQCheckBox(text, p, n);
393 else if(c == "KIntSpinBox")
394 w = new KIntSpinBox(p, n);
396 else if(c == "KComboBox")
397 w = new KComboBox(p, n);
399 else if(c == "TDEListBox")
400 w = new TDEListBox(p, n);
402 else if(c == "KTextEdit")
403 w = new KTextEdit(text, TQString(), p, n);
405 else if(c == "TDEListView")
407 w = new TDEListView(p, n);
409 ((TDEListView*)w)->addColumn(i18n( "Column 1"));
410 ((TDEListView*)w)->setRootIsDecorated( true);
412 else if(c == "TQSlider")
413 w = new TQSlider(TQt::Horizontal, p, n);
415 else if(c == "KProgress")
416 w = new KProgress(p, n);
418 else if(c == "KDateWidget")
419 w = new KDateWidget(TQDate::currentDate(), p, n);
421 else if(c == "KTimeWidget")
422 w = new KTimeWidget(TQTime::currentTime(), p, n);
424 else if(c == "KDateTimeWidget")
425 w = new KDateTimeWidget(TQDateTime::currentDateTime(), p, n);
428 w = new Line(options & WidgetFactory::VerticalOrientation ? TQt::Vertical : TQt::Horizontal, p, n);
430 else if(c == "Spring") {
431 w = new Spring(p, n);
432 if (0 == (options & WidgetFactory::AnyOrientation))
433 static_cast<Spring* >(w)->setOrientation(
434 (options & WidgetFactory::VerticalOrientation) ? TQt::Vertical : TQt::Horizontal);
440 kdDebug() << "WARNING :: w == 0 " << endl;
447 if(classname == "Spring") {
448 ((Spring*)widget)->setPreviewMode();
458 if((classname == "TQLabel") || (classname == "KTextEdit"))
460 menu->insertItem(SmallIconSet( "edit"), i18n( "Edit Rich Text"), this, TQ_SLOT(editText()));
463 else if(classname == "TDEListView")
465 menu->insertItem(SmallIconSet( "edit"), i18n( "Edit Listview Contents"), this, TQ_SLOT(editListContents()));
475 setWidget(w, container);
477 if(classname == "KLineEdit")
479 KLineEdit *lineedit = static_cast<KLineEdit* >(w);
480 createEditor(classname, lineedit->text(), lineedit, container, lineedit->geometry(), lineedit->alignment(), true);
483 else if(classname == "TQLabel")
485 TQLabel *label = static_cast<TQLabel* >(w);
486 if(label->textFormat() == RichText)
493 createEditor(classname, label->text(), label, container, label->geometry(), label->alignment());
496 else if(classname == "KPushButton")
498 KPushButton *push = static_cast<KPushButton* >(w);
499 TQRect r = w->style().subRect(TQStyle::SR_PushButtonContents, w);
500 TQRect editorRect = TQRect(push->x() + r.x(), push->y() + r.y(), r.width(), r.height());
505 createEditor(classname, push->text(), push, container, editorRect, TQt::AlignCenter, false, false, TQt::PaletteButton);
508 else if(classname == "TQRadioButton")
510 TQRadioButton *radio = static_cast<TQRadioButton* >(w);
511 TQRect r = w->style().subRect(TQStyle::SR_RadioButtonContents, w);
512 TQRect editorRect = TQRect(radio->x() + r.x(), radio->y() + r.y(), r.width(), r.height());
513 createEditor(classname, radio->text(), radio, container, editorRect, TQt::AlignAuto);
516 else if(classname == "TQCheckBox")
518 TQCheckBox *check = static_cast<TQCheckBox* >(w);
521 TQRect r = w->style().subRect(TQStyle::SR_CheckBoxContents, w);
522 TQRect editorRect = TQRect(check->x() + r.x(), check->y() + r.y(), r.width(), r.height());
523 createEditor(classname, check->text(), check, container, editorRect, TQt::AlignAuto);
526 else if((classname == "KComboBox") || (classname == "TDEListBox"))
529 if(classname == "TDEListBox")
531 TDEListBox *listbox = (TDEListBox*)w;
532 for(uint i=0; i < listbox->count(); i++)
533 list.append(listbox->text(i));
535 else if(classname == "KComboBox")
537 KComboBox *combo = (KComboBox*)w;
538 for( int i=0; i < combo->count(); i++)
539 list.append(combo->text(i));
544 if(classname == "TDEListBox")
546 ((TDEListBox*)w)->clear();
547 ((TDEListBox*)w)->insertStringList(list);
549 else if(classname == "KComboBox")
551 ((KComboBox*)w)->clear();
552 ((KComboBox*)w)->insertStringList(list);
557 else if((classname == "KTextEdit") || (classname == "KDateTimeWidget") || (classname == "KTimeWidget") ||
558 (classname == "KDateWidget") || (classname == "KIntSpinBox")) {
566StdWidgetFactory::clearWidgetContent( const TQCString &classname, TQWidget *w)
568 if(classname == "KLineEdit")
569 ((KLineEdit*)w)->clear();
570 else if(classname == "TDEListBox")
571 ((TDEListBox*)w)->clear();
572 else if(classname == "TDEListView")
573 ((TDEListView*)w)->clear();
574 else if(classname == "KComboBox")
575 ((KComboBox*)w)->clear();
576 else if(classname == "KTextEdit")
577 ((KTextEdit*)w)->clear();
586 TQCString n = WidgetFactory::widget()->className();
587 TQWidget *w = WidgetFactory::widget();
588 if(n == "KIntSpinBox")
589 ((KIntSpinBox*)w)->setValue(text.toInt());
615 if(w->width() < width)
617 w->resize(width, w->height() );
627 TQSize s = widget->size();
628 TQPoint p = widget->pos();
631 if(classname == "TQRadioButton")
633 r = widget->style().subRect(TQStyle::SR_RadioButtonContents, widget);
635 s.setWidth(r.width());
637 else if(classname == "TQCheckBox")
639 r = widget->style().subRect(TQStyle::SR_CheckBoxContents, widget);
641 s.setWidth(r.width());
643 else if(classname == "KPushButton")
645 r = widget->style().subRect(TQStyle::SR_PushButtonContents, widget);
657 if(name == "list_items" && classname == "KComboBox")
659 KComboBox *combo = (KComboBox*)w;
660 for( int i=0; i < combo->count(); i++)
662 TQDomElement item = domDoc.createElement( "item");
664 parentNode.appendChild(item);
668 else if(name == "list_items" && classname == "TDEListBox")
670 TDEListBox *listbox = (TDEListBox*)w;
671 for(uint i=0; i < listbox->count(); i++)
673 TQDomElement item = domDoc.createElement( "item");
675 parentNode.appendChild(item);
679 else if(name == "list_contents" && classname == "TDEListView")
681 TDEListView *listview = (TDEListView*)w;
683 for( int i = 0; i < listview->columns(); i++)
685 TQDomElement item = domDoc.createElement( "column");
691 parentNode.appendChild(item);
695 TQListViewItem *item = listview->firstChild();
698 saveListItem(item, parentNode, domDoc);
699 item = item->nextSibling();
708StdWidgetFactory::saveListItem(TQListViewItem *item, TQDomNode &parentNode, TQDomDocument &domDoc)
710 TQDomElement element = domDoc.createElement( "item");
711 parentNode.appendChild(element);
714 for( int i = 0; i < item->listView()->columns(); i++)
718 TQListViewItem *child = item->firstChild();
721 saveListItem(child, element, domDoc);
722 child = child->nextSibling();
729 TQString tag = node.tagName();
730 TQString name = node.attribute( "name");
732 if((tag == "item") && (classname == "KComboBox"))
734 KComboBox *combo = (KComboBox*)w;
736 if(val.canCast(TQVariant::Pixmap))
737 combo->insertItem(val.toPixmap());
739 combo->insertItem(val.toString());
743 if((tag == "item") && (classname == "TDEListBox"))
745 TDEListBox *listbox = (TDEListBox*)w;
747 if(val.canCast(TQVariant::Pixmap))
748 listbox->insertItem(val.toPixmap());
750 listbox->insertItem(val.toString());
754 if((tag == "column") && (classname == "TDEListView"))
756 TDEListView *listview = (TDEListView*)w;
758 for(TQDomNode n = node.firstChild(); !n.isNull(); n = n.nextSibling())
760 TQString prop = n.toElement().attribute( "name");
763 id = listview->addColumn(val.toString());
764 else if(prop == "width")
765 listview->setColumnWidth( id, val.toInt());
766 else if(prop == "resizable")
767 listview->header()->setResizeEnabled(val.toBool(), id);
768 else if(prop == "clickable")
769 listview->header()->setClickEnabled(val.toBool(), id);
770 else if(prop == "fullwidth")
771 listview->header()->setStretchEnabled(val.toBool(), id);
775 else if((tag == "item") && (classname == "TDEListView"))
777 TDEListView *listview = (TDEListView*)w;
778 readListItem(node, 0, listview);
786StdWidgetFactory::readListItem(TQDomElement &node, TQListViewItem *parent, TDEListView *listview)
788 TQListViewItem *item;
790 item = new TDEListViewItem(parent);
792 item = new TDEListViewItem(listview);
795 TQListViewItem *last;
797 last = parent->firstChild();
799 last = listview->firstChild();
801 while(last->nextSibling())
802 last = last->nextSibling();
803 item->moveItem(last);
806 for(TQDomNode n = node.firstChild(); !n.isNull(); n = n.nextSibling())
808 TQDomElement childEl = n.toElement();
809 TQString prop = childEl.attribute( "name");
810 TQString tag = childEl.tagName();
816 readListItem(childEl, item, listview);
819 else if((tag == "property") && (prop == "text"))
822 item->setText(i, val.toString());
830 TQWidget *w, const TQCString &property, bool isTopLevel)
833 if(classname == "FormWidgetBase")
835 if(property == "iconText"
836 || property == "geometry" )
839 else if (classname == "CustomWidget")
842 else if(classname == "Spring")
844 return Spring::isPropertyVisible(property);
846 else if(classname == "KexiPictureLabel")
848 if((property == "text") || (property == "indent") || (property == "textFormat") || (property == "font") || (property == "alignment"))
851 else if(classname == "TQLabel")
853 if(property == "pixmap")
856 else if(classname == "KLineEdit")
858 if(property == "vAlign")
861 else if(classname == "KTextEdit")
863 property!= "undoDepth"
864 && property!= "undoRedoEnabled"
865 && property!= "dragAutoScroll"
866 && property!= "overwriteMode"
867 && property!= "resizePolicy"
868 && property!= "autoFormatting"
869#ifdef KEXI_NO_UNFINISHED
873 else if(classname == "Line")
875 if((property == "frameShape") || (property == "font") || (property == "margin"))
878 else if(classname== "TQCheckBox")
882 else if(classname== "TQRadioButton")
886 else if(classname== "KPushButton")
891 return ok && WidgetFactory::isPropertyVisibleInternal(classname, w, property, isTopLevel);
894TQValueList<TQCString>
897 TQValueList<TQCString> l;
899 if(classname == "TQLabel")
901 if(classname == "KPushButton")
903 else if(classname == "KexiPictureLabel")
905 else if(classname == "KComboBox")
907 else if(classname == "TDEListBox")
909 else if(classname == "TDEListView")
910 l << "list_contents";
911 else if(classname == "Line")
913 else if(classname == "KTimeWidget")
915 else if(classname == "KDateWidget")
917 else if(classname == "KDateTimeWidget")
919 else if(classname == "Spring")
920 l << "sizeType" << "orientation";
921 else if(classname == "KTextEdit")
922 l << "textFormat" << "text";
928StdWidgetFactory::editText()
930 TQCString classname = widget()->className();
932 if(classname == "KTextEdit")
933 text = ((KTextEdit*)widget())->text();
934 else if(classname == "TQLabel")
935 text = ((TQLabel*)widget())->text();
943 if(classname == "TQLabel")
944 widget()->resize(widget()->sizeHint());
948StdWidgetFactory::editListContents()
950 if(widget()->inherits( "TQListView"))
960 if (buf.contains( "indent")) {
961 buf[ "indent"].setOption( "min", -1);
962 buf[ "indent"].setOption( "minValueText", i18n( "default indent value", "default"));
968#include "stdwidgetfactory.moc"
|