summaryrefslogtreecommitdiff
path: root/noncore/settings/tabmanager/tablistview.h
authorleseb <leseb>2002-07-08 14:58:34 (UTC)
committer leseb <leseb>2002-07-08 14:58:34 (UTC)
commit8b6a15ef84bc6b1c9c1a82689788c6e281780495 (patch) (side-by-side diff)
tree1d2c2f416aab46103d244a0b9d5b1c764c9f5452 /noncore/settings/tabmanager/tablistview.h
parentc92049007eaf6615a059425073b03a827d11831e (diff)
downloadopie-8b6a15ef84bc6b1c9c1a82689788c6e281780495.zip
opie-8b6a15ef84bc6b1c9c1a82689788c6e281780495.tar.gz
opie-8b6a15ef84bc6b1c9c1a82689788c6e281780495.tar.bz2
Sync with 1.2 version + some bug fixes
Diffstat (limited to 'noncore/settings/tabmanager/tablistview.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/tabmanager/tablistview.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/noncore/settings/tabmanager/tablistview.h b/noncore/settings/tabmanager/tablistview.h
index 97f9dec..dfd88f7 100644
--- a/noncore/settings/tabmanager/tablistview.h
+++ b/noncore/settings/tabmanager/tablistview.h
@@ -2,43 +2,43 @@
#define TABLISTVIEW_H
#include <qlistview.h>
#include <qcursor.h>
#include <qapplication.h>
-class TabListView : public QListView {
+class TabListView : public QListView {
Q_OBJECT
-
+
signals:
void moveItem(QListViewItem *item, QListViewItem *newFolder);
public:
TabListView( QWidget* parent = 0, const char* name = 0) : QListView(parent, name){ currentSelectedItem = NULL;
connect(this, SIGNAL(pressed ( QListViewItem *)), this, SLOT(itemPressed(QListViewItem *)));
internalCursor.setShape(0);
};
protected:
void contentsMouseReleaseEvent(QMouseEvent* ){
- QListViewItem *newGroup = this->currentItem();
+ QListViewItem *newGroup = this->currentItem();
// Make sure they are both real.
if (currentSelectedItem == NULL || newGroup == NULL)
return;
// Make sure they are not the same
if(this->isSelected(currentSelectedItem) == true)
return;
-
+
// Ok we have two valid items.
if(newGroup->parent())
newGroup = newGroup->parent();
-
+
// Just in case the parent was null
if(newGroup == NULL)
return;
-
- // If the new folder and buddies current parent are the same don't do anything.
+
+ // If the new folder and buddies current parent are the same don't do anything.
if (newGroup != currentSelectedItem->parent())
moveItem(currentSelectedItem, newGroup);
currentSelectedItem = NULL;
qApp->restoreOverrideCursor();
};
@@ -46,20 +46,20 @@ private slots:
void itemPressed(QListViewItem *item){
if(item == NULL || !item->parent()){
if(item == NULL)
qDebug("Item is NULL");
return;
}
-
+
currentSelectedItem = item;
internalCursor.setShape(13);
qApp->setOverrideCursor(internalCursor);
};
private:
QListViewItem *currentSelectedItem;
QCursor internalCursor;
};
#endif
-
+