projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Build without QWebKit
[quassel.git]
/
src
/
client
/
selectionmodelsynchronizer.h
diff --git
a/src/client/selectionmodelsynchronizer.h
b/src/client/selectionmodelsynchronizer.h
index
2e153b6
..
3355085
100644
(file)
--- a/
src/client/selectionmodelsynchronizer.h
+++ b/
src/client/selectionmodelsynchronizer.h
@@
-1,5
+1,5
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-0
8
by the Quassel Project *
+ * Copyright (C) 2005-0
9
by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-32,7
+32,7
@@
class SelectionModelSynchronizer : public QObject {
public:
SelectionModelSynchronizer(QAbstractItemModel *parent = 0);
public:
SelectionModelSynchronizer(QAbstractItemModel *parent = 0);
- void
add
SelectionModel(QItemSelectionModel *selectionModel);
+ void
synchronize
SelectionModel(QItemSelectionModel *selectionModel);
void removeSelectionModel(QItemSelectionModel *selectionModel);
inline QAbstractItemModel *model() { return _model; }
void removeSelectionModel(QItemSelectionModel *selectionModel);
inline QAbstractItemModel *model() { return _model; }
@@
-40,13
+40,9
@@
public:
inline QModelIndex currentIndex() const { return _selectionModel.currentIndex(); }
inline QItemSelection currentSelection() const { return _selectionModel.selection(); }
inline QModelIndex currentIndex() const { return _selectionModel.currentIndex(); }
inline QItemSelection currentSelection() const { return _selectionModel.selection(); }
-signals:
- void setCurrentIndex(const QModelIndex ¤t, QItemSelectionModel::SelectionFlags command);
- void select(const QItemSelection &selected, QItemSelectionModel::SelectionFlags command);
-
private slots:
private slots:
- void
mapp
edCurrentChanged(const QModelIndex ¤t, const QModelIndex &previous);
- void
mapp
edSelectionChanged(const QItemSelection &selected, const QItemSelection &previous);
+ void
sync
edCurrentChanged(const QModelIndex ¤t, const QModelIndex &previous);
+ void
sync
edSelectionChanged(const QItemSelection &selected, const QItemSelection &previous);
void setCurrentIndex(const QModelIndex &index);
void setCurrentSelection(const QItemSelection &selection);
void setCurrentIndex(const QModelIndex &index);
void setCurrentSelection(const QItemSelection &selection);
@@
-54,15
+50,21
@@
private slots:
void currentChanged(const QModelIndex ¤t, const QModelIndex &previous);
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
void currentChanged(const QModelIndex ¤t, const QModelIndex &previous);
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
+ void selectionModelDestroyed(QObject *object);
+
private:
QAbstractItemModel *_model;
QItemSelectionModel _selectionModel;
private:
QAbstractItemModel *_model;
QItemSelectionModel _selectionModel;
+ bool _changeCurrentEnabled;
+ bool _changeSelectionEnabled;
bool checkBaseModel(QItemSelectionModel *model);
bool checkBaseModel(QItemSelectionModel *model);
+ QModelIndex mapFromSource(const QModelIndex &sourceIndex, const QItemSelectionModel *selectionModel);
+ QItemSelection mapSelectionFromSource(const QItemSelection &sourceSelection, const QItemSelectionModel *selectionModel);
QModelIndex mapToSource(const QModelIndex &index, QItemSelectionModel *selectionModel);
QItemSelection mapSelectionToSource(const QItemSelection &selection, QItemSelectionModel *selectionModel);
QModelIndex mapToSource(const QModelIndex &index, QItemSelectionModel *selectionModel);
QItemSelection mapSelectionToSource(const QItemSelection &selection, QItemSelectionModel *selectionModel);
-
+ QSet<QItemSelectionModel *> _selectionModels;
};
#endif
};
#endif