[ fromfile: ex-modelview.xml id: ex-modelview ]
Write a file system browser, with an address bar, QFileSystemModel and at least two View classes separated by a QSplitter. One of the Views should be a QTableView. You can choose a Windows Explorer-style tree on the side of the table, or a Mac OSX-style browser with a QColumnView and a table, as shown in Figure 13.14. Make it possible to select a directory in the tree/columnview, addressbar, or with the button, so that any of them will update the contents of the table to reflect the newly selected directory.
button, and optionally other commonly found buttons and features of your favorite file browser. Use theExtend QAbstractTableModel and define a PlayListModel. It should represent a list of MetaDataValue (or MetaDataObject) objects. These can be based on audio tracks or videos, your choice.
Generate and display test data either based on real media files and MetaDataLoader, or using your own test data/factory method. Implement actions for load/save playlist to disk.
Revisiting the program in Section
11.6, implement a GUI for showing friendslists, or a bidirectional relationship between symbols. The
GUI should show two QListView
s
or QListWidget
s,
like Figure
13.15.
Both lists should show the set of symbols available.
Click
to add a new symbol to both lists.When a symbol is selected on the left, the right list shows the friends checked and the strangers unchecked.
Checking/unchecking a box on the right adds/removes a relationship between the two people.
Do not allow the user to uncheck a contact if it is the same as the selected one on the left. Always show it as checked.
Rewrite the ShortcutEditor example to use in-place editing. You need to write a delegate class for the table view, which provides a custom editor when the user wants to change a shortcut.
Generated: 2012-03-02 | © 2012 Alan Ezust and Paul Ezust. |