|
|
|
@ -49,8 +49,8 @@ void _k9CheckListItem::stateChange(bool _state) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
k9MencoderCmdGen::k9MencoderCmdGen(TQWidget* tqparent, const TQString &_cmd, bool modal, WFlags fl)
|
|
|
|
|
: MyDialog1(tqparent,"", modal,fl)
|
|
|
|
|
k9MencoderCmdGen::k9MencoderCmdGen(TQWidget* parent, const TQString &_cmd, bool modal, WFlags fl)
|
|
|
|
|
: MyDialog1(parent,"", modal,fl)
|
|
|
|
|
{
|
|
|
|
|
setCaption(kapp->makeStdCaption(i18n("MEncoder options")));
|
|
|
|
|
m_row=0; m_page=1;
|
|
|
|
@ -125,7 +125,7 @@ k9MencoderCmdGen::~k9MencoderCmdGen()
|
|
|
|
|
/*$SPECIALIZATION$*/
|
|
|
|
|
|
|
|
|
|
void k9MencoderCmdGen::listViewCurrentChanged(TQListViewItem *_item) {
|
|
|
|
|
if (_item->tqparent() == NULL)
|
|
|
|
|
if (_item->parent() == NULL)
|
|
|
|
|
wsOptions->raiseWidget(0);
|
|
|
|
|
else if (_item->rtti()==1001) {
|
|
|
|
|
_k9CheckListItem *item=(_k9CheckListItem*) _item;
|
|
|
|
@ -244,20 +244,20 @@ void k9MencoderCmdGen::addInt(TQDomElement _eOpt) {
|
|
|
|
|
int iMax=_eOpt.attributeNode("max").value().toInt();
|
|
|
|
|
int iDefault=_eOpt.attributeNode("default").value().toInt();
|
|
|
|
|
|
|
|
|
|
TQWidget *tqparent;
|
|
|
|
|
TQWidget *parent;
|
|
|
|
|
if (!blist) {
|
|
|
|
|
tqparent=m_grid;
|
|
|
|
|
parent=m_grid;
|
|
|
|
|
} else
|
|
|
|
|
tqparent=m_hbox;
|
|
|
|
|
parent=m_hbox;
|
|
|
|
|
|
|
|
|
|
bool bSel=false;
|
|
|
|
|
TQDomAttr aSel=_eOpt.attributeNode("selected");
|
|
|
|
|
if (!aSel.isNull())
|
|
|
|
|
bSel=aSel.value()=="true";
|
|
|
|
|
|
|
|
|
|
TQCheckBox *ckLabel=new TQCheckBox(sName,tqparent,TQString("ck%1").tqarg(m_row++) );
|
|
|
|
|
TQCheckBox *ckLabel=new TQCheckBox(sName,parent,TQString("ck%1").tqarg(m_row++) );
|
|
|
|
|
ckLabel->setChecked(bSel);
|
|
|
|
|
ckLabel->setBackgroundColor(tqparent->backgroundColor());
|
|
|
|
|
ckLabel->setBackgroundColor(parent->backgroundColor());
|
|
|
|
|
|
|
|
|
|
if ( !_eOpt.attributeNode("description").isNull()) {
|
|
|
|
|
TQToolTip::add(ckLabel,_eOpt.attributeNode("description").value());
|
|
|
|
@ -266,7 +266,7 @@ void k9MencoderCmdGen::addInt(TQDomElement _eOpt) {
|
|
|
|
|
_eOpt.setAttribute("checkbox",ckLabel->name());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
KIntSpinBox *sb= new KIntSpinBox(iMin,iMax,1,iDefault,10,tqparent,TQString("int%1").tqarg(m_row++));
|
|
|
|
|
KIntSpinBox *sb= new KIntSpinBox(iMin,iMax,1,iDefault,10,parent,TQString("int%1").tqarg(m_row++));
|
|
|
|
|
if (iMax <1000)
|
|
|
|
|
sb->setFixedWidth(50);
|
|
|
|
|
else
|
|
|
|
@ -292,16 +292,16 @@ void k9MencoderCmdGen::addFloat(TQDomElement _eOpt) {
|
|
|
|
|
if (_eOpt.nodeName()=="subopt")
|
|
|
|
|
blist=true;
|
|
|
|
|
|
|
|
|
|
TQWidget *tqparent;
|
|
|
|
|
TQWidget *parent;
|
|
|
|
|
if (!blist) {
|
|
|
|
|
tqparent=m_grid;
|
|
|
|
|
parent=m_grid;
|
|
|
|
|
} else
|
|
|
|
|
tqparent=m_hbox;
|
|
|
|
|
parent=m_hbox;
|
|
|
|
|
TQDomAttr aSel=_eOpt.attributeNode("selected");
|
|
|
|
|
if (!aSel.isNull())
|
|
|
|
|
bSel=aSel.value()=="true";
|
|
|
|
|
|
|
|
|
|
TQCheckBox *ckLabel=new TQCheckBox(sName,tqparent,TQString("ck%1").tqarg(m_row++));
|
|
|
|
|
TQCheckBox *ckLabel=new TQCheckBox(sName,parent,TQString("ck%1").tqarg(m_row++));
|
|
|
|
|
ckLabel->setChecked(bSel);
|
|
|
|
|
if ( !_eOpt.attributeNode("description").isNull()) {
|
|
|
|
|
TQToolTip::add(ckLabel,_eOpt.attributeNode("description").value());
|
|
|
|
@ -317,7 +317,7 @@ void k9MencoderCmdGen::addFloat(TQDomElement _eOpt) {
|
|
|
|
|
if (!_eOpt.attributeNode("precision").isNull()) {
|
|
|
|
|
iPrecision=_eOpt.attributeNode("precision").value().toInt();
|
|
|
|
|
}
|
|
|
|
|
KDoubleSpinBox *sb= new KDoubleSpinBox(dMin,dMax,dStep,dDefault,iPrecision,tqparent,TQString("float%1").tqarg(m_row++));
|
|
|
|
|
KDoubleSpinBox *sb= new KDoubleSpinBox(dMin,dMax,dStep,dDefault,iPrecision,parent,TQString("float%1").tqarg(m_row++));
|
|
|
|
|
if (dMax <1000)
|
|
|
|
|
sb->setFixedWidth(80);
|
|
|
|
|
else
|
|
|
|
@ -336,23 +336,23 @@ void k9MencoderCmdGen::addBool(TQDomElement _eOpt) {
|
|
|
|
|
blist=true;
|
|
|
|
|
|
|
|
|
|
bool bSel=false;
|
|
|
|
|
TQWidget *tqparent;
|
|
|
|
|
TQWidget *parent;
|
|
|
|
|
if (!blist) {
|
|
|
|
|
tqparent = m_grid;
|
|
|
|
|
parent = m_grid;
|
|
|
|
|
} else
|
|
|
|
|
tqparent = m_hbox;
|
|
|
|
|
parent = m_hbox;
|
|
|
|
|
|
|
|
|
|
TQDomAttr aSel=_eOpt.attributeNode("selected");
|
|
|
|
|
if (!aSel.isNull())
|
|
|
|
|
bSel=aSel.value()=="true";
|
|
|
|
|
|
|
|
|
|
TQCheckBox *ckLabel=new TQCheckBox(sName,tqparent,TQString("ck%1").tqarg(m_row++));
|
|
|
|
|
TQCheckBox *ckLabel=new TQCheckBox(sName,parent,TQString("ck%1").tqarg(m_row++));
|
|
|
|
|
|
|
|
|
|
if ( !_eOpt.attributeNode("description").isNull()) {
|
|
|
|
|
TQToolTip::add(ckLabel,_eOpt.attributeNode("description").value());
|
|
|
|
|
TQWhatsThis::add(ckLabel,_eOpt.attributeNode("description").value());
|
|
|
|
|
}
|
|
|
|
|
TQWidget *w=new TQWidget(tqparent);
|
|
|
|
|
TQWidget *w=new TQWidget(parent);
|
|
|
|
|
|
|
|
|
|
if ((_eOpt.attributeNode("default").value()=="true") && bSel)
|
|
|
|
|
ckLabel->setChecked(true);
|
|
|
|
@ -368,18 +368,18 @@ void k9MencoderCmdGen::addString(TQDomElement _eOpt) {
|
|
|
|
|
blist=true;
|
|
|
|
|
|
|
|
|
|
TQString sDefault=_eOpt.attributeNode("default").value();
|
|
|
|
|
TQWidget *tqparent;
|
|
|
|
|
TQWidget *parent;
|
|
|
|
|
if( !blist) {
|
|
|
|
|
tqparent=m_grid;
|
|
|
|
|
parent=m_grid;
|
|
|
|
|
} else
|
|
|
|
|
tqparent=m_hbox;
|
|
|
|
|
parent=m_hbox;
|
|
|
|
|
|
|
|
|
|
bool bSel=false;
|
|
|
|
|
TQDomAttr aSel=_eOpt.attributeNode("selected");
|
|
|
|
|
if (!aSel.isNull())
|
|
|
|
|
bSel=aSel.value()=="true";
|
|
|
|
|
|
|
|
|
|
TQCheckBox *ckLabel=new TQCheckBox(sName,tqparent,TQString("ck%1").tqarg(m_row++));
|
|
|
|
|
TQCheckBox *ckLabel=new TQCheckBox(sName,parent,TQString("ck%1").tqarg(m_row++));
|
|
|
|
|
ckLabel->setChecked(bSel);
|
|
|
|
|
if ( !_eOpt.attributeNode("description").isNull()) {
|
|
|
|
|
TQToolTip::add(ckLabel,_eOpt.attributeNode("description").value());
|
|
|
|
@ -387,7 +387,7 @@ void k9MencoderCmdGen::addString(TQDomElement _eOpt) {
|
|
|
|
|
}
|
|
|
|
|
_eOpt.setAttribute("checkbox",ckLabel->name());
|
|
|
|
|
|
|
|
|
|
TQComboBox *cb=new TQComboBox(tqparent,TQString("string%1").tqarg(m_row++));
|
|
|
|
|
TQComboBox *cb=new TQComboBox(parent,TQString("string%1").tqarg(m_row++));
|
|
|
|
|
|
|
|
|
|
TQDomNodeList values=_eOpt.elementsByTagName("value");
|
|
|
|
|
int def=0;
|
|
|
|
|