X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2FUserInterface%2FViews%2FMeetingInfoDialog.cpp;h=760eca9f98aae696305b7a1782363afd2c70d84c;hb=a2659d5f04b1662bea18fbbbff3a763fcfe3ff7c;hp=95e2cce74a45ae0f44a5adb870fd9a3a4db29550;hpb=9ee999fe4a7de48abc3b4f950699cd4564d16562;p=qtmeetings diff --git a/src/UserInterface/Views/MeetingInfoDialog.cpp b/src/UserInterface/Views/MeetingInfoDialog.cpp index 95e2cce..760eca9 100644 --- a/src/UserInterface/Views/MeetingInfoDialog.cpp +++ b/src/UserInterface/Views/MeetingInfoDialog.cpp @@ -1,7 +1,10 @@ #include "MeetingInfoDialog.h" + #include "ToolBox.h" #include "Meeting.h" #include "Room.h" +#include "Configuration.h" + #include #include #include @@ -13,6 +16,28 @@ MeetingInfoDialog::MeetingInfoDialog( Meeting *aMeeting, QWidget *aParent ) : { setWindowTitle( tr( "Details" ) ); + if ( aMeeting != 0 ) + { + createDialogView( aMeeting ); + } + + setMinimumWidth( MeetingInfoDialog::width ); + setMinimumHeight( MeetingInfoDialog::height ); +} + +MeetingInfoDialog::~MeetingInfoDialog() +{ +} + +void MeetingInfoDialog::setMeeting(Meeting *aMeeting) +{ + createDialogView( aMeeting ); +} + +void MeetingInfoDialog::createDialogView(Meeting *aMeeting) +{ + qDebug() << "[MeetingInfoDialog::createDialogView] "; + QFont normalFont; normalFont.setPointSize( 11 ); @@ -21,11 +46,30 @@ MeetingInfoDialog::MeetingInfoDialog( Meeting *aMeeting, QWidget *aParent ) : boldFont.setBold( true ); QLabel *subjectLabel = ToolBox::createLabel( tr( "Subject:" ), boldFont ); - QLabel *subjectContent = ToolBox::createLabel( aMeeting->subject(), normalFont ); + QLabel *subjectContent = new QLabel(); + subjectContent->setFont( normalFont ); QLabel *descriptionLabel = ToolBox::createLabel( tr( "Description:" ), boldFont ); QTextEdit *descriptionContent = new QTextEdit( "" ); - descriptionContent->setHtml( aMeeting->description() ); + + if( Configuration::instance()->showConfidentialMeetingDetails() ) + { + subjectContent->setText( aMeeting->subject() ); + descriptionContent->setHtml( aMeeting->description() ); + } + + if( subjectContent->text().isEmpty() ) + { + subjectContent->setText( tr( "Room reserved", "Meeting Info Subject" ) ); // default subject text + } + + qDebug() << "############ Desc: " << descriptionContent->toPlainText().trimmed(); + + if( descriptionContent->toPlainText().trimmed().isEmpty() ) + { + descriptionContent->setPlainText( tr( "Room reserved", "Meeting Info Description" ) ); // default description text + } + descriptionContent->setReadOnly( true ); descriptionContent->setFont( normalFont ); @@ -75,11 +119,6 @@ MeetingInfoDialog::MeetingInfoDialog( Meeting *aMeeting, QWidget *aParent ) : layout->addStretch(); layout->addLayout( buttonLayout ); setLayout( layout ); - - setMinimumWidth( MeetingInfoDialog::width ); - setMinimumHeight( MeetingInfoDialog::height ); -} - -MeetingInfoDialog::~MeetingInfoDialog() -{ + + qDebug() << "[MeetingInfoDialog::createDialogView] "; }