From 031dfbe58e5265dfff05b8ceb7ffae21be7c4868 Mon Sep 17 00:00:00 2001 From: Risto Lintinen Date: Tue, 25 Aug 2009 10:27:15 +0300 Subject: [PATCH] User interface and menu fixes --- QtMeetings.conf | 8 ++--- debian/changelog | 7 ++++ debian/qtmeetings.install | 1 + resources/UserInterface.qrc | 1 - resources/icons/ixonos_logo.png | Bin 4706 -> 0 bytes src/BusinessLogic/Engine.cpp | 3 ++ src/UserInterface/Components/ScheduleWidget.cpp | 35 ++++++++++++++------ src/UserInterface/Components/ScheduleWidget.h | 6 ++++ .../Views/RoomStatusIndicatorWidget.cpp | 6 ++-- src/UserInterface/Views/WeeklyViewWidget.cpp | 6 ++-- src/UserInterface/WindowManager.cpp | 7 +++- src/UserInterface/WindowManager.h | 7 ++++ 12 files changed, 61 insertions(+), 26 deletions(-) delete mode 100644 resources/icons/ixonos_logo.png diff --git a/QtMeetings.conf b/QtMeetings.conf index 04cb472..9f1d726 100644 --- a/QtMeetings.conf +++ b/QtMeetings.conf @@ -2,11 +2,7 @@ - - - jklexch01.ixonos.com + @@ -14,7 +10,7 @@ - + diff --git a/debian/changelog b/debian/changelog index 08cf32a..ff20c47 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +qtmeetings (1.0.6-1) unstable; urgency=low + + * Improved user interface + * Fix for settings read and write + + -- Risto Lintinen Mon, 24 May 2009 12:30:00 +0300 + qtmeetings (1.0.5-1) unstable; urgency=low * Improved communication module for getting a meeting secondary id and detailed information diff --git a/debian/qtmeetings.install b/debian/qtmeetings.install index e69de29..b004e68 100644 --- a/debian/qtmeetings.install +++ b/debian/qtmeetings.install @@ -0,0 +1 @@ +resources/QtMeetings.conf etc diff --git a/resources/UserInterface.qrc b/resources/UserInterface.qrc index 6f125d3..dc3301b 100644 --- a/resources/UserInterface.qrc +++ b/resources/UserInterface.qrc @@ -12,6 +12,5 @@ icons/popup_ok.png icons/popup_question.png icons/popup_warning.png - icons/ixonos_logo.png diff --git a/resources/icons/ixonos_logo.png b/resources/icons/ixonos_logo.png deleted file mode 100644 index d04b1bde96285b1ae4800e114719008f108bf988..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4706 zcmV-o5}oadP)EX>4Tx0C?J+Q)g6D=@vcr-tj1^HV42lZa2jn55j)S9!ipu-pd!uXCy!YnK{> z2n?1;Gf_2w45>mM5#WQz#Kz&|EGkvK~TfD`~gdX7S-06<0ofSs5oQvjd@0AR~wV&ec% zEdXFAf9BHwfSvf6djSAjlpz%XppgI|6J>}*0BAb^tj|`8MF3bZ02F3R#5n-iEdVe{ zS7t~6u(trf&JYW-00;~KFj0twDF6g}0AR=?BX|IWnE(_<@>e|ZE3OddDgXd@nX){& zBsoQaTL>+22Uk}v9w^R97b_GtVFF>AKrX_0nHe&HG!NkO%m4tOkrff(gY*4(&JM25 z&Nhy=4qq+mzXtyzVq)X|<DpKGaQJ>aJVl|9x!Kv}EM4F8AGNmGkLXs)P zCDQ+7;@>R$13uq10I+I40eg`xs9j?N_Dd%aSaiVR_W%I$yKlkNCzL=651DUOSSq$Ed=-((3YAKgCY2j1FI1_jrmEhm z3sv(~%T$l4UQ>OpMpZLYTc&xiMv2YpRx)mRPGut5K^*>%BIv?Wdil zy+ylO`+*KY$4Vz$Cr4+G&IO(4Q`uA9rwXSQO+7mGt}d!;r5mBUM0dY#r|y`ZzFvTy zOmC;&dA;ZQ9DOhSRQ+xGr}ak+SO&8UBnI0I&KNw!HF0k|9WTe*@liuv!$3o&VU=N* z;e?U7(LAHoMvX=fjA_PP<0Rv4#%;!P6gpNq-kQ#w?mvCS^p@!_XIRe=&)75LwiC-K#A%&Vo6|>U7iYP1 zgY$@siA#dZE|)$on;XX6$i3uBboFsv;d;{botv|p!tJQrukJSPY3_&IpUgC$DV|v~ zbI`-cL*P;6(LW2Hl`w1HtbR{JPl0E(=OZs;FOgTR*RZ#xcdGYc?-xGyK60PqKI1$$ z-ZI`wBrnsy*W_HW0Wrec-#cqqYFCLW#$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FaK$~k=z2D_*_wxRxC_Gr-i%Hxm9>tmqO-3< zHs>rUPdV1rP3Dwit)}K+kvNmmwArcLF}8ms?CJEAXXv>%SW}xk`%~=e*S#M&VL%$b z&d#{ZoqauP>RFD_ej3(4E`uNFR?tD!C9c}e`m(#=CYPy;g;Ay4kAAi!`5`c2wo#K3 zO9fTc>iQ#$y)0iUz4kdJdz}np+3#lXeukB6^%fP z1DuTvV7SlcrdU-@RFw#&GW*`q(Y>Z%I_sO;P?J+}71tKZ{AiaA?RJ3x7^Oqg3|BwJ z!9?5y4SM|CRwfiMp+JRzia$#7GC%;hidHs~Fol6aKujR+5H}=YV>Kv>imr%B-T5MEyZK6cW^m#v#cuD%AfRSOO{tzyJZ1a)fT=nDjJ2FqX(b z7@!~p&Hz=&;R>*f5SdU^4*UpaqNYR)r$S*6cmfm=8YwEV(W?kC_UIr<1VM$;^#BQt k-B~^4obvw{^#9oSH~)Gd)W_jao&W#<07*qoM6N<$g3{9Zpa1{> diff --git a/src/BusinessLogic/Engine.cpp b/src/BusinessLogic/Engine.cpp index 6207440..9fd0c6c 100644 --- a/src/BusinessLogic/Engine.cpp +++ b/src/BusinessLogic/Engine.cpp @@ -58,6 +58,9 @@ Engine::Engine() : iAutoRefresh->start(); connect( iAutoRefresh, SIGNAL( timeout() ), iAutoRefresh, SLOT( start() ) ); connect( iAutoRefresh, SIGNAL( timeout() ), this, SLOT( updateRoomInfo() ) ); + + connect(iWindowManager, SIGNAL(closeClicked()), this, SLOT(closeApplication())); + // connect( iAutoRefresh, SIGNAL( timeout() ), this, SLOT( fetchMeetings() ) ); if( iDevice->currentOperationMode() == DeviceManager::KioskMode ) diff --git a/src/UserInterface/Components/ScheduleWidget.cpp b/src/UserInterface/Components/ScheduleWidget.cpp index 65ca353..181593e 100644 --- a/src/UserInterface/Components/ScheduleWidget.cpp +++ b/src/UserInterface/Components/ScheduleWidget.cpp @@ -12,6 +12,8 @@ const QColor ScheduleWidget::sFreeBackground = QColor( Qt::white ); const QColor ScheduleWidget::sBusyBackground = QColor( 238, 147, 17 ); const QColor ScheduleWidget::sBusyBackgroundStart = QColor( 254, 193, 104 ); +const QColor ScheduleWidget::sCurrentBackgroundStart = QColor( 237, 124, 125 ); +const QColor ScheduleWidget::sCurrentBackground = QColor( 161, 1, 1 ); const QColor ScheduleWidget::sHeaderBackground = QColor( Qt::white ); const QColor ScheduleWidget::sDayHighlightColor = QColor( 255, 235, 160 ); const QColor ScheduleWidget::sTimeHighlightColor = QColor( Qt::black ); @@ -104,8 +106,18 @@ void ScheduleTableWidget::paintEvent( QPaintEvent* aEvent ) for ( int i = 0; i < iMeetingsByDay[day].size(); ++i ) { QLinearGradient linearGrad( QPoint(iMeetingsByDay[day][i].rect.x(),iMeetingsByDay[day][i].rect.y()) , QPoint(iMeetingsByDay[day][i].rect.x(),iMeetingsByDay[day][i].rect.bottom()) ); - linearGrad.setColorAt(0, ScheduleWidget::sBusyBackgroundStart); - linearGrad.setColorAt(1, ScheduleWidget::sBusyBackground); + // draw meeting with red if it is ongoing + if ( iMeetingsByDay[day][i].meeting->startsAt() <= QDateTime::currentDateTime() && + iMeetingsByDay[day][i].meeting->endsAt() >= QDateTime::currentDateTime() ) + { + linearGrad.setColorAt(0, ScheduleWidget::sCurrentBackgroundStart); + linearGrad.setColorAt(1, ScheduleWidget::sCurrentBackground); + } + else + { + linearGrad.setColorAt(0, ScheduleWidget::sBusyBackgroundStart); + linearGrad.setColorAt(1, ScheduleWidget::sBusyBackground); + } painter.setBrush(linearGrad); painter.drawRoundRect( iMeetingsByDay[day][i].rect, 20, 20 ); @@ -299,7 +311,9 @@ ScheduleWidget::ScheduleWidget( QDateTime aCurrentDateTime, DisplaySettings *aSe iScheduleTable->setShowGrid( false ); QFont font; - font.setPointSize( 10 ); + font.setStyleHint( QFont::Helvetica ); + font.setBold( true ); + font.setPixelSize( 20 ); // add empty item to top-left corner, this will be updated in refresh() QTableWidgetItem *weekItem = new QTableWidgetItem(); @@ -374,7 +388,7 @@ void ScheduleWidget::refresh() item->setText( tr( "Wk %1" ).arg( iShownDate.weekNumber() ) ); continue; } - item->setText( iShownDate.addDays( i - 1 ).toString( tr( "ddd d MMM" ) ) ); + item->setText( iShownDate.addDays( i - 1 ).toString( tr( "ddd d/M" ) ) ); if ( iCurrentDateTime.date() == iShownDate.addDays( i - 1 ) ) { @@ -454,10 +468,10 @@ int ScheduleWidget::weekLengthAsDays() void ScheduleWidget::resizeEvent( QResizeEvent* /* aEvent */ ) { QRect rect = iScheduleTable->contentsRect(); - int rowHeight = ( int )( rect.height() / ( float )iScheduleTable->rowCount() ); - int headerRowHeight = rowHeight; - int columnWidth = ( int )( rect.width() / ( iScheduleTable->columnCount() - 0.5f ) ); - int headerColumnWidth = columnWidth / 2; + int rowHeight = ( int )( rect.height() / ( float )( iScheduleTable->rowCount() + 1 ) ); + int headerRowHeight = ( int )rowHeight*2; + int headerColumnWidth = rect.width() * 0.15f; + int columnWidth = ( rect.width() - headerColumnWidth ) / ( iScheduleTable->columnCount() - 1 ); iScheduleTable->setRowHeight( 0, headerRowHeight ); for ( int i = 1; i < iScheduleTable->rowCount(); ++i ) @@ -474,6 +488,7 @@ void ScheduleWidget::resizeEvent( QResizeEvent* /* aEvent */ ) // resize table so that frame size matches exactly int leftMargin = 0, topMargin = 0, rightMargin = 0, bottomMargin = 0; iScheduleTable->getContentsMargins( &leftMargin, &topMargin, &rightMargin, &bottomMargin ); - iScheduleTable->resize( columnWidth * iScheduleTable->columnCount() - headerColumnWidth + leftMargin + rightMargin, - rowHeight * iScheduleTable->rowCount() + topMargin + bottomMargin ); + iScheduleTable->resize( columnWidth * ( iScheduleTable->columnCount() - 1 ) + + headerColumnWidth + leftMargin + rightMargin, + rowHeight * ( iScheduleTable->rowCount() + 1 ) + topMargin + bottomMargin ); } diff --git a/src/UserInterface/Components/ScheduleWidget.h b/src/UserInterface/Components/ScheduleWidget.h index c0269dd..27c7f11 100644 --- a/src/UserInterface/Components/ScheduleWidget.h +++ b/src/UserInterface/Components/ScheduleWidget.h @@ -266,6 +266,12 @@ private: //! Color for a busy cell. static const QColor sBusyBackground; + //! Color for a busy cell. + static const QColor sCurrentBackgroundStart; + + //! Color for a busy cell. + static const QColor sCurrentBackground; + //! Color for headers. static const QColor sHeaderBackground; diff --git a/src/UserInterface/Views/RoomStatusIndicatorWidget.cpp b/src/UserInterface/Views/RoomStatusIndicatorWidget.cpp index d71fcb1..be37768 100644 --- a/src/UserInterface/Views/RoomStatusIndicatorWidget.cpp +++ b/src/UserInterface/Views/RoomStatusIndicatorWidget.cpp @@ -28,7 +28,7 @@ RoomStatusIndicatorWidget::RoomStatusIndicatorWidget(Room *aDefaultRoom, Room::S QFont statusBarFont; statusBarFont.setStyleHint( QFont::Helvetica ); - statusBarFont.setPixelSize( 12 ); + statusBarFont.setPixelSize( 18 ); // display for current time // Note: the time display receives current time info from Engine::clock() @@ -45,9 +45,7 @@ RoomStatusIndicatorWidget::RoomStatusIndicatorWidget(Room *aDefaultRoom, Room::S iStatusBar->setBackgroundColor( Qt::white ); iStatusBar->setBorderWidth( 4 ); iStatusBar->setFont(statusBarFont); - iStatusBar->setFixedHeight( 28 ); - QPixmap pixmap(":ixonos_logo"); - iStatusBar->setPixmap( pixmap ); + iStatusBar->setFixedHeight( 36 ); iStatusBar->setText( tr("Disconnected"), BorderedBarWidget::LeftAlign ); // Pegasus diff --git a/src/UserInterface/Views/WeeklyViewWidget.cpp b/src/UserInterface/Views/WeeklyViewWidget.cpp index 0c9b61f..82d18c2 100644 --- a/src/UserInterface/Views/WeeklyViewWidget.cpp +++ b/src/UserInterface/Views/WeeklyViewWidget.cpp @@ -41,7 +41,7 @@ WeeklyViewWidget::WeeklyViewWidget( QDateTime aCurrentDateTime, Configuration *a QFont statusBarFont; statusBarFont.setStyleHint( QFont::Helvetica ); - statusBarFont.setPixelSize( 12 ); + statusBarFont.setPixelSize( 18 ); QFont buttonFont; buttonFont.setStyleHint( QFont::Helvetica ); @@ -73,9 +73,7 @@ WeeklyViewWidget::WeeklyViewWidget( QDateTime aCurrentDateTime, Configuration *a iStatusBar->setBackgroundColor( Qt::white ); iStatusBar->setBorderWidth( 4 ); iStatusBar->setFont(statusBarFont); - iStatusBar->setFixedHeight( 28 ); - QPixmap pixmap(":ixonos_logo"); - iStatusBar->setPixmap( pixmap ); + iStatusBar->setFixedHeight( 36 ); iStatusBar->setText( tr("Disconnected"), BorderedBarWidget::LeftAlign ); iSchedule = new ScheduleWidget( aCurrentDateTime, iConfiguration->displaySettings(), this ); diff --git a/src/UserInterface/WindowManager.cpp b/src/UserInterface/WindowManager.cpp index d7a1252..aa90587 100644 --- a/src/UserInterface/WindowManager.cpp +++ b/src/UserInterface/WindowManager.cpp @@ -15,8 +15,13 @@ WindowManager::WindowManager( QWidget *aParent ) : { this->setWindowTitle( iApplicationName ); settingsAction = new QAction(tr("&Settings"), this); + closeAction = new QAction(tr("&Close"), this); connect(settingsAction, SIGNAL(triggered()), this, SIGNAL(showSettingsClicked())); - menuBar()->addAction(settingsAction); + connect(closeAction, SIGNAL(triggered()), this, SIGNAL(closeClicked())); + editMenu = menuBar()->addMenu(tr("&Edit")); + editMenu->addAction(settingsAction); + menuBar()->addMenu(editMenu); + menuBar()->addAction(closeAction); } WindowManager::~WindowManager() diff --git a/src/UserInterface/WindowManager.h b/src/UserInterface/WindowManager.h index d110767..b71c04d 100644 --- a/src/UserInterface/WindowManager.h +++ b/src/UserInterface/WindowManager.h @@ -60,6 +60,8 @@ signals: void showSettingsClicked(); + void closeClicked(); + void dialogActivated(); void dialogDeactivated(); @@ -104,7 +106,12 @@ private: //! Stack of views previously displayed. QStack iViewList; + //! Menu settings QAction *settingsAction; + //! Menu close application + QAction *closeAction; + //! Edit menu + QMenu *editMenu; }; #endif /*WINDOWMANAGER_H_*/ -- 1.7.9.5