new connection icons! :)
This commit is contained in:
parent
7a0a6dcff4
commit
052104c5a3
10 changed files with 39 additions and 19 deletions
|
@ -7,6 +7,7 @@
|
|||
QT += core gui network widgets printsupport
|
||||
|
||||
CONFIG += qt c++11
|
||||
#CONFIG-=app_bundle
|
||||
|
||||
TARGET = jceManager
|
||||
VERSION = 1.0.0
|
||||
|
@ -51,7 +52,6 @@ HEADERS += \
|
|||
src/appDatabase/jce_logger.h \
|
||||
src/jceData/Grades/graph/qcustomplot.h \
|
||||
src/jceData/Grades/graph/gradegraph.h \
|
||||
src/jceData/Calendar/calendarPageCourse.h \
|
||||
src/jceData/Calendar/Exams/examDialog.h \
|
||||
src/jceData/Calendar/Exams/calendarExam.h \
|
||||
src/jceData/Calendar/Exams/calendarExamCourse.h \
|
||||
|
|
|
@ -3,13 +3,32 @@
|
|||
jceStatusBar::jceStatusBar(QWidget *parent) :
|
||||
QStatusBar(parent)
|
||||
{
|
||||
this->setStyleSheet("QStatusBar { border: 0px solid black };");
|
||||
this->setFixedHeight(STATUS_ICON_HEIGH+5);
|
||||
this->setFixedHeight(STATUS_ICON_HEIGH+30);
|
||||
this->showMessage(tr("Ready"));
|
||||
|
||||
|
||||
this->setStyleSheet("QStatusBar {"
|
||||
"border: 0px solid black;"
|
||||
"background: rgba(255, 255, 255, 255);"
|
||||
"padding: 3px;"
|
||||
"padding-left: 1px;"
|
||||
"padding-right: 1px;"
|
||||
"min-height: 50px;"
|
||||
"max-height: 50px;"
|
||||
"}");
|
||||
//Icon
|
||||
iconButtomStatusLabel = new QLabel(this);
|
||||
iconButtomStatusLabel->setStyleSheet("QLabel {"
|
||||
"border: 0px solid black"
|
||||
"border-radius: 16px;"
|
||||
"padding: 1px;"
|
||||
"padding-left: 1px;"
|
||||
"padding-right: 1px;"
|
||||
"min-width: 48px;"
|
||||
"max-width: 48px;"
|
||||
"min-height: 48px;"
|
||||
"max-height: 48px;"
|
||||
"}");
|
||||
iconButtomStatusLabel->setMaximumHeight(STATUS_ICON_HEIGH+2);
|
||||
iconButtomStatusLabel->setMinimumHeight(STATUS_ICON_HEIGH+2);
|
||||
iconButtomStatusLabel->setAlignment(Qt::AlignHCenter);
|
||||
|
||||
//ProgressBar
|
||||
|
@ -48,54 +67,54 @@ void jceStatusBar::setIconConnectionStatus(jceProgressStatus update)
|
|||
{
|
||||
case jceProgressStatus::Error:
|
||||
setProgressValue(0);
|
||||
iconPix.load(":/icons/redStatusIcon.png");
|
||||
iconPix.load(":/icons/disconnected.png");
|
||||
showMessage(tr("Error"));
|
||||
break;
|
||||
case jceProgressStatus::Disconnected:
|
||||
setProgressValue(0);
|
||||
iconPix.load(":/icons/redStatusIcon.png");
|
||||
iconPix.load(":/icons/disconnected.png");
|
||||
showMessage(tr("Disconnected"));
|
||||
break;
|
||||
case jceProgressStatus::Ready:
|
||||
setProgressValue(0);
|
||||
iconPix.load(":/icons/redStatusIcon.png");
|
||||
iconPix.load(":/icons/disconnected.png");
|
||||
showMessage(tr("Ready"));
|
||||
break;
|
||||
case jceProgressStatus::Connecting:
|
||||
setProgressValue(5);
|
||||
iconPix.load(":/icons/blueStatusIcon.png");
|
||||
iconPix.load(":/icons/busy.png");
|
||||
showMessage(tr("Connecting..."));
|
||||
break;
|
||||
case jceProgressStatus::Sending:
|
||||
if (progressBar->value() < 10)
|
||||
setProgressValue(10);
|
||||
iconPix.load(":/icons/blueStatusIcon.png");
|
||||
iconPix.load(":/icons/busy.png");
|
||||
showMessage(tr("Sending..."));
|
||||
break;
|
||||
case jceProgressStatus::Recieving:
|
||||
if (progressBar->value() < 15)
|
||||
setProgressValue(15);
|
||||
iconPix.load(":/icons/blueStatusIcon.png");
|
||||
iconPix.load(":/icons/busy.png");
|
||||
showMessage(tr("Recieving..."));
|
||||
break;
|
||||
case jceProgressStatus::Connected:
|
||||
setProgressValue(30);
|
||||
iconPix.load(":/icons/blueStatusIcon.png");
|
||||
iconPix.load(":/icons/busy.png");
|
||||
showMessage(tr("Connected"));
|
||||
break;
|
||||
case jceProgressStatus::Inserting:
|
||||
setProgressValue(80);
|
||||
iconPix.load(":/icons/blueStatusIcon.png");
|
||||
iconPix.load(":/icons/busy.png");
|
||||
showMessage(tr("Inserting"));
|
||||
break;
|
||||
case jceProgressStatus::LoggedIn:
|
||||
setProgressValue(100);
|
||||
iconPix.load(":/icons/greenStatusIcon.png");
|
||||
iconPix.load(":/icons/connected.png");
|
||||
showMessage(tr("Logged In."));
|
||||
break;
|
||||
case jceProgressStatus::Done:
|
||||
setProgressValue(100);
|
||||
iconPix.load(":/icons/greenStatusIcon.png");
|
||||
iconPix.load(":/icons/connected.png");
|
||||
showMessage(tr("Done"));
|
||||
break;
|
||||
|
||||
|
|
|
@ -3,11 +3,12 @@
|
|||
|
||||
|
||||
#include <QDebug>
|
||||
#include <QLayout>
|
||||
#include <QStatusBar>
|
||||
#include <QProgressBar>
|
||||
#include <QLabel>
|
||||
|
||||
#define STATUS_ICON_HEIGH 35
|
||||
#define STATUS_ICON_HEIGH 48
|
||||
|
||||
class jceStatusBar : public QStatusBar
|
||||
{
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.9 KiB |
BIN
resources/busy.png
Normal file
BIN
resources/busy.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.3 KiB |
BIN
resources/connected.png
Normal file
BIN
resources/connected.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.9 KiB |
|
@ -1,8 +1,5 @@
|
|||
<RCC>
|
||||
<qresource prefix="/icons">
|
||||
<file>blueStatusIcon.png</file>
|
||||
<file>greenStatusIcon.png</file>
|
||||
<file>redStatusIcon.png</file>
|
||||
<file>icon.ico</file>
|
||||
<file>iconX.png</file>
|
||||
<file>iconV.png</file>
|
||||
|
@ -10,5 +7,8 @@
|
|||
<file>us.png</file>
|
||||
<file>help.png</file>
|
||||
<file>team.png</file>
|
||||
<file>busy.png</file>
|
||||
<file>connected.png</file>
|
||||
<file>disconnected.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
BIN
resources/disconnected.png
Normal file
BIN
resources/disconnected.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.5 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.7 KiB |
Loading…
Reference in a new issue