Changeset 18


Ignore:
Timestamp:
12/31/07 11:10:22 (4 years ago)
Author:
sander
Message:

Sorting works

Location:
gui
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • gui/main_window.cpp

    r17 r18  
    1818    } 
    1919 
    20     libraryTreeView->setModel(&musicLibraryModel); 
     20    libraryProxyModel.setSourceModel(&musicLibraryModel); 
     21    libraryTreeView->setModel(&libraryProxyModel); 
     22    libraryTreeView->sortByColumn(0, Qt::AscendingOrder); 
    2123 
    2224    playlistTableView->setModel(&playlistModel); 
  • gui/main_window.h

    r17 r18  
    33 
    44#include <QMainWindow> 
     5#include <QSortFilterProxyModel> 
    56#include <QTimer> 
    67 
     
    2526        PlaylistTableModel playlistModel; 
    2627        MusicLibraryModel musicLibraryModel; 
     28        QSortFilterProxyModel libraryProxyModel; 
    2729        bool slidingVolume; 
    2830 
  • gui/musiclibrarymodel.cpp

    r17 r18  
    9595 
    9696    delete items; 
     97 
     98    reset(); 
    9799} 
Note: See TracChangeset for help on using the changeset viewer.