new connection icons! :)

This commit is contained in:
liranbg 2014-10-14 06:47:15 +03:00
parent 7a0a6dcff4
commit 052104c5a3
10 changed files with 39 additions and 19 deletions

View file

@ -7,6 +7,7 @@
QT += core gui network widgets printsupport QT += core gui network widgets printsupport
CONFIG += qt c++11 CONFIG += qt c++11
#CONFIG-=app_bundle
TARGET = jceManager TARGET = jceManager
VERSION = 1.0.0 VERSION = 1.0.0
@ -51,7 +52,6 @@ HEADERS += \
src/appDatabase/jce_logger.h \ src/appDatabase/jce_logger.h \
src/jceData/Grades/graph/qcustomplot.h \ src/jceData/Grades/graph/qcustomplot.h \
src/jceData/Grades/graph/gradegraph.h \ src/jceData/Grades/graph/gradegraph.h \
src/jceData/Calendar/calendarPageCourse.h \
src/jceData/Calendar/Exams/examDialog.h \ src/jceData/Calendar/Exams/examDialog.h \
src/jceData/Calendar/Exams/calendarExam.h \ src/jceData/Calendar/Exams/calendarExam.h \
src/jceData/Calendar/Exams/calendarExamCourse.h \ src/jceData/Calendar/Exams/calendarExamCourse.h \

View file

@ -3,13 +3,32 @@
jceStatusBar::jceStatusBar(QWidget *parent) : jceStatusBar::jceStatusBar(QWidget *parent) :
QStatusBar(parent) QStatusBar(parent)
{ {
this->setStyleSheet("QStatusBar { border: 0px solid black };"); this->setFixedHeight(STATUS_ICON_HEIGH+30);
this->setFixedHeight(STATUS_ICON_HEIGH+5);
this->showMessage(tr("Ready")); 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 //Icon
iconButtomStatusLabel = new QLabel(this); 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); iconButtomStatusLabel->setAlignment(Qt::AlignHCenter);
//ProgressBar //ProgressBar
@ -48,54 +67,54 @@ void jceStatusBar::setIconConnectionStatus(jceProgressStatus update)
{ {
case jceProgressStatus::Error: case jceProgressStatus::Error:
setProgressValue(0); setProgressValue(0);
iconPix.load(":/icons/redStatusIcon.png"); iconPix.load(":/icons/disconnected.png");
showMessage(tr("Error")); showMessage(tr("Error"));
break; break;
case jceProgressStatus::Disconnected: case jceProgressStatus::Disconnected:
setProgressValue(0); setProgressValue(0);
iconPix.load(":/icons/redStatusIcon.png"); iconPix.load(":/icons/disconnected.png");
showMessage(tr("Disconnected")); showMessage(tr("Disconnected"));
break; break;
case jceProgressStatus::Ready: case jceProgressStatus::Ready:
setProgressValue(0); setProgressValue(0);
iconPix.load(":/icons/redStatusIcon.png"); iconPix.load(":/icons/disconnected.png");
showMessage(tr("Ready")); showMessage(tr("Ready"));
break; break;
case jceProgressStatus::Connecting: case jceProgressStatus::Connecting:
setProgressValue(5); setProgressValue(5);
iconPix.load(":/icons/blueStatusIcon.png"); iconPix.load(":/icons/busy.png");
showMessage(tr("Connecting...")); showMessage(tr("Connecting..."));
break; break;
case jceProgressStatus::Sending: case jceProgressStatus::Sending:
if (progressBar->value() < 10) if (progressBar->value() < 10)
setProgressValue(10); setProgressValue(10);
iconPix.load(":/icons/blueStatusIcon.png"); iconPix.load(":/icons/busy.png");
showMessage(tr("Sending...")); showMessage(tr("Sending..."));
break; break;
case jceProgressStatus::Recieving: case jceProgressStatus::Recieving:
if (progressBar->value() < 15) if (progressBar->value() < 15)
setProgressValue(15); setProgressValue(15);
iconPix.load(":/icons/blueStatusIcon.png"); iconPix.load(":/icons/busy.png");
showMessage(tr("Recieving...")); showMessage(tr("Recieving..."));
break; break;
case jceProgressStatus::Connected: case jceProgressStatus::Connected:
setProgressValue(30); setProgressValue(30);
iconPix.load(":/icons/blueStatusIcon.png"); iconPix.load(":/icons/busy.png");
showMessage(tr("Connected")); showMessage(tr("Connected"));
break; break;
case jceProgressStatus::Inserting: case jceProgressStatus::Inserting:
setProgressValue(80); setProgressValue(80);
iconPix.load(":/icons/blueStatusIcon.png"); iconPix.load(":/icons/busy.png");
showMessage(tr("Inserting")); showMessage(tr("Inserting"));
break; break;
case jceProgressStatus::LoggedIn: case jceProgressStatus::LoggedIn:
setProgressValue(100); setProgressValue(100);
iconPix.load(":/icons/greenStatusIcon.png"); iconPix.load(":/icons/connected.png");
showMessage(tr("Logged In.")); showMessage(tr("Logged In."));
break; break;
case jceProgressStatus::Done: case jceProgressStatus::Done:
setProgressValue(100); setProgressValue(100);
iconPix.load(":/icons/greenStatusIcon.png"); iconPix.load(":/icons/connected.png");
showMessage(tr("Done")); showMessage(tr("Done"));
break; break;

View file

@ -3,11 +3,12 @@
#include <QDebug> #include <QDebug>
#include <QLayout>
#include <QStatusBar> #include <QStatusBar>
#include <QProgressBar> #include <QProgressBar>
#include <QLabel> #include <QLabel>
#define STATUS_ICON_HEIGH 35 #define STATUS_ICON_HEIGH 48
class jceStatusBar : public QStatusBar class jceStatusBar : public QStatusBar
{ {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

BIN
resources/busy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

BIN
resources/connected.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View file

@ -1,8 +1,5 @@
<RCC> <RCC>
<qresource prefix="/icons"> <qresource prefix="/icons">
<file>blueStatusIcon.png</file>
<file>greenStatusIcon.png</file>
<file>redStatusIcon.png</file>
<file>icon.ico</file> <file>icon.ico</file>
<file>iconX.png</file> <file>iconX.png</file>
<file>iconV.png</file> <file>iconV.png</file>
@ -10,5 +7,8 @@
<file>us.png</file> <file>us.png</file>
<file>help.png</file> <file>help.png</file>
<file>team.png</file> <file>team.png</file>
<file>busy.png</file>
<file>connected.png</file>
<file>disconnected.png</file>
</qresource> </qresource>
</RCC> </RCC>

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