Model/View contactlist.
19 answers - 1030 bytes -

Hello.
So we are going soon or later to drop the Q3ListView stuff for the
contactlist.
I have made an experimental contactlist using QAbstractItemModel.
I have to say i'm still not convinced by the supposed advantage of
QAbstractItemModel.
We could as well use QTreeWidget, and have subclass of QTreeWidgetItem for
MetaContactLVI and GroupLVI like we have now.
Could you explain me how having his own model is better ? thanks.
Anyway, i think that Kopete::ContactList (KCL) and ContactListModel (CLM)
must be two separate class.
KCL, in libkopete, is the central storage class (in memory) which make the
interface between protocols, plugins, and the contact list ui
CLM is part of the contact list ui. There is no reason to have it in
libkopete, and let plugins see that.
I'm not talking about the storage backend in this mail.
Is my attached draft the way to go ? am I completely wrong ?
I'm still discovering the inter view stuff.
No.1 | | 3582 bytes |
| 
2006/8/6, Goffart <ogoffart (AT) kde (DOT) org>:
Hello.
So we are going soon or later to drop the Q3ListView stuff for the
contactlist.
I have made an experimental contactlist using QAbstractItemModel.
I have to say i'm still not convinced by the supposed advantage of
QAbstractItemModel.
We could as well use QTreeWidget, and have subclass of QTreeWidgetItem for
MetaContactLVI and GroupLVI like we have now.
Could you explain me how having his own model is better ? thanks.
This model is better in the seens that you divide the data, from it's rendering.
This way you can have multiple view using the same model that are
affected when you affect one off the view.
If you look at one of the Qt model/view explanation, you'll see 2 file
list widgets.
When you select one item in the treeview, the selection also affect
the list view.
So do we have a real interest in such features, I would say yes,
because you can also add some filter model layers. And this is
interesting by example for the chat lists. So we have one model for
the contact list, but we may make the view more precise for the chats,
making a *who is in this chat* filter, and then a sort by name filter.
Another thing, if we have a tree view model, we also can use it as a
list view model (limited to one column, and only thee first ?)
And to conclude, the when the wiget interact with model, it knows when
to add/remove it's child Item, and we remove some memory management
problems ;) even if we have 10 views, the views will handle them for
us ;)
--
Anyway, i think that Kopete::ContactList (KCL) and ContactListModel (CLM)
must be two separate class.
I agree, due to the selection model (and maybe other), we must be able
to have multiple KCLM, refering to the KCL singleton.
KCL, in libkopete, is the central storage class (in memory) which make the
interface between protocols, plugins, and the contact list ui
CLM is part of the contact list ui. There is no reason to have it in
libkopete, and let plugins see that.
I would say that plugins have to see it. Like the main application.
Some plugins allow to refine their activity base on plugins account.
And it would be stupid that the plugins have to rewrite code to handle
such lists when we could reuse the libkopete ones
I'm not talking about the storage backend in this mail.
--
Is my attached draft the way to go ? am I completely wrong ?
I'm still discovering the inter view stuff.
For me what you wrote is the way to go. one final comment. Make
an intermediate , and use this
intermediate in all the views.
So that we could provide the real and direct
Kopete::ContactTreeViewModel and maybe somewhere else the
Kopete::DBusContactTreeView model (to finally allow remote view, for
cheap, and maybe even with the selection model updated every where)
I don't want to start a troll for that again, but it would be great to
separate the ui code from the main code again. thougth it will
requires us some effforts. And maybe we should also go for the kcm way
in the protocols also. In fact protocols don't really need to know
about how it's data will be represented. (icon status should be left
to application decision and for the buddy pictures it can be handled
as raw data in the protocols)
kopete-devel mailing list
kopete-devel (AT) kde (DOT) org
No.2 | | 3774 bytes |
| 
Le dimanche 6 2006 09:09, Michel Hermier a *:
2006/8/6, Goffart <ogoffart (AT) kde (DOT) org>:
This model is better in the seens that you divide the data, from it's
rendering. This way you can have multiple view using the same model that
are
affected when you affect one off the view.
If you look at one of the Qt model/view explanation, you'll see 2 file
list widgets.
When you select one item in the treeview, the selection also affect
the list view.
Yes, I have read the Qt documentation
So do we have a real interest in such features, I would say yes,
because you can also add some filter model layers. And this is
interesting by example for the chat lists.
That's an interesting point.
Could we share the main contactlist model with the chatwindow member list
model.
Indeed: there are similarities:
- It would be nice if the item would look the same
- they probably should have a similar context menu
But on the other hand:
- It's not the same contact: We will not add all IRC or Jabber MUC contact on
the contactlist[1]
- They are not stored by groups.
- We don't want to share the selection.
- They probably should not look exactly the same
So we have one model for
the contact list, but we may make the view more precise for the chats,
making a *who is in this chat* filter, and then a sort by name filter.
Another thing, if we have a tree view model, we also can use it as a
list view model (limited to one column, and only thee first ?)
We can do sorting even of a QTreeWidget
And to conclude, the when the wiget interact with model, it knows when
to add/remove it's child Item, and we remove some memory management
problems ;) even if we have 10 views, the views will handle them for
us ;)
What do you mean ?
We don't have memory management model in our current contactlist
KCL, in libkopete, is the central storage class (in memory) which make
the interface between protocols, plugins, and the contact list ui
CLM is part of the contact list ui. There is no reason to have it in
libkopete, and let plugins see that.
I would say that plugins have to see it. Like the main application.
Some plugins allow to refine their activity base on plugins account.
And it would be stupid that the plugins have to rewrite code to handle
such lists when we could reuse the libkopete ones
Can you give me one example of such list ?
Plugins only interact with the main contactlist.
The only thing they need to know is the selection, for
1- enabling/disabling actions according the selections
2- do the action on the selected contact.
But we have that in libkopete with
For me what you wrote is the way to go. one final comment. Make
an intermediate , and use this
intermediate in all the views.
So that we could provide the real and direct
Kopete::ContactTreeViewModel and maybe somewhere else the
Kopete::DBusContactTreeView model (to finally allow remote view, for
cheap, and maybe even with the selection model updated every where)
For DBus, we don't need a Model, but a DBusInterface.
Model are really tight to the UI
And the selection model can't (AFAIK) be shared between applications as it
(And why want we share the selection ?)
I don't want to start a troll for that again, but it would be great to
separate the ui code from the main code again. thougth it will
requires us some effforts.
Please see my other mail :-)
And maybe we should also go for the kcm way
in the protocols also.
What is the kcm way ?
No.3 | | 5596 bytes |
| 
>
So do we have a real interest in such features, I would say yes,
because you can also add some filter model layers. And this is
interesting by example for the chat lists.
That's an interesting point.
Could we share the main contactlist model with the chatwindow member list
model.
Indeed: there are similarities:
- It would be nice if the item would look the same
- they probably should have a similar context menu
But on the other hand:
- It's not the same contact: We will not add all IRC or Jabber MUC contact on
the contactlist[1]
- They are not stored by groups.
- We don't want to share the selection.
- They probably should not look exactly the same
This is a sorting and presentation problem it can be done by adding
some filter models.
And we can have multiple contact list. A contact list is a list after
all. We have THE VERY contact list with persistance, and the chat
contact lists. Anyway this can be seen as a huge list containing all
the contacts, and we filter it depending on some criteria, since THE
VERY contact can be filtered by a boolean or somthing to rebuild it.
And then THE VERY contact list be a view of the all contact list.
So we have one model for
the contact list, but we may make the view more precise for the chats,
making a *who is in this chat* filter, and then a sort by name filter.
Another thing, if we have a tree view model, we also can use it as a
list view model (limited to one column, and only thee first ?)
We can do sorting even of a QTreeWidget
And to conclude, the when the wiget interact with model, it knows when
to add/remove it's child Item, and we remove some memory management
problems ;) even if we have 10 views, the views will handle them for
us ;)
What do you mean ?
We don't have memory management model in our current contactlist
I know, but the view will handle the items creations no need to know
when it's necessary to create and delete the pointers, the view will
call do that for us.
KCL, in libkopete, is the central storage class (in memory) which make
the interface between protocols, plugins, and the contact list ui
CLM is part of the contact list ui. There is no reason to have it in
libkopete, and let plugins see that.
I would say that plugins have to see it. Like the main application.
Some plugins allow to refine their activity base on plugins account.
And it would be stupid that the plugins have to rewrite code to handle
such lists when we could reuse the libkopete ones
Can you give me one example of such list ?
Maybe I mixed something here, but it can be can be interesting to
allow some plugins to not be global. So such plugin should be able to
select contact where to apply the plugin (some kind of tree of check
boxes)
example would be Javascript :D where you could allow some contacts
to use it remotely, and some not. a spell cheking based on the
nationality of your peers
Plugins only interact with the main contactlist.
The only thing they need to know is the selection, for
1- enabling/disabling actions according the selections
2- do the action on the selected contact.
But we have that in libkopete with
The contact list don't have to know wich elements are selected, the
selection of elements belongs to the model. ContactList is simply a
list after all, the model know how to interact with the list, and know
how to call actions to the selecteds contacts.
--
For me what you wrote is the way to go. one final comment. Make
an intermediate , and use this
intermediate in all the views.
So that we could provide the real and direct
Kopete::ContactTreeViewModel and maybe somewhere else the
Kopete::DBusContactTreeView model (to finally allow remote view, for
cheap, and maybe even with the selection model updated every where)
For DBus, we don't need a Model, but a DBusInterface.
Model are really tight to the UI
The DBusInterface would be with the Kopete::ContactTreeViewModel and
the DBusContactTreeView would know how to interact with this one (act
like a proxy).
So with the main application we have
KCL <=KCTVM <=KCTVWidget
And on a remote case
KCL <=KCTVM <=dbus=KDBusCTVM <=KCTVWidget
So we can reuse the same code for kparts ;) and that way all the
widgets looks the same.
And the selection model can't (AFAIK) be shared between applications as it
(And why want we share the selection ?)
So that all the view behave the same way. You have one view on the
main app and one on the desktop, if you click to prepare one action
and have to hide it, you would like to see the one on the desktop
allready clicked.
Maybe it also requires some QItemSelectionModel work with dbus and can
be done in a second step, with the same proxying trick.
I don't want to start a troll for that again, but it would be great to
separate the ui code from the main code again. thougth it will
requires us some effforts.
Please see my other mail :-)
And maybe we should also go for the kcm way
in the protocols also.
What is the kcm way ?
the way the plugins are splitted in to libs, the main plugin, and the
kcm part to control it via the gui.
kopete-devel mailing list
kopete-devel (AT) kde (DOT) org
No.4 | | 1286 bytes |
| 
Le dimanche 6 2006 12:00, Michel Hermier a *:
This is a sorting and presentation problem it can be done by adding
some filter models.
doing two completely different models
( using QTreeWidget without model)
I can assure you there will be not duplicated code.
[]
I'm not saying that we should not use the Model/View stuff.
But I still doesn't see the need of it.
No need to rush on that technology because it's new fashion in Qt.
We could simply use a QTreeWidget with LVI like this is done.
It seems it covers all our need, and is much simpler.
I don't want to start a troll for that again, but it would be great to
separate the ui code from the main code again. thougth it will
requires us some effforts.
Please see my other mail :-)
And maybe we should also go for the kcm way
in the protocols also.
What is the kcm way ?
the way the plugins are splitted in to libs, the main plugin, and the
kcm part to control it via the gui.
I see no reason to do that.
kopete-devel mailing list
kopete-devel (AT) kde (DOT) org
PGP SIGNATURE
Version: GnuPG v1.4.4 (GNU/Linux)
vmDR7swYjGhc/wQh8SsrQlM=
=eaNA
PGP SIGNATURE
No.5 | | 1745 bytes |
| 
Le dimanche 6 2006 17:07, M Larouche a *:
Le August 6, 2006 07:54, Goffart a *:
I'm not saying that we should not use the Model/View stuff.
But I still doesn't see the need of it.
No need to rush on that technology because it's new fashion in Qt.
We could simply use a QTreeWidget with LVI like this is done.
It seems it covers all our need, and is much simpler.
Yes I agree that Interview is a big beast and the learning curve is high.
I still didn't catch the whole concept of this new framework.
thing for sure, it will save us maintainability in lorg term and will
give us more power and flexibility.
For sure ?
It seems more complex.
And more complex = harder to maintain.
From the Qt documentation: (QTreeWidget)
|The QTreeWidget class provides a tree view that uses a predefined tree model.
|The QTreeWidget class is a convenience class that provides a standard tree
|widget with a classic item-based interface similar to that used by the
|QListView class in Qt 3. []
|Developers who do not need the flexibility of the Model/View framework can
|use this class to create simple hierarchical lists very easily. A more
|flexible approach involves combining a QTreeView with a standard item model.
|This allows the storage of data to be separated from its representation.
What is this flexibility that we need ?
Note that our storage data is already separated from it's representation in
the Kopete::ContactList
kopete-devel mailing list
kopete-devel (AT) kde (DOT) org
PGP SIGNATURE
Version: GnuPG v1.4.5 (GNU/Linux)
53GkIso2w4V9DQNYE=
=PQaM
PGP SIGNATURE
No.6 | | 757 bytes |
| 
For me what you wrote is the way to go. one final comment. Make
an intermediate , and use this
intermediate in all the views.
So that we could provide the real and direct
Kopete::ContactTreeViewModel and maybe somewhere else the
Kopete::DBusContactTreeView model (to finally allow remote view, for
cheap, and maybe even with the selection model updated every where)
You are a bit wrong, D-BUS should in a model (or in a storage) not in a view.
But yes, it should be nice to save differents types of view (list, tree) that
use common drawing code.
I meant , the view code would be
the same using the same Kopete::ContactTreeView.
kopete-devel mailing list
kopete-devel (AT) kde (DOT) org
No.7 | | 1831 bytes |
| 
Sunday 06 August 2006 10:30, Goffart wrote:
Le dimanche 6 t 2006 17:07, Ml Larouche a *:
thing for sure, it will save us maintainability in lorg term and will
give us more power and flexibility.
For sure ?
It seems more complex.
And more complex = harder to maintain.
actually, once you write a model it's pretty near zero maintenance for the
model and you can switch view methods much, much easier since they data is
not tied to the view at all.
by keeping the data coupled to the view, you will never be able to experiment
too wildly with views and uses of that data because the effort of doing so
will be too high.
this approach also introduces complexity in the form of having to manage both
data and view in one place. the complexity of the MV approach is party a
perception thing due to being new (meaning we have to learn things) and only
partly due to actually being more complex.
What is this flexibility that we need ?
Note that our storage data is already separated from it's representation in
the Kopete::ContactList
and the contactlist data structure ought to be able to feed directly into
views.
one of the use cases kopete will run into is being able to bridge the contact
data to lists that appear on the desktop or in other applications. identity
is moving more and more towards sharing and coordinating this data between
multiple apps. having a model that is simultaneously what feeds the views and
is what is coordinated with these external sources will almost certainly keep
things simpler over the long haul.
of course, this isn't my app i'm not designing it, writing it, etc. so
yeah. i'm just an annoying bystander who very occasionally submits patches ;)
No.8 | | 2346 bytes |
| 
Aaron J. Seigo wrote:
Sunday 06 August 2006 10:30, Goffart wrote:
>Le dimanche 6 2006 17:07, M Larouche a :
>
thing for sure, it will save us maintainability in lorg term and will
give us more power and flexibility.
>For sure ?
>>
>It seems more complex.
>And more complex = harder to maintain.
>
>
actually, once you write a model it's pretty near zero maintenance for the
model and you can switch view methods much, much easier since they data is
not tied to the view at all.
by keeping the data coupled to the view, you will never be able to experiment
too wildly with views and uses of that data because the effort of doing so
will be too high.
this approach also introduces complexity in the form of having to manage both
data and view in one place. the complexity of the MV approach is party a
perception thing due to being new (meaning we have to learn things) and only
partly due to actually being more complex.
>What is this flexibility that we need ?
>>
>Note that our storage data is already separated from it's representation in
>the Kopete::ContactList
>
>
and the contactlist data structure ought to be able to feed directly into
views.
one of the use cases kopete will run into is being able to bridge the contact
data to lists that appear on the desktop or in other applications. identity
is moving more and more towards sharing and coordinating this data between
multiple apps. having a model that is simultaneously what feeds the views and
is what is coordinated with these external sources will almost certainly keep
things simpler over the long haul.
of course, this isn't my app i'm not designing it, writing it, etc. so
yeah. i'm just an annoying bystander who very occasionally submits patches ;)
kopete-devel mailing list
kopete-devel (AT) kde (DOT) org
WILL YU PLEASE STP SENDING ME EMAILS?IV'E HAVE ASKED YU NICELY AND
YU TAKE N NTICE.THATS WHY I'M SHUTING!
kopete-devel mailing list
kopete-devel (AT) kde (DOT) org
No.9 | | 1683 bytes |
| 
Hi Aaron, thanks for your reply.
Le dimanche 6 t 2006 21:47, Aaron J. Seigo a *:
Sunday 06 August 2006 10:30, Goffart wrote:
by keeping the data coupled to the view, you will never be able to
experiment too wildly with views and uses of that data because the effort
of doing so will be too high.
this approach also introduces complexity in the form of having to manage
both data and view in one place. the complexity of the MV approach is party
a perception thing due to being new (meaning we have to learn things) and
only partly due to actually being more complex.
I think understand this. But I think this is already the case in Kopete,
without the need of a QAbstactItemModel stuff and all theses QModelIndex.
what's the difference ? (I'm asking to Matt, Michel and Ml)
Note that our storage data is already separated from it's representation
in the Kopete::ContactList
and the contactlist data structure ought to be able to feed directly into
views.
What do you mean ?
one of the use cases kopete will run into is being able to bridge the
contact data to lists that appear on the desktop or in other applications.
identity is moving more and more towards sharing and coordinating this data
between multiple apps.
And that's one important topics.
But I fail to see how QAbstractItemModel helps.
What we need here is a defined dbus interface.
kopete-devel mailing list
kopete-devel (AT) kde (DOT) org
PGP SIGNATURE
Version: GnuPG v1.4.5 (GNU/Linux)
hEMwcIeTo1ZZKakXUdi5L3Q=
=T4Hz
PGP SIGNATURE
No.10 | | 2717 bytes |
| 
Sunday 06 August 2006 16:11, Edward Barr wrote:
Aaron J. Seigo wrote:
Sunday 06 August 2006 10:30, Goffart wrote:
>Le dimanche 6 2006 17:07, M Larouche a :
thing for sure, it will save us maintainability in lorg term and
will give us more power and flexibility.
>>
>For sure ?
>>
>It seems more complex.
>And more complex = harder to maintain.
>
actually, once you write a model it's pretty near zero maintenance for
the model and you can switch view methods much, much easier since they
data is not tied to the view at all.
by keeping the data coupled to the view, you will never be able to
experiment too wildly with views and uses of that data because the effort
of doing so will be too high.
this approach also introduces complexity in the form of having to manage
both data and view in one place. the complexity of the MV approach is
party a perception thing due to being new (meaning we have to learn
things) and only partly due to actually being more complex.
>
>What is this flexibility that we need ?
>>
>Note that our storage data is already separated from it's representation
>in the Kopete::ContactList
>
and the contactlist data structure ought to be able to feed directly into
views.
one of the use cases kopete will run into is being able to bridge the
contact data to lists that appear on the desktop or in other
applications. identity is moving more and more towards sharing and
coordinating this data between multiple apps. having a model that is
simultaneously what feeds the views and is what is coordinated with these
external sources will almost certainly keep things simpler over the long
haul.
of course, this isn't my app i'm not designing it, writing it, etc. so
yeah. i'm just an annoying bystander who very occasionally submits
patches ;)
--
kopete-devel mailing list
kopete-devel (AT) kde (DOT) org
WILL YU PLEASE STP SENDING ME EMAILS?IV'E HAVE ASKED YU NICELY AND
YU TAKE N NTICE.THATS WHY I'M SHUTING!
kopete-devel mailing list
kopete-devel (AT) kde (DOT) org
If you find yourself not wishing to receive mailing list messages anymore,
you're free to unsubscribe from the list at any time. For the rest of the
list, I'm very interested in seeing why we're making the very core changes
we're making to this codebase. Please calm down. Thanks.
No.11 | | 1404 bytes |
| 
Sunday 06 August 2006 15:52, Goffart wrote:
and the contactlist data structure ought to be able to feed directly into
views.
What do you mean ?
having a data structure for contacts, a view and then a bridge between those
two that needs to maintained is not necessary these days.
we have the ability to provide a data model and tell a view "show this model"
and with 0 work to show that model in the view have it shown.
this means when you modify the data structures the views (which may not be
visual, btw) are updated as there is no sync issue to do with data<->view
bridges.
one of the use cases kopete will run into is being able to bridge the
contact data to lists that appear on the desktop or in other
applications. identity is moving more and more towards sharing and
coordinating this data between multiple apps.
And that's one important topics.
But I fail to see how QAbstractItemModel helps.
What we need here is a defined dbus interface.
the dbus interface would interface to the data structure. if someone removes a
contact via dbus and the data structure is a QAM then the visual views will
update automatically.
no manually synchronizing changes from out of the GUI with the GUI. no
manually synchronizing changes in 2 views with the data structures and each
other. etc
No.12 | | 5421 bytes |
| 
This is a long post. If you're not willing to read it all (but you should
really read it all), here's the executive summary:
There should be one main contact list model. It should replace
Kopete::ContactList and continue to provide the same functionality as that
class does. We should start out with a simple view first. We'll have to write
a custom view in order to get more features. Storage backends exist in order
to abstract the persistance of the contact list. We don't care how it's
stored as long as it's stored. While kopete is loaded, we only care about the
model or what's in memory. Please find me if you have questions, I'll be
happy to answer as long as you're willing to listen and attempt to understand
my explanation.
Saturday 05 August 2006 18:30, Goffart wrote:
Hello.
So we are going soon or later to drop the Q3ListView stuff for the
contactlist.
I have made an experimental contactlist using QAbstractItemModel.
I have to say i'm still not convinced by the supposed advantage of
QAbstractItemModel.
We could as well use QTreeWidget, and have subclass of QTreeWidgetItem for
MetaContactLVI and GroupLVI like we have now.
Could you explain me how having his own model is better ? thanks.
--
Anyway, i think that Kopete::ContactList (KCL) and ContactListModel (CLM)
must be two separate class.
I disagree, and you fail to specify why you think this. I did not take part in
the discussion on IRC about this.
KCL, in libkopete, is the central storage class (in memory) which make the
interface between protocols, plugins, and the contact list ui
CLM is part of the contact list ui. There is no reason to have it in
libkopete, and let plugins see that.
You're getting model/view confused. The model has nothing to do with the view.
Think of the view as being a child of the model. The model can exist without
the view. However, the view cannot have a meaningful existance without the
model.
I'm not talking about the storage backend in this mail.
--
Is my attached draft the way to go ? am I completely wrong ?
I'm still discovering the inter view stuff.
You are not completely wrong, but perhaps it would be best if I were to better
explain my original designs for the contact list model, attempt to detail the
possible advantages, disadvantages, etc., and attempt to provide more
information, since this is all my design, and I just handed it off to kedge
and DarkShock for the moment. Perhaps you can take this information and come
up with something better than what you've presented here.
There should be one main contact list model. It will serve many purposes,
which include, but are not limited to:
1. Being the main container of contact list data as it is contained in memory.
2. Being the interface between the contact list data and those wishing to
access it (plugins, protocols, views, etc.)
It should take over the current functions of the Kopete::ContactList class as
it currently exists. It should reside in libkopete (naturally)
There can be many other contact list models that should be thought of as child
models of the main contact list model. These will serve other purposes, such
as:
- providing easy searching and filtering.
- providing an easy way to change the way the contact list is viewed. (We tell
the view to use a certain model, and we have instant filtering by protocols,
for example)
It might help to think of this as a modified usage of the Strategy design
pattern currently used in the contact list view. The concept is very similar
at least.
Initially, the view should consist of a simple Qt view. Either a QListView for
providing a simple list of all contacts, or a QTreeView if we wish to keep
the current way of viewing things. We will have to write our own custom view
class in order to provide the rest of the features and functionality that we
currently have. Multiple view classes may be required depending on how the
contact list information is to be displayed, but I hadn't thought that far
ahead, to be honest.
Please be sure to read _all_ the documentation linked to from
If you don't
understand it the first time, reread it. It took me three reads before I felt
like I understood enough to design something around it.
To answer you question about why we need a model: The model provides a way for
us to abstract our data in such a way that the view displaying our data does
not know and does not care about internal data structures.
To touch on the storage backends quickly: Their sole purpose is to abstract
the persistance of our contact list data for reuse later. We don't really
care how it's stored, we just want to store it, aka loose coupling.
If _anybody_ has any questions about the contact list model, please either
email me, find me on IRC or IM, and I will be happy to answer any questions
you might have. It's been quite hard for me to put the design in words
adequate enough to be easily understandable.
I sincerely hope this helps explain things. I really did not think there would
be this much fuss over this.
No.13 | | 3710 bytes |
| 
Sunday 06 August 2006 02:09, Michel Hermier wrote:
2006/8/6, Goffart <ogoffart (AT) kde (DOT) org>:
Hello.
So we are going soon or later to drop the Q3ListView stuff for the
contactlist.
I have made an experimental contactlist using QAbstractItemModel.
I have to say i'm still not convinced by the supposed advantage of
QAbstractItemModel.
We could as well use QTreeWidget, and have subclass of QTreeWidgetItem
for MetaContactLVI and GroupLVI like we have now.
Could you explain me how having his own model is better ? thanks.
This model is better in the seens that you divide the data, from it's
rendering. This way you can have multiple view using the same model that
are
affected when you affect one off the view.
If you look at one of the Qt model/view explanation, you'll see 2 file
list widgets.
When you select one item in the treeview, the selection also affect
the list view.
So do we have a real interest in such features, I would say yes,
because you can also add some filter model layers. And this is
interesting by example for the chat lists. So we have one model for
the contact list, but we may make the view more precise for the chats,
making a *who is in this chat* filter, and then a sort by name filter.
Another thing, if we have a tree view model, we also can use it as a
list view model (limited to one column, and only thee first ?)
And to conclude, the when the wiget interact with model, it knows when
to add/remove it's child Item, and we remove some memory management
problems ;) even if we have 10 views, the views will handle them for
us ;)
Anyway, i think that Kopete::ContactList (KCL) and ContactListModel
(CLM) must be two separate class.
I agree, due to the selection model (and maybe other), we must be able
to have multiple KCLM, refering to the KCL singleton.
The views handle the selection. What are you talking about here?
KCL, in libkopete, is the central storage class (in memory) which make
the interface between protocols, plugins, and the contact list ui
CLM is part of the contact list ui. There is no reason to have it in
libkopete, and let plugins see that.
I would say that plugins have to see it. Like the main application.
Some plugins allow to refine their activity base on plugins account.
And it would be stupid that the plugins have to rewrite code to handle
such lists when we could reuse the libkopete ones
I'm not talking about the storage backend in this mail.
--
Is my attached draft the way to go ? am I completely wrong ?
I'm still discovering the inter view stuff.
For me what you wrote is the way to go. one final comment. Make
an intermediate , and use this
intermediate in all the views.
So that we could provide the real and direct
Kopete::ContactTreeViewModel and maybe somewhere else the
Kopete::DBusContactTreeView model (to finally allow remote view, for
cheap, and maybe even with the selection model updated every where)
I don't want to start a troll for that again, but it would be great to
separate the ui code from the main code again. thougth it will
requires us some effforts. And maybe we should also go for the kcm way
in the protocols also. In fact protocols don't really need to know
about how it's data will be represented. (icon status should be left
to application decision and for the buddy pictures it can be handled
as raw data in the protocols)
I'm sure a split between core/gui will happen eventually. Just be patient.
No.14 | | 4060 bytes |
| 
Sunday 06 August 2006 04:11, Goffart wrote:
Le dimanche 6 2006 09:09, Michel Hermier a *:
2006/8/6, Goffart <ogoffart (AT) kde (DOT) org>:
This model is better in the seens that you divide the data, from it's
rendering. This way you can have multiple view using the same model that
are
affected when you affect one off the view.
If you look at one of the Qt model/view explanation, you'll see 2 file
list widgets.
When you select one item in the treeview, the selection also affect
the list view.
Yes, I have read the Qt documentation
So do we have a real interest in such features, I would say yes,
because you can also add some filter model layers. And this is
interesting by example for the chat lists.
That's an interesting point.
Could we share the main contactlist model with the chatwindow member list
model.
Indeed: there are similarities:
- It would be nice if the item would look the same
- they probably should have a similar context menu
But on the other hand:
- It's not the same contact: We will not add all IRC or Jabber MUC contact
on the contactlist[1]
- They are not stored by groups.
- We don't want to share the selection.
- They probably should not look exactly the same
So we have one model for
the contact list, but we may make the view more precise for the chats,
making a *who is in this chat* filter, and then a sort by name filter.
Another thing, if we have a tree view model, we also can use it as a
list view model (limited to one column, and only thee first ?)
We can do sorting even of a QTreeWidget
And to conclude, the when the wiget interact with model, it knows when
to add/remove it's child Item, and we remove some memory management
problems ;) even if we have 10 views, the views will handle them for
us ;)
What do you mean ?
We don't have memory management model in our current contactlist
KCL, in libkopete, is the central storage class (in memory) which make
the interface between protocols, plugins, and the contact list ui
CLM is part of the contact list ui. There is no reason to have it in
libkopete, and let plugins see that.
I would say that plugins have to see it. Like the main application.
Some plugins allow to refine their activity base on plugins account.
And it would be stupid that the plugins have to rewrite code to handle
such lists when we could reuse the libkopete ones
Can you give me one example of such list ?
Plugins only interact with the main contactlist.
The only thing they need to know is the selection, for
1- enabling/disabling actions according the selections
2- do the action on the selected contact.
But we have that in libkopete with
For me what you wrote is the way to go. one final comment. Make
an intermediate , and use this
intermediate in all the views.
So that we could provide the real and direct
Kopete::ContactTreeViewModel and maybe somewhere else the
Kopete::DBusContactTreeView model (to finally allow remote view, for
cheap, and maybe even with the selection model updated every where)
For DBus, we don't need a Model, but a DBusInterface.
Model are really tight to the UI
N! Models are not tied to any GUI! Views are the GUI. Models are simply data.
And the selection model can't (AFAIK) be shared between applications as it
(And why want we share the selection ?)
I don't want to start a troll for that again, but it would be great to
separate the ui code from the main code again. thougth it will
requires us some effforts.
Please see my other mail :-)
And maybe we should also go for the kcm way
in the protocols also.
What is the kcm way ?
The kcm way is basically doing with the protocols what we do with the all the
settings dialogs, and I am completely against doing something like that.
No.15 | | 775 bytes |
| 
WILL YU PLEASE STP SENDING ME EMAILS?IV'E HAVE ASKED YU NICELY AND
YU TAKE N NTICE.THATS WHY I'M SHUTING!
We have taken notice and a few people have politely sent you instructions on
how you can manually remove yourself from this list and stop your receiving
of these emails.
However, as requested, you have been unsubscribed from this mailing list. I
wish to point out that you could have removed yourself very easily by
visiting and entering the
appropriate information in the unsubscribe section of the page.
I also wish to point out that one can only get emails from this mailing list
by their own actions, since subscriptions are required to be confirmed by the
user requesting emails be sent to them.
Thanks
No.16 | | 4040 bytes |
| 
2006/8/7, Matt Rogers <mattr (AT) kde (DOT) org>:
Sunday 06 August 2006 02:09, Michel Hermier wrote:
2006/8/6, Goffart <ogoffart (AT) kde (DOT) org>:
Hello.
So we are going soon or later to drop the Q3ListView stuff for the
contactlist.
I have made an experimental contactlist using QAbstractItemModel.
I have to say i'm still not convinced by the supposed advantage of
QAbstractItemModel.
We could as well use QTreeWidget, and have subclass of QTreeWidgetItem
for MetaContactLVI and GroupLVI like we have now.
Could you explain me how having his own model is better ? thanks.
This model is better in the seens that you divide the data, from it's
rendering. This way you can have multiple view using the same model that
are
affected when you affect one off the view.
If you look at one of the Qt model/view explanation, you'll see 2 file
list widgets.
When you select one item in the treeview, the selection also affect
the list view.
So do we have a real interest in such features, I would say yes,
because you can also add some filter model layers. And this is
interesting by example for the chat lists. So we have one model for
the contact list, but we may make the view more precise for the chats,
making a *who is in this chat* filter, and then a sort by name filter.
Another thing, if we have a tree view model, we also can use it as a
list view model (limited to one column, and only thee first ?)
And to conclude, the when the wiget interact with model, it knows when
to add/remove it's child Item, and we remove some memory management
problems ;) even if we have 10 views, the views will handle them for
us ;)
Anyway, i think that Kopete::ContactList (KCL) and ContactListModel
(CLM) must be two separate class.
I agree, due to the selection model (and maybe other), we must be able
to have multiple KCLM, refering to the KCL singleton.
--
The views handle the selection. What are you talking about here?
I speak about usability when you have multiple view of the contact
list model. may have the contact list view in Kopete and in
another program (Kontact, plasmoid ) When clicking on one of the
view the selections of other view should be affected I think.
KCL, in libkopete, is the central storage class (in memory) which make
the interface between protocols, plugins, and the contact list ui
CLM is part of the contact list ui. There is no reason to have it in
libkopete, and let plugins see that.
I would say that plugins have to see it. Like the main application.
Some plugins allow to refine their activity base on plugins account.
And it would be stupid that the plugins have to rewrite code to handle
such lists when we could reuse the libkopete ones
I'm not talking about the storage backend in this mail.
--
Is my attached draft the way to go ? am I completely wrong ?
I'm still discovering the inter view stuff.
For me what you wrote is the way to go. one final comment. Make
an intermediate , and use this
intermediate in all the views.
So that we could provide the real and direct
Kopete::ContactTreeViewModel and maybe somewhere else the
Kopete::DBusContactTreeView model (to finally allow remote view, for
cheap, and maybe even with the selection model updated every where)
I don't want to start a troll for that again, but it would be great to
separate the ui code from the main code again. thougth it will
requires us some effforts. And maybe we should also go for the kcm way
in the protocols also. In fact protocols don't really need to know
about how it's data will be represented. (icon status should be left
to application decision and for the buddy pictures it can be handled
as raw data in the protocols)
I'm sure a split between core/gui will happen eventually. Just be patient.
No.17 | | 4633 bytes |
| 
Monday 07 August 2006 01:12, Michel Hermier wrote:
2006/8/7, Matt Rogers <mattr (AT) kde (DOT) org>:
Sunday 06 August 2006 02:09, Michel Hermier wrote:
2006/8/6, Goffart <ogoffart (AT) kde (DOT) org>:
Hello.
So we are going soon or later to drop the Q3ListView stuff for the
contactlist.
I have made an experimental contactlist using QAbstractItemModel.
I have to say i'm still not convinced by the supposed advantage of
QAbstractItemModel.
We could as well use QTreeWidget, and have subclass of
QTreeWidgetItem for MetaContactLVI and GroupLVI like we have now.
Could you explain me how having his own model is better ? thanks.
This model is better in the seens that you divide the data, from it's
rendering. This way you can have multiple view using the same model
that are
affected when you affect one off the view.
If you look at one of the Qt model/view explanation, you'll see 2 file
list widgets.
When you select one item in the treeview, the selection also affect
the list view.
So do we have a real interest in such features, I would say yes,
because you can also add some filter model layers. And this is
interesting by example for the chat lists. So we have one model for
the contact list, but we may make the view more precise for the chats,
making a *who is in this chat* filter, and then a sort by name filter.
Another thing, if we have a tree view model, we also can use it as a
list view model (limited to one column, and only thee first ?)
And to conclude, the when the wiget interact with model, it knows when
to add/remove it's child Item, and we remove some memory management
problems ;) even if we have 10 views, the views will handle them for
us ;)
Anyway, i think that Kopete::ContactList (KCL) and ContactListModel
(CLM) must be two separate class.
I agree, due to the selection model (and maybe other), we must be able
to have multiple KCLM, refering to the KCL singleton.
The views handle the selection. What are you talking about here?
I speak about usability when you have multiple view of the contact
list model. may have the contact list view in Kopete and in
another program (Kontact, plasmoid ) When clicking on one of the
view the selections of other view should be affected I think.
I disagree. Let's say that we have a plasmoid that gives us easy access to the
kopete contact list running and we also have kopete running as well. They are
two seperate entities. If I change the selection in the main application, as
a user, I do not expect the selection to change in the plasmoid. IMH, your
idea above is actually worse for usability, but we should ask the usability
people to know for sure. :)
KCL, in libkopete, is the central storage class (in memory) which
make the interface between protocols, plugins, and the contact list
ui
CLM is part of the contact list ui. There is no reason to have it in
libkopete, and let plugins see that.
I would say that plugins have to see it. Like the main application.
Some plugins allow to refine their activity base on plugins account.
And it would be stupid that the plugins have to rewrite code to handle
such lists when we could reuse the libkopete ones
I'm not talking about the storage backend in this mail.
--
Is my attached draft the way to go ? am I completely wrong ?
I'm still discovering the inter view stuff.
For me what you wrote is the way to go. one final comment. Make
an intermediate , and use this
intermediate in all the views.
So that we could provide the real and direct
Kopete::ContactTreeViewModel and maybe somewhere else the
Kopete::DBusContactTreeView model (to finally allow remote view, for
cheap, and maybe even with the selection model updated every where)
I don't want to start a troll for that again, but it would be great to
separate the ui code from the main code again. thougth it will
requires us some effforts. And maybe we should also go for the kcm way
in the protocols also. In fact protocols don't really need to know
about how it's data will be represented. (icon status should be left
to application decision and for the buddy pictures it can be handled
as raw data in the protocols)
I'm sure a split between core/gui will happen eventually. Just be
patient. --
Matt
kopete-devel mailing list
kopete-devel (AT) kde (DOT) org
No.18 | | 4945 bytes |
| 
2006/8/7, Matt Rogers <mattr (AT) kde (DOT) org>:
Monday 07 August 2006 01:12, Michel Hermier wrote:
2006/8/7, Matt Rogers <mattr (AT) kde (DOT) org>:
Sunday 06 August 2006 02:09, Michel Hermier wrote:
2006/8/6, Goffart <ogoffart (AT) kde (DOT) org>:
Hello.
So we are going soon or later to drop the Q3ListView stuff for the
contactlist.
I have made an experimental contactlist using QAbstractItemModel.
I have to say i'm still not convinced by the supposed advantage of
QAbstractItemModel.
We could as well use QTreeWidget, and have subclass of
QTreeWidgetItem for MetaContactLVI and GroupLVI like we have now.
Could you explain me how having his own model is better ? thanks.
This model is better in the seens that you divide the data, from it's
rendering. This way you can have multiple view using the same model
that are
affected when you affect one off the view.
If you look at one of the Qt model/view explanation, you'll see 2 file
list widgets.
When you select one item in the treeview, the selection also affect
the list view.
So do we have a real interest in such features, I would say yes,
because you can also add some filter model layers. And this is
interesting by example for the chat lists. So we have one model for
the contact list, but we may make the view more precise for the chats,
making a *who is in this chat* filter, and then a sort by name filter.
Another thing, if we have a tree view model, we also can use it as a
list view model (limited to one column, and only thee first ?)
And to conclude, the when the wiget interact with model, it knows when
to add/remove it's child Item, and we remove some memory management
problems ;) even if we have 10 views, the views will handle them for
us ;)
Anyway, i think that Kopete::ContactList (KCL) and ContactListModel
(CLM) must be two separate class.
I agree, due to the selection model (and maybe other), we must be able
to have multiple KCLM, refering to the KCL singleton.
The views handle the selection. What are you talking about here?
I speak about usability when you have multiple view of the contact
list model. may have the contact list view in Kopete and in
another program (Kontact, plasmoid ) When clicking on one of the
view the selections of other view should be affected I think.
I disagree. Let's say that we have a plasmoid that gives us easy access to the
kopete contact list running and we also have kopete running as well. They are
two seperate entities. If I change the selection in the main application, as
a user, I do not expect the selection to change in the plasmoid. IMH, your
idea above is actually worse for usability, but we should ask the usability
people to know for sure. :)
Now that I think again I would say it's bad, anyway it doesn't have to
deal with model.
I first thougth the model was also handling the selection and I was wrong.
KCL, in libkopete, is the central storage class (in memory) which
make the interface between protocols, plugins, and the contact list
ui
CLM is part of the contact list ui. There is no reason to have it in
libkopete, and let plugins see that.
I would say that plugins have to see it. Like the main application.
Some plugins allow to refine their activity base on plugins account.
And it would be stupid that the plugins have to rewrite code to handle
such lists when we could reuse the libkopete ones
I'm not talking about the storage backend in this mail.
--
Is my attached draft the way to go ? am I completely wrong ?
I'm still discovering the inter view stuff.
For me what you wrote is the way to go. one final comment. Make
an intermediate , and use this
intermediate in all the views.
So that we could provide the real and direct
Kopete::ContactTreeViewModel and maybe somewhere else the
Kopete::DBusContactTreeView model (to finally allow remote view, for
cheap, and maybe even with the selection model updated every where)
I don't want to start a troll for that again, but it would be great to
separate the ui code from the main code again. thougth it will
requires us some effforts. And maybe we should also go for the kcm way
in the protocols also. In fact protocols don't really need to know
about how it's data will be represented. (icon status should be left
to application decision and for the buddy pictures it can be handled
as raw data in the protocols)
I'm sure a split between core/gui will happen eventually. Just be
patient. --
Matt
kopete-devel mailing list
kopete-devel (AT) kde (DOT) org
kopete-devel mailing list
kopete-devel (AT) kde (DOT) org
No.19 | | 1880 bytes |
| 
Aaron J. Seigo wrote:
Sunday 06 August 2006 15:52, Goffart wrote:
and the contactlist data structure ought to be able to feed directly into
views.
>What do you mean ?
>
>
having a data structure for contacts, a view and then a bridge between those
two that needs to maintained is not necessary these days.
we have the ability to provide a data model and tell a view "show this model"
and with 0 work to show that model in the view have it shown.
this means when you modify the data structures the views (which may not be
visual, btw) are updated as there is no sync issue to do with data<->view
bridges.
one of the use cases kopete will run into is being able to bridge the
contact data to lists that appear on the desktop or in other
applications. identity is moving more and more towards sharing and
coordinating this data between multiple apps.
>And that's one important topics.
>>
>But I fail to see how QAbstractItemModel helps.
>>
>What we need here is a defined dbus interface.
>
>
the dbus interface would interface to the data structure. if someone removes a
contact via dbus and the data structure is a QAM then the visual views will
update automatically.
no manually synchronizing changes from out of the GUI with the GUI. no
manually synchronizing changes in 2 views with the data structures and each
other. etc
kopete-devel mailing list
kopete-devel (AT) kde (DOT) org
I'VE BEEN NICE AND YU STILL SEND ME EMAILS.WILL YU STP R D I HAVE
T KICK YUR HEAD IN?WILL YU STP?GET THE MESSAGE.
kopete-devel mailing list
kopete-devel (AT) kde (DOT) org