Re: Design opinions needed
So you have an arbitrary number of data sets in each of an arbitrary number of groups. You need to be able to add and name groups and data sets within groups. When a data set is selected you to display/edit that set. This sounds like a shallow tree (QTreeWidget) to me with a few buttons to add new groups, or data sets within groups.
I'd be inclined to use a QTableView on the data table to display and/or edit the data through a QSqlTableModel. Place it in a splitter beside the tree and other controls and change the filter as the user selects data sets.
Re: Design opinions needed
A lot more concise, yes -- two sets of arbitrary numbers...To help illustrate this a bit more, the data is currently being read in from a flat file (we're wanting to get it from my new app instead), and this is the way it's written in the file:
3
Flowpath_1
4
6.5 8 .....
6.5 5.2 ...
6.4 1...
8.0 9...
Flowpath_2
4
6.5 4 .....
3 5.2 ...
4 1...
8.0 9...
Flowpath_3
4
6.5 8 .....
6.5 5.2 ...
6.4 1...
8.0 9...
Right now the program we're using is just working down the file so the "3" is telling it how many sets follow, and the "4" is rows per set (and is fixed so that all sets will have 4 rows)...The number of items per row, if it helps any, is static at 7...The "3" and the "4" are arbitrary...
QSqlTableModel/QTableViews is what I was trying to make work (that's how I'm allowing an Admin user modify user privileges), but it wasn't coming out the way I wanted (probably due to my lack of experience)...I went that way because of editing existing data, but I wanted a little more control over the actual input...It had crossed my mind to maybe after taking the two arbitrary numbers as inputs to using them to generate a spreadsheet (which, in theory is what this is)...My example above would be 12 rows by 8 columns (column one with Flowpath_1/2/3, prepopulated)...
Hadn't thought about a QTreeWidget...I can see how that has possibilities, too...
scott
Re: Design opinions needed
Quote:
Originally Posted by
ChrisW67
I'd be inclined to use a QTableView on the data table to display and/or edit the data through a QSqlTableModel. Place it in a splitter beside the tree and other controls and change the filter as the user selects data sets.
I also try the same as chris said.
Bala
Re: Design opinions needed
Yea -- I've been sitting here at my other job (ssshhhhhh) thinking about this, and I think ya'll are right...
I think I'm in over my head :)
Re: Design opinions needed
Is the flat text file the desired end result of entering data into a blank structure through your program, or the source of data that needs to be loaded, edited, and replaced by your program?
Re: Design opinions needed
Well, that's a good question...The flat file is being created right now manually, but what we're trying to do is take that data from the user via the Qt app, store it in the database, and have a C++ app that is currently using the flat file retrieve the data from the database instead...The user needs to be able to create a new set of data in a blank structure, or pull back a previously saved set of data and modify it before the hit GO and kick off the C++ app (which we'd be incorporating)...
The other option is to have the new Qt app generate a flat file and have the C++ app work as it currently does, but we haven't gotten that far...
scott
ps -- I have 2 other data sets to deal with too; the 2nd set is very, very similar to this one and the 3rd is more spreadsheet-like