add .csv to exportation, fix progressbar

This commit is contained in:
liranbg 2014-10-13 01:59:57 +03:00
parent cde830dac7
commit a33939c93b
4 changed files with 12 additions and 8 deletions

View file

@ -196,7 +196,9 @@ void coursesTableManager::addRow(const gradeCourse *courseToAdd)
hours->setFlags(hours->flags() & ~Qt::ItemIsEditable);
grade = new QTableWidgetItem();
// grade->setData(Qt::EditRole,c->getGrade()); //BUG good for sorting, the problem is when you edit -> the cell indicator disappear
//grade->setData(Qt::EditRole,c->getGrade());
//BUG QT bug
//good for sorting, the problem is when you edit -> the cell indicator disappear
grade->setText(QString::number(c->getGrade()));
addition = new QTableWidgetItem();

View file

@ -57,7 +57,7 @@ void jceStatusBar::setIconConnectionStatus(jceProgressStatus update)
showMessage(tr("Disconnected"));
break;
case jceProgressStatus::Ready:
setProgressValue(100);
setProgressValue(0);
iconPix.load(":/icons/redStatusIcon.png");
showMessage(tr("Ready"));
break;
@ -67,12 +67,14 @@ void jceStatusBar::setIconConnectionStatus(jceProgressStatus update)
showMessage(tr("Connecting..."));
break;
case jceProgressStatus::Sending:
setProgressValue(10);
if (progressBar->value() < 10)
setProgressValue(10);
iconPix.load(":/icons/blueStatusIcon.png");
showMessage(tr("Sending..."));
break;
case jceProgressStatus::Recieving:
setProgressValue(15);
if (progressBar->value() < 15)
setProgressValue(15);
iconPix.load(":/icons/blueStatusIcon.png");
showMessage(tr("Recieving..."));
break;

View file

@ -1,6 +1,5 @@
#include "mainscreen.h"
#include "ui_mainscreen.h"
//TODO: busy flag to avoid overload request
MainScreen::MainScreen(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainScreen)
{
@ -251,6 +250,7 @@ void MainScreen::on_getCalendarBtn_clicked()
QString page;
if (loginHandel->isLoggedInFlag())
{
statusBar->setIconConnectionStatus(jceStatusBar::Ready);
if ((status = loginHandel->makeCalendarRequest(ui->spinBoxYear->value(),ui->spinBoxSemester->value())) == jceLogin::JCE_PAGE_PASSED)
{
statusBar->setIconConnectionStatus(jceStatusBar::Inserting);

View file

@ -110,11 +110,11 @@ bool CSV_Exporter::exportCalendar(calendarSchedule *calSched, CalendarDialog *ca
*/
QString CSV_Exporter::getFileFath()
{
QString fileName = QFileDialog::getSaveFileName();
QString fileName = QFileDialog::getSaveFileName(NULL,
QObject::tr("JceManager Save Schedule Dialog"), "",
QObject::tr("CSV Files (*.csv);;All Files (*)"));
if (fileName == "")
return NULL;
if (!fileName.contains(".csv", Qt::CaseInsensitive))
fileName.append(".csv");
return fileName;
}