Rename CategoryItem to TextTreeItem

main
Aurélien Gâteau 11 years ago
parent cb6a25c2ce
commit a84b551ab0

@ -11,11 +11,11 @@ set( calamaresSources
CalamaresApplication.cpp
CalamaresWindow.cpp
progresstree/CategoryItem.cpp
progresstree/ProgressTreeDelegate.cpp
progresstree/ProgressTreeItem.cpp
progresstree/ProgressTreeModel.cpp
progresstree/ProgressTreeView.cpp
progresstree/TextTreeItem.cpp
progresstree/ViewStepItem.cpp
)

@ -18,7 +18,7 @@
#include "ProgressTreeModel.h"
#include "progresstree/CategoryItem.h"
#include "progresstree/TextTreeItem.h"
#include "progresstree/ViewStepItem.h"
#include "ViewManager.h"
@ -133,7 +133,7 @@ ProgressTreeModel::setupModelData()
m_rootItem = new ProgressTreeRoot();
const Calamares::ViewManager* vm = Calamares::ViewManager::instance();
CategoryItem* prepare = new CategoryItem( tr( "Prepare" ), m_rootItem );
TextTreeItem* prepare = new TextTreeItem( tr( "Prepare" ), m_rootItem );
m_rootItem->appendChild( prepare );
foreach ( const Calamares::ViewStep* step, vm->prepareSteps() )
@ -142,7 +142,7 @@ ProgressTreeModel::setupModelData()
}
m_rootItem->appendChild( new ViewStepItem( vm->installationStep(), m_rootItem ) );
m_rootItem->appendChild( new CategoryItem( tr( "Finish" ), m_rootItem ) );
m_rootItem->appendChild( new TextTreeItem( tr( "Finish" ), m_rootItem ) );
}

@ -16,18 +16,18 @@
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
*/
#include "CategoryItem.h"
#include "TextTreeItem.h"
#include "ProgressTreeModel.h"
CategoryItem::CategoryItem( const QString& text, ProgressTreeItem* parent )
TextTreeItem::TextTreeItem( const QString& text, ProgressTreeItem* parent )
: ProgressTreeItem( parent )
, m_text( text )
{}
QVariant
CategoryItem::data( int role ) const
TextTreeItem::data( int role ) const
{
if ( role == ProgressTreeModel::ProgressTreeItemTypeRole )
return ProgressTreeModel::Category;

@ -16,16 +16,16 @@
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CATEGORYITEM_H
#define CATEGORYITEM_H
#ifndef TEXTTREEITEM_H
#define TEXTTREEITEM_H
#include "ProgressTreeItem.h"
class CategoryItem : public ProgressTreeItem
class TextTreeItem : public ProgressTreeItem
{
public:
explicit CategoryItem( const QString& text, ProgressTreeItem* parent = nullptr );
explicit TextTreeItem( const QString& text, ProgressTreeItem* parent = nullptr );
virtual QVariant data( int role ) const override;
@ -33,4 +33,4 @@ private:
QString m_text;
};
#endif // CATEGORYITEM_H
#endif // TEXTTREEITEM_H
Loading…
Cancel
Save