-
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.
Merge branch 'main' of https://github.com/LawPlusThree/QSyncUi
- Loading branch information
Showing
23 changed files
with
493 additions
and
59 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#include "historycard.h" | ||
|
||
#include<QVBoxLayout> | ||
#include"ElaCheckBox.h" | ||
|
||
HistoryCard::HistoryCard(QString f, QString d,QString t,bool u) | ||
{ | ||
filename=new ElaText(f); | ||
datasize=new ElaText(d); | ||
time=new ElaText(t); | ||
|
||
_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); | ||
|
||
time->setTextSize(16); | ||
QVBoxLayout*timeArea=new QVBoxLayout(); | ||
ElaText*text; | ||
if(u) | ||
text=new ElaText("上传于"); | ||
else | ||
text=new ElaText("下载于"); | ||
text->setTextSize(16); | ||
timeArea->addWidget(text,0,Qt::AlignCenter); | ||
timeArea->addWidget(time,0,Qt::AlignCenter); | ||
|
||
ElaText*bingoText=new ElaText("√"); | ||
bingoText->setTextSize(16); | ||
QVBoxLayout*bingoArea=new QVBoxLayout(); | ||
bingoArea->addWidget(bingoText,0,Qt::AlignCenter); | ||
|
||
QHBoxLayout*HistoryCardArea=new QHBoxLayout(this); | ||
HistoryCardArea->addLayout(checkBoxArea,Qt::AlignCenter); | ||
HistoryCardArea->addLayout(dataSizeArea,Qt::AlignCenter); | ||
HistoryCardArea->addLayout(timeArea,Qt::AlignCenter); | ||
HistoryCardArea->addLayout(bingoArea,Qt::AlignCenter); | ||
HistoryCardArea->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,22 @@ | ||
#ifndef HISTORYCARD_H | ||
#define HISTORYCARD_H | ||
|
||
#include"ElaScrollPageArea.h" | ||
#include"ElaText.h" | ||
|
||
class ElaCheckBox; | ||
class ElaIconButton; | ||
class ElaProgressBar; | ||
class HistoryCard : public ElaScrollPageArea | ||
{ | ||
public: | ||
explicit HistoryCard(QString f, QString d,QString t,bool u); | ||
|
||
ElaCheckBox* _checkBox{nullptr}; | ||
ElaText *filename; | ||
ElaText *datasize; | ||
ElaText *time; | ||
bool upif; | ||
}; | ||
|
||
#endif // HISTORYCARD_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
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
Oops, something went wrong.