-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ef667f5
commit b61035f
Showing
5 changed files
with
129 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#include "filecard.h" | ||
|
||
#include<QVBoxLayout> | ||
#include"ElaCheckBox.h" | ||
#include"ElaIconButton.h" | ||
#include"ElaProgressBar.h" | ||
FileCard::FileCard(QString f, QString d,QString s,QString p) | ||
{ | ||
filename=new ElaText(f); | ||
datasize=new ElaText(d); | ||
speed=new ElaText(s); | ||
progress=new ElaText(p); | ||
|
||
_checkBox = new ElaCheckBox(filename->text(), this); | ||
QVBoxLayout*checkBoxArea=new QVBoxLayout(); | ||
checkBoxArea->addWidget(_checkBox,0,Qt::AlignCenter); | ||
|
||
datasize->setTextSize(16); | ||
QVBoxLayout*dataSizeArea=new QVBoxLayout(); | ||
dataSizeArea->addWidget(datasize,0,Qt::AlignCenter); | ||
|
||
speed->setTextSize(16); | ||
QVBoxLayout*speedArea=new QVBoxLayout(); | ||
speedArea->addWidget(speed,0,Qt::AlignCenter); | ||
|
||
proBar = new ElaProgressBar(this); | ||
proBar->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); | ||
proBar->setFixedSize(100,15); | ||
proBar->setMinimum(0); | ||
proBar->setMaximum(0); | ||
progress->setTextSize(16); | ||
QVBoxLayout*proBarArea=new QVBoxLayout(); | ||
proBarArea->addWidget(progress,0,Qt::AlignCenter); | ||
proBarArea->addWidget(proBar,0,Qt::AlignCenter); | ||
proBarArea->setAlignment(Qt::AlignCenter); | ||
|
||
modifyBtn=new ElaIconButton(ElaIconType::CalendarLinesPen); | ||
pauseBtn=new ElaIconButton(ElaIconType::Pause); | ||
relieveBtn=new ElaIconButton(ElaIconType::Xmark); | ||
modifyBtn->setFixedSize(30,30); | ||
pauseBtn->setFixedSize(30,30); | ||
relieveBtn->setFixedSize(30,30); | ||
|
||
QHBoxLayout*actionArea=new QHBoxLayout(); | ||
actionArea->addWidget(modifyBtn); | ||
actionArea->addWidget(pauseBtn); | ||
actionArea->addWidget(relieveBtn); | ||
actionArea->setAlignment(Qt::AlignCenter); | ||
|
||
QHBoxLayout*FileCardArea=new QHBoxLayout(this); | ||
FileCardArea->addLayout(checkBoxArea,Qt::AlignCenter); | ||
FileCardArea->addLayout(dataSizeArea,Qt::AlignCenter); | ||
FileCardArea->addLayout(speedArea,Qt::AlignCenter); | ||
FileCardArea->addLayout(proBarArea,Qt::AlignCenter); | ||
FileCardArea->addLayout(actionArea,Qt::AlignCenter); | ||
FileCardArea->addStretch(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#ifndef FILECARD_H | ||
#define FILECARD_H | ||
|
||
#include"ElaScrollPageArea.h" | ||
#include"ElaText.h" | ||
|
||
class ElaCheckBox; | ||
class ElaIconButton; | ||
class ElaProgressBar; | ||
class FileCard : public ElaScrollPageArea | ||
{ | ||
public: | ||
explicit FileCard(QString f, QString d,QString s,QString p); | ||
|
||
ElaCheckBox* _checkBox{nullptr}; | ||
ElaText *filename; | ||
ElaText *datasize; | ||
ElaText *speed; | ||
ElaText*progress; | ||
ElaIconButton*modifyBtn; | ||
ElaIconButton*pauseBtn; | ||
ElaIconButton*relieveBtn; | ||
ElaProgressBar*proBar; | ||
}; | ||
|
||
#endif // FILECARD_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters