User interface and menu fixes
authorRisto Lintinen <lintiri@lintiri-desktop.(none)>
Tue, 25 Aug 2009 07:27:15 +0000 (10:27 +0300)
committerRisto Lintinen <lintiri@lintiri-desktop.(none)>
Tue, 25 Aug 2009 07:27:15 +0000 (10:27 +0300)
12 files changed:
QtMeetings.conf
debian/changelog
debian/qtmeetings.install
resources/UserInterface.qrc
resources/icons/ixonos_logo.png [deleted file]
src/BusinessLogic/Engine.cpp
src/UserInterface/Components/ScheduleWidget.cpp
src/UserInterface/Components/ScheduleWidget.h
src/UserInterface/Views/RoomStatusIndicatorWidget.cpp
src/UserInterface/Views/WeeklyViewWidget.cpp
src/UserInterface/WindowManager.cpp
src/UserInterface/WindowManager.h

index 04cb472..9f1d726 100644 (file)
@@ -2,11 +2,7 @@
 <configuration password="admin" >
 
        <connection>
-               <!-- TEST SERVER DATA-->
-               <!--<serverurl>192.168.0.35</serverurl>
-               <username>maemo</username>
-               <password>P@ssw0rd</password>-->
-               <serverurl>jklexch01.ixonos.com</serverurl>
+               <serverurl></serverurl>
                <username></username>
                <password></password>
                <!-- interval is interpreted in seconds -->
@@ -14,7 +10,7 @@
        </connection>
 
        <startup>
-               <powersaving enabled="true" on="08:00" off="17:00" />
+               <powersaving enabled="true" on="08:00" off="16:00" />
        </startup>
 
        <display>
index 08cf32a..ff20c47 100644 (file)
@@ -1,3 +1,10 @@
+qtmeetings (1.0.6-1) unstable; urgency=low
+
+  * Improved user interface
+  * Fix for settings read and write
+
+ -- Risto Lintinen <risto.lintinen@ixonos.com>  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
index e69de29..b004e68 100644 (file)
@@ -0,0 +1 @@
+resources/QtMeetings.conf etc
index 6f125d3..dc3301b 100644 (file)
@@ -12,6 +12,5 @@
         <file alias="popup_ok" >icons/popup_ok.png</file>
         <file alias="popup_question" >icons/popup_question.png</file>
         <file alias="popup_warning" >icons/popup_warning.png</file>
-        <file alias="ixonos_logo" >icons/ixonos_logo.png</file>
     </qresource>
 </RCC>
diff --git a/resources/icons/ixonos_logo.png b/resources/icons/ixonos_logo.png
deleted file mode 100644 (file)
index d04b1bd..0000000
Binary files a/resources/icons/ixonos_logo.png and /dev/null differ
index 6207440..9fd0c6c 100644 (file)
@@ -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 )
index 65ca353..181593e 100644 (file)
@@ -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 );
 }
index c0269dd..27c7f11 100644 (file)
@@ -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;
 
index d71fcb1..be37768 100644 (file)
@@ -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
index 0c9b61f..82d18c2 100644 (file)
@@ -41,7 +41,7 @@ WeeklyViewWidget::WeeklyViewWidget( QDateTime aCurrentDateTime, Configuration *a
 \r
        QFont statusBarFont;\r
        statusBarFont.setStyleHint( QFont::Helvetica );\r
-       statusBarFont.setPixelSize( 12 );\r
+       statusBarFont.setPixelSize( 18 );\r
 \r
        QFont buttonFont;\r
        buttonFont.setStyleHint( QFont::Helvetica );\r
@@ -73,9 +73,7 @@ WeeklyViewWidget::WeeklyViewWidget( QDateTime aCurrentDateTime, Configuration *a
        iStatusBar->setBackgroundColor( Qt::white );\r
        iStatusBar->setBorderWidth( 4 );\r
        iStatusBar->setFont(statusBarFont);\r
-       iStatusBar->setFixedHeight( 28 );\r
-       QPixmap pixmap(":ixonos_logo");\r
-       iStatusBar->setPixmap( pixmap );\r
+       iStatusBar->setFixedHeight( 36 );\r
        iStatusBar->setText( tr("Disconnected"), BorderedBarWidget::LeftAlign );\r
 \r
        iSchedule = new ScheduleWidget( aCurrentDateTime, iConfiguration->displaySettings(), this );\r
index d7a1252..aa90587 100644 (file)
@@ -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()
index d110767..b71c04d 100644 (file)
@@ -60,6 +60,8 @@ signals:
        
        void showSettingsClicked();
 
+       void closeClicked();
+
        void dialogActivated();
        void dialogDeactivated();
 
@@ -104,7 +106,12 @@ private:
        //! Stack of views previously displayed.
        QStack<ViewBase *> iViewList;
 
+       //! Menu settings
     QAction *settingsAction;
+    //! Menu close application
+    QAction *closeAction;
+    //! Edit menu
+    QMenu *editMenu;
 };
 
 #endif /*WINDOWMANAGER_H_*/