tags:

views:

227

answers:

1

I'm writing an IRC Client (yes another one). Long story short. I'm writing a Server dialogue that keeps a list of this:

Identity
    Networks
        Channels
        Addresses

I have 3 different list views that will be for the Networks, Channels and Addresses. When the user changes the Identity (combo box). The network listview will lookup all the networks for that specific Identity. After it loads up the Networks it will automatically select the first network and then load all the channels and addresses for that specific network.

The problem is I want to have 3 views for 1 model, to minimise all the memory and the loading of data. So that it makes it much easier to manage and not do a bunch of work.

If you'd look at QColumnView it's the same exact thing. But I don't need it to be on one exact page since the views are on entirely different tabs to make it easier to go through the Server dialogue.

I'm wondering what will be the best way to go about handling this complexity. The information is stored in a SQLite database. I already have the classes written to extract and store it. Just the modelling is the painful part of this solution.

A: 

The best way to doing this would be to just load the models dynamically. When the ComboBox changes Identities. Delete all the items in the NetworkList and just repopulate it afterwards and delete all the networks that were in there.

Zeke