compiler errors fixed
This commit is contained in:
parent
061da08c61
commit
7d7eb87cbd
@ -55,15 +55,26 @@ StoragePage::StoragePage( QQuickItem* const parent )
|
|||||||
|
|
||||||
setSubcontrolProxy( QskBox::Panel, StoragePage::Panel );
|
setSubcontrolProxy( QskBox::Panel, StoragePage::Panel );
|
||||||
|
|
||||||
addRow( { "Backup (B:)", "Used for daily backups", { 0.1, 0.1, 0.1, 0.02, 0.01 } } );
|
addRow( "Backup (B:)", "Used for daily backups", 0.1, 0.1, 0.1, 0.02, 0.01 );
|
||||||
addRow( { "Share (S:)", "Used for sharing files publicly", { 0.05, 0.05, 0.2, 0.2, 0.01 } } );
|
addRow( "Share (S:)", "Used for sharing files publicly", 0.05, 0.05, 0.2, 0.2, 0.01 );
|
||||||
addRow( { "Exchange (X:)", "Used for exchanging large files", { 0.1, 0.1, 0.1, 0.1, 0.5 } } );
|
addRow( "Exchange (X:)", "Used for exchanging large files", 0.1, 0.1, 0.1, 0.1, 0.5 );
|
||||||
|
|
||||||
addSpacer( 1, 99 );
|
addSpacer( 1, 99 );
|
||||||
}
|
}
|
||||||
|
|
||||||
void StoragePage::addRow( Storage storage )
|
void StoragePage::addRow( const QString& title, const QString& description,
|
||||||
|
qreal pictures, qreal music, qreal videos, qreal documents, qreal others )
|
||||||
{
|
{
|
||||||
|
Storage storage;
|
||||||
|
|
||||||
|
storage.title = title;
|
||||||
|
storage.description = description;
|
||||||
|
storage.distribution.pictures = pictures;
|
||||||
|
storage.distribution.music = music;
|
||||||
|
storage.distribution.videos = videos;
|
||||||
|
storage.distribution.documents = documents;
|
||||||
|
storage.distribution.others = others;
|
||||||
|
|
||||||
auto* const box = new Box( "Network Storage", this );
|
auto* const box = new Box( "Network Storage", this );
|
||||||
auto* const layout = new QskLinearBox( Qt::Horizontal, box );
|
auto* const layout = new QskLinearBox( Qt::Horizontal, box );
|
||||||
auto* const left = new QskLinearBox( Qt::Vertical, layout );
|
auto* const left = new QskLinearBox( Qt::Vertical, layout );
|
||||||
@ -81,12 +92,12 @@ void StoragePage::addRow( Storage storage )
|
|||||||
meter->setMinimumSize( 64, 64 );
|
meter->setMinimumSize( 64, 64 );
|
||||||
meter->setMaximumSize( 64, 64 );
|
meter->setMaximumSize( 64, 64 );
|
||||||
|
|
||||||
auto* const title = new QskTextLabel( storage.title, center );
|
auto* const maintitle = new QskTextLabel( storage.title, center );
|
||||||
title->setFontRole( QskSkin::LargeFont );
|
maintitle->setFontRole( QskSkin::LargeFont );
|
||||||
auto* const subtitle = new QskTextLabel( storage.description, center );
|
auto* const subtitle = new QskTextLabel( storage.description, center );
|
||||||
subtitle->setFontRole( QskSkin::MediumFont );
|
subtitle->setFontRole( QskSkin::MediumFont );
|
||||||
|
|
||||||
const auto media = storage.distribution;
|
const auto& media = storage.distribution;
|
||||||
|
|
||||||
auto* const bar = new StorageBar( right );
|
auto* const bar = new StorageBar( right );
|
||||||
bar->setPictures( media.pictures );
|
bar->setPictures( media.pictures );
|
||||||
|
@ -42,8 +42,9 @@ class StoragePage final : public QskLinearBox
|
|||||||
|
|
||||||
QString title;
|
QString title;
|
||||||
QString description;
|
QString description;
|
||||||
Media distribution{};
|
Media distribution;
|
||||||
};
|
};
|
||||||
|
|
||||||
void addRow( Storage storage );
|
void addRow( const QString& title, const QString& description,
|
||||||
|
qreal pictures, qreal music, qreal videos, qreal documents, qreal others );
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user