summaryrefslogtreecommitdiffstats
path: root/quanta/components/csseditor/csseditor.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-16 19:02:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-16 19:02:47 +0000
commite985f7e545f4739493965aad69bbecb136dc9346 (patch)
tree54afd409d8acd6202dd8ab611d24e78c28e4c0a0 /quanta/components/csseditor/csseditor.cpp
parentf7670c198945adc3b95ad69a959fe5f8ae55b493 (diff)
downloadtdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.tar.gz
tdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.zip
TQt4 port kdewebdev
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237029 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'quanta/components/csseditor/csseditor.cpp')
-rw-r--r--quanta/components/csseditor/csseditor.cpp96
1 files changed, 48 insertions, 48 deletions
diff --git a/quanta/components/csseditor/csseditor.cpp b/quanta/components/csseditor/csseditor.cpp
index 5393d875..afe90315 100644
--- a/quanta/components/csseditor/csseditor.cpp
+++ b/quanta/components/csseditor/csseditor.cpp
@@ -47,11 +47,11 @@
-myCheckListItem::myCheckListItem(TQListView * parent, const TQString & text):TQCheckListItem(parent, text, TQCheckListItem::CheckBox),m_checkedChildren(0){
+myCheckListItem::myCheckListItem(TQListView * tqparent, const TQString & text):TQCheckListItem(tqparent, text, TQCheckListItem::CheckBox),m_checkedChildren(0){
m_sig = new TQSignal;
}
-myCheckListItem::myCheckListItem(TQCheckListItem * parent, const TQString & text):TQCheckListItem(parent, text, TQCheckListItem::CheckBox),m_checkedChildren(0){
+myCheckListItem::myCheckListItem(TQCheckListItem * tqparent, const TQString & text):TQCheckListItem(tqparent, text, TQCheckListItem::CheckBox),m_checkedChildren(0){
m_sig = new TQSignal;
}
@@ -85,8 +85,8 @@ void myCheckListItem::stateChange (bool b){
m_checkedChildren = 0;
}
else {
- if(parent()){
- myCheckListItem *p = static_cast<myCheckListItem*>(parent());
+ if(tqparent()){
+ myCheckListItem *p = static_cast<myCheckListItem*>(tqparent());
while( p ) {
if( p->m_checkedChildren != 1) {
p->m_checkedChildren--;
@@ -99,7 +99,7 @@ void myCheckListItem::stateChange (bool b){
m_sig->activate();
p->setOn(false);
}
- p = static_cast<myCheckListItem*>(p->parent());
+ p = static_cast<myCheckListItem*>(p->tqparent());
}
}
else {
@@ -109,7 +109,7 @@ void myCheckListItem::stateChange (bool b){
}
}
else {
- if(parent()) static_cast<myCheckListItem*>(parent())->addCheckedChild();
+ if(tqparent()) static_cast<myCheckListItem*>(tqparent())->addCheckedChild();
}
}
@@ -117,7 +117,7 @@ void CSSEditor::appendSub(TQDomNodeList l, myCheckListItem *cli){
unsigned int i;
for(i=0;i<l.length();i++) {
myCheckListItem *item = new myCheckListItem(cli,l.item(i).toElement().tagName());
- item->connect(this,TQT_SLOT(removeProperty(const TQVariant&)));
+ item->connect(TQT_TQOBJECT(this),TQT_SLOT(removeProperty(const TQVariant&)));
if(l.item(i).toElement().attribute("hasSub") == "yes")
appendSub(l.item(i).childNodes(),item);
}
@@ -127,7 +127,7 @@ void CSSEditor::buildListView(TQDomNodeList l, TQListView *lv){
unsigned int i;
for(i=0;i<l.length();i++) {
myCheckListItem *item = new myCheckListItem(lv,l.item(i).toElement().tagName());
- item->connect(this,TQT_SLOT(removeProperty(const TQVariant&)));
+ item->connect(TQT_TQOBJECT(this),TQT_SLOT(removeProperty(const TQVariant&)));
if(l.item(i).toElement().attribute("hasSub") == "yes") {
TQDomNodeList listSub = l.item(i).childNodes();
appendSub(listSub,item);
@@ -136,26 +136,26 @@ void CSSEditor::buildListView(TQDomNodeList l, TQListView *lv){
}
void CSSEditor::setCurrentPropOn(const TQString& s){
- if( (m_currentProp = static_cast<myCheckListItem*>(lvVisual->findItem( s,0 )) ))
+ if( (m_currentProp = static_cast<myCheckListItem*>(lvVisual->tqfindItem( s,0 )) ))
m_currentProp->setOn(true);
else
- if( (m_currentProp = static_cast<myCheckListItem*>(lvAll->findItem( s,0 )) ))
+ if( (m_currentProp = static_cast<myCheckListItem*>(lvAll->tqfindItem( s,0 )) ))
m_currentProp->setOn(true);
else
- if( (m_currentProp = static_cast<myCheckListItem*>(lvAural->findItem( s,0 )) ))
+ if( (m_currentProp = static_cast<myCheckListItem*>(lvAural->tqfindItem( s,0 )) ))
m_currentProp->setOn(true);
else
- if( (m_currentProp = static_cast<myCheckListItem*>(lvInteractive->findItem( s,0 )) ))
+ if( (m_currentProp = static_cast<myCheckListItem*>(lvInteractive->tqfindItem( s,0 )) ))
m_currentProp->setOn(true);
else
- if( (m_currentProp = static_cast<myCheckListItem*>(lvPaged->findItem( s,0 )) ))
+ if( (m_currentProp = static_cast<myCheckListItem*>(lvPaged->tqfindItem( s,0 )) ))
m_currentProp->setOn(true);
if( m_currentProp && m_currentProp->depth() ) {
- myCheckListItem *p = static_cast<myCheckListItem*>(m_currentProp->parent());
+ myCheckListItem *p = static_cast<myCheckListItem*>(m_currentProp->tqparent());
while(p) {
p->setOn(true);
- p=static_cast<myCheckListItem*>(p->parent());
+ p=static_cast<myCheckListItem*>(p->tqparent());
}
}
}
@@ -167,14 +167,14 @@ void CSSEditor::setCurrentPropOn(const TQString& s){
}
void CSSEditor::setSidesOfPropertyBorderOn(const TQString& s){
- static_cast<myCheckListItem*>(lvVisual->findItem( "border-top",0 ))->setOn(true);
- static_cast<myCheckListItem*>(lvVisual->findItem( "border-right",0 ))->setOn(true);
- static_cast<myCheckListItem*>(lvVisual->findItem( "border-bottom",0 ))->setOn(true);
- static_cast<myCheckListItem*>(lvVisual->findItem( "border-left",0 ))->setOn(true);
- static_cast<myCheckListItem*>(lvVisual->findItem( "border-top-"+s,0 ))->setOn(true);
- static_cast<myCheckListItem*>(lvVisual->findItem( "border-right-"+s,0 ))->setOn(true);
- static_cast<myCheckListItem*>(lvVisual->findItem( "border-bottom-"+s,0 ))->setOn(true);
- static_cast<myCheckListItem*>(lvVisual->findItem( "border-left-"+s,0 ))->setOn(true);
+ static_cast<myCheckListItem*>(lvVisual->tqfindItem( "border-top",0 ))->setOn(true);
+ static_cast<myCheckListItem*>(lvVisual->tqfindItem( "border-right",0 ))->setOn(true);
+ static_cast<myCheckListItem*>(lvVisual->tqfindItem( "border-bottom",0 ))->setOn(true);
+ static_cast<myCheckListItem*>(lvVisual->tqfindItem( "border-left",0 ))->setOn(true);
+ static_cast<myCheckListItem*>(lvVisual->tqfindItem( "border-top-"+s,0 ))->setOn(true);
+ static_cast<myCheckListItem*>(lvVisual->tqfindItem( "border-right-"+s,0 ))->setOn(true);
+ static_cast<myCheckListItem*>(lvVisual->tqfindItem( "border-bottom-"+s,0 ))->setOn(true);
+ static_cast<myCheckListItem*>(lvVisual->tqfindItem( "border-left-"+s,0 ))->setOn(true);
}
void CSSEditor::hidePreviewer(){
@@ -190,7 +190,7 @@ void CSSEditor::initialize(){
TQString configFile = locate("appdata", "csseditor/config.xml");
- m_myhi = new QMyHighlighter(display);
+ m_myhi = new TQMyHighlighter(display);
TQBoxLayout *fPreviewLayout = new TQBoxLayout(fPreview,TQBoxLayout::LeftToRight);
m_previewer=new KHTMLPart(fPreview);
@@ -266,7 +266,7 @@ void CSSEditor::initialize(){
const TQString propertyName((*it).section(":",0,0).stripWhiteSpace());
const TQString propertyValue((*it).section(":",1));
- if( ShorthandFormer::SHFormList().contains(propertyName)==0 ) {
+ if( ShorthandFormer::SHFormList().tqcontains(propertyName)==0 ) {
temp+= propertyName + " : " + propertyValue +";\n\t";
addAndSetPropertyOn(propertyName,propertyValue);
}
@@ -296,7 +296,7 @@ void CSSEditor::toggleShortendForm()
m_config->sync();
}
-CSSEditor::CSSEditor(TQListViewItem *i, TQWidget *parent, const char *name) : CSSEditorS(parent, name){
+CSSEditor::CSSEditor(TQListViewItem *i, TQWidget *tqparent, const char *name) : CSSEditorS(tqparent, name){
m_selectorName = i->text(0);
m_initialProperties = i->text(1);
}
@@ -323,12 +323,12 @@ void CSSEditor::setMiniEditors(TQListViewItem* i){
m_ps->setComboBox();
TQStringList values = TQStringList::split(",",curr.attribute("value"));
m_ps->ComboBox()->insertStringList(values);
- if(m_properties.contains(m_currentProp->text(0)) !=0 )
- if( values.contains(m_currentProp->text(0)))
+ if(m_properties.tqcontains(m_currentProp->text(0)) !=0 )
+ if( values.tqcontains(m_currentProp->text(0)))
m_ps->ComboBox()->setCurrentText(m_properties[m_currentProp->text(0)]);
if(curr.attribute("editable") == "yes"){
m_ps->ComboBox()->setEditable(true);
- /*if(m_properties.contains(m_currentProp->text(0)) !=0 )
+ /*if(m_properties.tqcontains(m_currentProp->text(0)) !=0 )
m_ps->ComboBox()->setEditText(m_properties[m_currentProp->text(0)]); */
}
}
@@ -344,7 +344,7 @@ void CSSEditor::setMiniEditors(TQListViewItem* i){
if( valueTypeName == "number") m_ps->setLineEdit();
else
if( valueTypeName == "integer") {
- if(m_properties.contains(m_currentProp->text(0)) !=0 ) {
+ if(m_properties.tqcontains(m_currentProp->text(0)) !=0 ) {
if(!curr.attribute("minValue").isNull())
m_ps->setSpinBox(m_properties[m_currentProp->text(0)],curr.attribute("minValue"));
else
@@ -359,15 +359,15 @@ void CSSEditor::setMiniEditors(TQListViewItem* i){
else
if( valueTypeName == "length") {
lengthEditor *editor = new lengthEditor(m_ps);
- if(m_properties.contains(m_currentProp->text(0)) !=0 )
+ if(m_properties.tqcontains(m_currentProp->text(0)) !=0 )
editor->setInitialValue(m_properties[m_currentProp->text(0)]);
else
- editor->setInitialValue(TQString::null);
+ editor->setInitialValue(TQString());
m_ps->installMiniEditor(editor);
}
else
if( valueTypeName == "percentage") {
- if(m_properties.contains(m_currentProp->text(0)) !=0 ){
+ if(m_properties.tqcontains(m_currentProp->text(0)) !=0 ){
percentageEditor *editor = new percentageEditor(m_properties[m_currentProp->text(0)],m_ps);
m_ps->installMiniEditor(editor);
}
@@ -380,55 +380,55 @@ void CSSEditor::setMiniEditors(TQListViewItem* i){
if( valueTypeName == "doubleLength") {
doubleLengthEditor *editor = new doubleLengthEditor(m_ps);
- if(m_properties.contains(m_currentProp->text(0)) !=0 ){
+ if(m_properties.tqcontains(m_currentProp->text(0)) !=0 ){
TQString temp(m_properties[m_currentProp->text(0)].simplifyWhiteSpace()),
sx(temp.section(" ",0,0)),
dx(temp.section(" ",1,1));
editor->setInitialValue(sx,dx);
}
- else editor->setInitialValue(TQString::null,TQString::null);
+ else editor->setInitialValue(TQString(),TQString());
m_ps->installMiniEditor(editor);
}
else
if( valueTypeName == "doublePercentage") {
doublePercentageEditor *editor = new doublePercentageEditor(m_ps);
- if(m_properties.contains(m_currentProp->text(0)) !=0 ){
+ if(m_properties.tqcontains(m_currentProp->text(0)) !=0 ){
TQString temp(m_properties[m_currentProp->text(0)].simplifyWhiteSpace()),
sx(temp.section(" ",0,0)),
dx(temp.section(" ",1,1));
editor->setInitialValue(sx,dx);
}
- else editor->setInitialValue(TQString::null,TQString::null);
+ else editor->setInitialValue(TQString(),TQString());
m_ps->installMiniEditor(editor);
}
else
if( valueTypeName == "frequency") {
frequencyEditor *editor = new frequencyEditor(m_ps);
- if(m_properties.contains(m_currentProp->text(0)) !=0 )
+ if(m_properties.tqcontains(m_currentProp->text(0)) !=0 )
editor->setInitialValue(m_properties[m_currentProp->text(0)]);
else
- editor->setInitialValue(TQString::null);
+ editor->setInitialValue(TQString());
m_ps->installMiniEditor(editor);
}
else
if( valueTypeName == "time") {
timeEditor *editor = new timeEditor(m_ps);
- if(m_properties.contains(m_currentProp->text(0)) !=0 )
+ if(m_properties.tqcontains(m_currentProp->text(0)) !=0 )
editor->setInitialValue(m_properties[m_currentProp->text(0)]);
else
- editor->setInitialValue(TQString::null);
+ editor->setInitialValue(TQString());
m_ps->installMiniEditor(editor);
}
else
if( valueTypeName == "angle") {
angleEditor *editor = new angleEditor(m_ps);
- if(m_properties.contains(m_currentProp->text(0)) !=0 )
+ if(m_properties.tqcontains(m_currentProp->text(0)) !=0 )
editor->setInitialValue(m_properties[m_currentProp->text(0)]);
else
- editor->setInitialValue(TQString::null);
+ editor->setInitialValue(TQString());
m_ps->installMiniEditor(editor);
}
else
@@ -454,7 +454,7 @@ void CSSEditor::setMiniEditors(TQListViewItem* i){
if( valueTypeName == "colors") {
RGBcolorSlider *RGBeditor = new RGBcolorSlider(m_ps);
colorRequester *CReditor = new colorRequester(m_ps);
- if(m_properties.contains(m_currentProp->text(0)) !=0 ){
+ if(m_properties.tqcontains(m_currentProp->text(0)) !=0 ){
CReditor->lineEdit()->setText(m_properties[m_currentProp->text(0)]);
CReditor->setInitialValue();
@@ -474,10 +474,10 @@ void CSSEditor::setMiniEditors(TQListViewItem* i){
else
if( valueTypeName == "fontDialog" ){
fontEditor *editor = new fontEditor(m_ps);
- if(m_properties.contains(m_currentProp->text(0)) !=0 ){
+ if(m_properties.tqcontains(m_currentProp->text(0)) !=0 ){
editor->setInitialValue(m_properties[m_currentProp->text(0)]);
}
- else editor->setInitialValue(TQString::null);
+ else editor->setInitialValue(TQString());
m_ps->installMiniEditor(editor);
}
}
@@ -491,10 +491,10 @@ void CSSEditor::checkProperty(const TQString& v){
m_currentProp->setOn(true);
if( m_currentProp->depth() ){
- myCheckListItem *p = static_cast<myCheckListItem*>(m_currentProp->parent());
+ myCheckListItem *p = static_cast<myCheckListItem*>(m_currentProp->tqparent());
while(p){
p->setOn(true);
- p=static_cast<myCheckListItem*>(p->parent());
+ p=static_cast<myCheckListItem*>(p->tqparent());
}
}