Hello, I trying to get into Qt-creator source code.
The first task I'm going to implement is make different view of source  
tree in  tree view.
Some explanations:
now source tree consist of such folders:
               static QStringList fileTypeNames =  QStringList() <<  
tr("Headers")
                             << tr("Sources")
                               << tr("Forms")
                               << tr("Resources")
                               << tr("Other files");

I'm going to implement another one:
             static QStringList fileTypeNames =    QStringList() <<  
tr("Sources")
                               << tr("Forms")
                               << tr("Resources")
                               << tr("Other files");

In sources tree I'll going to show .h and .cpp files together.

I hove some questions:
1. Why "FlatModel" has such strange name, it's confusing, because  
there are no another models (In mach more early sources there are was  
one more model, but it didn't was using.). It's Confusing because this  
model is able to represent tree and flat, regarding it's filter.
2. Filter name: "m_filterProjects" - enable simplify tree view. The  
name is confusing too.

3. The question about design implementation of my idea: I'm not  
currently know much about source code organization, that's why I'm  
unable to make best decision. Now I can see two possible ways to  
implement my idea:
1. Leave qt4project class's realization the same. I'll get the same  
folder's names. But in model get one more filter  
"m_filterMergeSources",for example, and if it's true and   
"m_filterProjects"  is false then hide headers and make "sources" node  
they parent node. But it's looks like dirty hack.
2. Another way is to change  qt4project class, to set this filter to  
it, and if merge filter is true, then it return another
   FileTypesName and another hierarchy. But in this case, we have to  
get two different trees. And this is overheading.

Maybe there are exists another way ???
Waiting for your reply.


_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-creator

Reply via email to