Ticket #3903: libmyth-widgetproperties-30082007.diff
File libmyth-widgetproperties-30082007.diff, 2.1 KB (added by , 17 years ago) |
---|
-
libs/libmyth/settings.h
401 401 void setSelectionMode(MythListBox::SelectionMode mode); 402 402 void setCurrentItem(int i) { if (widget) widget->setCurrentItem(i); } 403 403 void setCurrentItem(const QString& str) { if (widget) widget->setCurrentItem(str); } 404 int currentItem() { if (widget) return widget->currentItem(); 405 else return -1; } 404 406 405 407 virtual void setEnabled(bool b); 406 408 … … 481 483 virtual QWidget* configWidget(ConfigurationGroup *cg, QWidget* parent, 482 484 const char* widgetName = 0); 483 485 virtual void setEnabled(bool b); 486 487 bool isChecked() { if (widget) return widget->isChecked(); 488 else return false; } 484 489 protected: 485 490 MythCheckBox *widget; 486 491 }; … … 660 665 special_value_text), TransientStorage() { } 661 666 }; 662 667 668 class MPUBLIC TransListBoxSetting : 669 public ListBoxSetting, public TransientStorage 670 { 671 public: 672 TransListBoxSetting() : ListBoxSetting(this), TransientStorage() { } 673 }; 674 663 675 /////////////////////////////////////////////////////////////////////////////// 664 676 665 677 class MPUBLIC HostSlider : public SliderSetting, public HostDBStorage -
libs/libmyth/mythwidgets.h
321 321 MythCheckBox(const QString &text, QWidget* parent = 0, const char* name = 0): 322 322 QCheckBox(text, parent, name) {}; 323 323 void setHelpText(QString help) { helptext = help; } 324 bool isChecked() { return QCheckBox::isChecked(); } 324 325 325 326 signals: 326 327 void changeHelpText(QString); … … 375 376 virtual void keyPressEvent(QKeyEvent* e); 376 377 377 378 void setHelpText(QString help) { helptext = help; } 379 380 int currentItem() { return QListBox::currentItem(); } 378 381 379 382 protected: 380 383 void focusInEvent(QFocusEvent *e);