summaryrefslogtreecommitdiffstats
path: root/umbrello/umbrello/umllistviewitem.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:51:49 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:51:49 +0000
commit4ae0c208b66e0f7954e194384464fe2d0a2c56dd (patch)
treeb0a7cd1c184f0003c0292eb416ed27f674f9cc43 /umbrello/umbrello/umllistviewitem.cpp
parent1964ea0fb4ab57493ca2ebb709c8d3b5395fd653 (diff)
downloadtdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.tar.gz
tdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1157652 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'umbrello/umbrello/umllistviewitem.cpp')
-rw-r--r--umbrello/umbrello/umllistviewitem.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/umbrello/umbrello/umllistviewitem.cpp b/umbrello/umbrello/umllistviewitem.cpp
index c24ac853..89bb581c 100644
--- a/umbrello/umbrello/umllistviewitem.cpp
+++ b/umbrello/umbrello/umllistviewitem.cpp
@@ -16,8 +16,8 @@
#include <cstdlib>
// qt/kde includes
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <kapplication.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -39,9 +39,9 @@
UMLListView* UMLListViewItem::s_pListView = 0;
-UMLListViewItem::UMLListViewItem( UMLListView * parent, const QString &name,
+UMLListViewItem::UMLListViewItem( UMLListView * parent, const TQString &name,
Uml::ListView_Type t, UMLObject* o)
- : QListViewItem(parent, name) {
+ : TQListViewItem(parent, name) {
init(parent);
m_Type = t;
m_pObject = o;
@@ -53,19 +53,19 @@ UMLListViewItem::UMLListViewItem( UMLListView * parent, const QString &name,
}
UMLListViewItem::UMLListViewItem(UMLListView * parent)
- : QListViewItem(parent) {
+ : TQListViewItem(parent) {
init(parent);
if (parent == NULL)
kDebug() << "UMLListViewItem constructor called with a NULL listview parent" << endl;
}
UMLListViewItem::UMLListViewItem(UMLListViewItem * parent)
- : QListViewItem(parent) {
+ : TQListViewItem(parent) {
init();
}
-UMLListViewItem::UMLListViewItem(UMLListViewItem * parent, const QString &name, Uml::ListView_Type t,UMLObject*o)
- : QListViewItem(parent, name) {
+UMLListViewItem::UMLListViewItem(UMLListViewItem * parent, const TQString &name, Uml::ListView_Type t,UMLObject*o)
+ : TQListViewItem(parent, name) {
init();
m_Type = t;
m_pObject = o;
@@ -83,8 +83,8 @@ UMLListViewItem::UMLListViewItem(UMLListViewItem * parent, const QString &name,
setText( name );
}
-UMLListViewItem::UMLListViewItem(UMLListViewItem * parent, const QString &name, Uml::ListView_Type t,Uml::IDType id)
- : QListViewItem(parent, name) {
+UMLListViewItem::UMLListViewItem(UMLListViewItem * parent, const TQString &name, Uml::ListView_Type t,Uml::IDType id)
+ : TQListViewItem(parent, name) {
init();
m_Type = t;
m_nId = id;
@@ -176,13 +176,13 @@ void UMLListViewItem::setID(Uml::IDType id) {
}
bool UMLListViewItem::isOwnParent(Uml::IDType listViewItemID) {
- QListViewItem *lvi = (QListViewItem*)s_pListView->findItem(listViewItemID);
+ TQListViewItem *lvi = (TQListViewItem*)s_pListView->findItem(listViewItemID);
if (lvi == NULL) {
kError() << "UMLListViewItem::isOwnParent: ListView->findItem("
<< ID2STR(listViewItemID) << ") returns NULL" << endl;
return true;
}
- for (QListViewItem *self = (QListViewItem*)this; self; self = self->parent()) {
+ for (TQListViewItem *self = (TQListViewItem*)this; self; self = self->parent()) {
if (lvi == self)
return true;
}
@@ -195,7 +195,7 @@ void UMLListViewItem::updateObject() {
Uml::Visibility scope = m_pObject->getVisibility();
Uml::Object_Type ot = m_pObject->getBaseType();
- QString modelObjText = m_pObject->getName();
+ TQString modelObjText = m_pObject->getName();
if (Model_Utils::isClassifierListitem(ot)) {
UMLClassifierListItem *pNarrowed = static_cast<UMLClassifierListItem*>(m_pObject);
modelObjText = pNarrowed->toString(Uml::st_SigNoVis);
@@ -258,16 +258,16 @@ void UMLListViewItem::updateFolder() {
}
void UMLListViewItem::setOpen( bool open ) {
- QListViewItem::setOpen( open );
+ TQListViewItem::setOpen( open );
updateFolder();
}
-void UMLListViewItem::setText(const QString &newText) {
+void UMLListViewItem::setText(const TQString &newText) {
m_Label = newText;
- QListViewItem::setText(0, newText);
+ TQListViewItem::setText(0, newText);
}
-QString UMLListViewItem::getText() const {
+TQString UMLListViewItem::getText() const {
return m_Label;
}
@@ -276,11 +276,11 @@ void UMLListViewItem::setIcon(Uml::Icon_Type iconType) {
}
void UMLListViewItem::okRename( int col ) {
- QListViewItem::okRename( col );
+ TQListViewItem::okRename( col );
UMLDoc* doc = s_pListView->getDocument();
if (m_bCreating) {
m_bCreating = false;
- QString savedLabel = m_Label;
+ TQString savedLabel = m_Label;
m_Label = text(col);
if ( s_pListView->itemRenamed( this, col ) ) {
s_pListView->ensureItemVisible(this);
@@ -290,7 +290,7 @@ void UMLListViewItem::okRename( int col ) {
}
return;
}
- QString newText = text( col );
+ TQString newText = text( col );
if ( newText == m_Label ) {
return;
}
@@ -371,7 +371,7 @@ void UMLListViewItem::okRename( int col ) {
Model_Utils::psText(st),
i18n("Rename canceled") );
}
- QListViewItem::setText(0, m_Label);
+ TQListViewItem::setText(0, m_Label);
break;
}
@@ -405,7 +405,7 @@ void UMLListViewItem::okRename( int col ) {
Model_Utils::psText(st),
i18n("Rename canceled") );
}
- QListViewItem::setText(0, m_Label);
+ TQListViewItem::setText(0, m_Label);
break;
}
@@ -433,7 +433,7 @@ void UMLListViewItem::okRename( int col ) {
Model_Utils::psText(st),
i18n("Rename canceled") );
}
- QListViewItem::setText(0, m_Label);
+ TQListViewItem::setText(0, m_Label);
break;
}
@@ -467,7 +467,7 @@ void UMLListViewItem::okRename( int col ) {
KMessageBox::error( kapp->mainWidget() ,
i18n("Renaming an item of listview type %1 is not yet implemented.").arg(m_Type),
i18n("Function Not Implemented") );
- QListViewItem::setText(0, m_Label);
+ TQListViewItem::setText(0, m_Label);
break;
}
doc->setModified(true);
@@ -477,11 +477,11 @@ void UMLListViewItem::cancelRenameWithMsg() {
KMessageBox::error( kapp->mainWidget() ,
i18n("The name you entered was invalid.\nRenaming process has been canceled."),
i18n("Name Not Valid") );
- QListViewItem::setText(0, m_Label);
+ TQListViewItem::setText(0, m_Label);
}
void UMLListViewItem::cancelRename(int col) {
- QListViewItem::cancelRename(col);
+ TQListViewItem::cancelRename(col);
if (m_bCreating) {
s_pListView->cancelRename(this);
}
@@ -489,7 +489,7 @@ void UMLListViewItem::cancelRename(int col) {
// Sort the listview items by type and position within the corresponding list
// of UMLObjects. If the item does not have an UMLObject then place it last.
-int UMLListViewItem::compare(QListViewItem *other, int col, bool ascending) const
+int UMLListViewItem::compare(TQListViewItem *other, int col, bool ascending) const
{
UMLListViewItem *ulvi = static_cast<UMLListViewItem*>(other);
Uml::ListView_Type ourType = getType();
@@ -503,7 +503,7 @@ int UMLListViewItem::compare(QListViewItem *other, int col, bool ascending) cons
const bool subItem = Model_Utils::typeIsClassifierList(ourType);
const int alphaOrder = key(col, ascending).compare(other->key(col, ascending));
int retval = 0;
- QString dbgPfx = "compare(type=" + QString::number((int)ourType)
+ TQString dbgPfx = "compare(type=" + TQString::number((int)ourType)
+ ", self=" + getText() + ", other=" + ulvi->getText()
+ "): return ";
UMLObject *otherObj = ulvi->getUMLObject();
@@ -577,7 +577,7 @@ int UMLListViewItem::compare(QListViewItem *other, int col, bool ascending) cons
}
UMLListViewItem* UMLListViewItem::deepCopy(UMLListViewItem *newParent) {
- QString nm = getText();
+ TQString nm = getText();
Uml::ListView_Type t = getType();
UMLObject *o = getUMLObject();
UMLListViewItem* newItem;
@@ -627,10 +627,10 @@ UMLListViewItem * UMLListViewItem::findItem(Uml::IDType id) {
return NULL;
}
-void UMLListViewItem::saveToXMI( QDomDocument & qDoc, QDomElement & qElement) {
- QDomElement itemElement = qDoc.createElement( "listitem" );
+void UMLListViewItem::saveToXMI( TQDomDocument & qDoc, TQDomElement & qElement) {
+ TQDomElement itemElement = qDoc.createElement( "listitem" );
Uml::IDType id = getID();
- QString idStr = ID2STR(id);
+ TQString idStr = ID2STR(id);
//kDebug() << "UMLListViewItem::saveToXMI: id = " << idStr
// << ", type = " << m_Type << endl;
if (id != Uml::id_None)
@@ -660,7 +660,7 @@ void UMLListViewItem::saveToXMI( QDomDocument & qDoc, QDomElement & qElement) {
}
}
itemElement.setAttribute("open", isOpen());
- QDomElement folderRoot;
+ TQDomElement folderRoot;
UMLListViewItem *childItem = static_cast<UMLListViewItem*>( firstChild() );
while (childItem) {
childItem->saveToXMI(qDoc, itemElement);
@@ -669,11 +669,11 @@ void UMLListViewItem::saveToXMI( QDomDocument & qDoc, QDomElement & qElement) {
qElement.appendChild( itemElement );
}
-bool UMLListViewItem::loadFromXMI(QDomElement& qElement) {
- QString id = qElement.attribute( "id", "-1" );
- QString type = qElement.attribute( "type", "-1" );
- QString label = qElement.attribute( "label", "" );
- QString open = qElement.attribute( "open", "1" );
+bool UMLListViewItem::loadFromXMI(TQDomElement& qElement) {
+ TQString id = qElement.attribute( "id", "-1" );
+ TQString type = qElement.attribute( "type", "-1" );
+ TQString label = qElement.attribute( "label", "" );
+ TQString open = qElement.attribute( "open", "1" );
if (!label.isEmpty())
setText( label );
else if (id == "-1") {