Rename CategoryItem to TextTreeItem
This commit is contained in:
parent
cb6a25c2ce
commit
a84b551ab0
@ -11,11 +11,11 @@ set( calamaresSources
|
|||||||
CalamaresApplication.cpp
|
CalamaresApplication.cpp
|
||||||
CalamaresWindow.cpp
|
CalamaresWindow.cpp
|
||||||
|
|
||||||
progresstree/CategoryItem.cpp
|
|
||||||
progresstree/ProgressTreeDelegate.cpp
|
progresstree/ProgressTreeDelegate.cpp
|
||||||
progresstree/ProgressTreeItem.cpp
|
progresstree/ProgressTreeItem.cpp
|
||||||
progresstree/ProgressTreeModel.cpp
|
progresstree/ProgressTreeModel.cpp
|
||||||
progresstree/ProgressTreeView.cpp
|
progresstree/ProgressTreeView.cpp
|
||||||
|
progresstree/TextTreeItem.cpp
|
||||||
progresstree/ViewStepItem.cpp
|
progresstree/ViewStepItem.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
#include "ProgressTreeModel.h"
|
#include "ProgressTreeModel.h"
|
||||||
|
|
||||||
#include "progresstree/CategoryItem.h"
|
#include "progresstree/TextTreeItem.h"
|
||||||
#include "progresstree/ViewStepItem.h"
|
#include "progresstree/ViewStepItem.h"
|
||||||
#include "ViewManager.h"
|
#include "ViewManager.h"
|
||||||
|
|
||||||
@ -133,7 +133,7 @@ ProgressTreeModel::setupModelData()
|
|||||||
m_rootItem = new ProgressTreeRoot();
|
m_rootItem = new ProgressTreeRoot();
|
||||||
const Calamares::ViewManager* vm = Calamares::ViewManager::instance();
|
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 );
|
m_rootItem->appendChild( prepare );
|
||||||
|
|
||||||
foreach ( const Calamares::ViewStep* step, vm->prepareSteps() )
|
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 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/>.
|
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "CategoryItem.h"
|
#include "TextTreeItem.h"
|
||||||
|
|
||||||
#include "ProgressTreeModel.h"
|
#include "ProgressTreeModel.h"
|
||||||
|
|
||||||
CategoryItem::CategoryItem( const QString& text, ProgressTreeItem* parent )
|
TextTreeItem::TextTreeItem( const QString& text, ProgressTreeItem* parent )
|
||||||
: ProgressTreeItem( parent )
|
: ProgressTreeItem( parent )
|
||||||
, m_text( text )
|
, m_text( text )
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
QVariant
|
QVariant
|
||||||
CategoryItem::data( int role ) const
|
TextTreeItem::data( int role ) const
|
||||||
{
|
{
|
||||||
if ( role == ProgressTreeModel::ProgressTreeItemTypeRole )
|
if ( role == ProgressTreeModel::ProgressTreeItemTypeRole )
|
||||||
return ProgressTreeModel::Category;
|
return ProgressTreeModel::Category;
|
@ -16,16 +16,16 @@
|
|||||||
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CATEGORYITEM_H
|
#ifndef TEXTTREEITEM_H
|
||||||
#define CATEGORYITEM_H
|
#define TEXTTREEITEM_H
|
||||||
|
|
||||||
#include "ProgressTreeItem.h"
|
#include "ProgressTreeItem.h"
|
||||||
|
|
||||||
|
|
||||||
class CategoryItem : public ProgressTreeItem
|
class TextTreeItem : public ProgressTreeItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit CategoryItem( const QString& text, ProgressTreeItem* parent = nullptr );
|
explicit TextTreeItem( const QString& text, ProgressTreeItem* parent = nullptr );
|
||||||
|
|
||||||
virtual QVariant data( int role ) const override;
|
virtual QVariant data( int role ) const override;
|
||||||
|
|
||||||
@ -33,4 +33,4 @@ private:
|
|||||||
QString m_text;
|
QString m_text;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // CATEGORYITEM_H
|
#endif // TEXTTREEITEM_H
|
Loading…
Reference in New Issue
Block a user