Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

mxcpcMessageDialog.cpp

00001 //           ///          //                                        Mx clientSDK
00002 //          /////        ////                    Mx Crossplatform Client Library
00003 //         /// XXX     XXX ///
00004 //        ///    XXX XXX    ///     $RCSfile: mxcpcMessageDialog.cpp,v $
00005 //       ///       XXX       ///     $Revision: 1.5 $
00006 //      ///      XXX XXX      ///     $Date: 2006/01/05 11:56:09 $
00007 //     ////    XXX     XXX    ////     $Author: cvs-kai $
00008 //    ////                     ////
00009 //   ////  M  O  B  O  T  I  X  ////////////////////////////////////////////////
00010 //  //// Security Vision Systems //////////////////////////////////////////////
00011 //                                                                          //
00012 //  Copyright (C) 2005 - 2006, MOBOTIX AG, Germany                         //
00013 //  This software is made available under the BSD licence. Please refer   //
00014 //  to the file LICENCE.TXT contained in this distribution for details.  //
00015 //                                                                      //
00016 //  /////////////////////////////////////////////////////////////////////
00017 
00018 
00019 
00020 #include <mxcpcMessageDialog.h>
00021 #include <mxcpc_gui_config.h>
00022 
00023 #include <QHBoxLayout>
00024 #include <QVBoxLayout>
00025 #include <QPixmap>
00026 #include <QLabel>
00027 #include <QPushButton>
00028 
00029 
00030 
00031 mxcpcMessageDialog::mxcpcMessageDialog(QWidget *parent)
00032                      : mxcpcDialog(parent)              {
00033                                          
00034   QHBoxLayout *h_layout;
00035   QVBoxLayout *v_layout;
00036   QLabel *label;
00037   QPushButton *button;
00038   QWidget *widget;
00039   
00040   setWindowTitle(QString("Mx Message"));
00041 
00042   h_layout = new QHBoxLayout(this);
00043   h_layout->setSizeConstraint(QLayout::SetFixedSize);
00044   h_layout->setSpacing(MXCPC_DIALOG_SPACING);
00045 
00046   label = new QLabel(this);
00047   h_layout->addWidget(label, 0, Qt::AlignTop);
00048   label->setPixmap(QPixmap(":images/dialog_message.png"));
00049   
00050   widget = new QWidget(this);
00051   h_layout->addWidget(widget);
00052   
00053   v_layout = new QVBoxLayout(widget);
00054   v_layout->setSpacing(MXCPC_DIALOG_SPACING);
00055   
00056   MessageTextLabel = label = new QLabel(QString("<Message>"), widget);
00057   v_layout->addWidget(label, 0, Qt::AlignHCenter);
00058   
00059   button = new QPushButton(QString("Close"), widget);
00060   v_layout->addWidget(button, 0, Qt::AlignHCenter);
00061   button->setDefault(true);
00062   button->setSizePolicy(QSizePolicy(QSizePolicy::Fixed,
00063                                     QSizePolicy::Preferred));
00064   QObject::connect(button, SIGNAL(clicked(void)),
00065                    this, SLOT(hide(void)));
00066 }
00067 
00068 
00069 void mxcpcMessageDialog::setMessage(const QString& title,
00070                                     const QString& message) {
00071 
00072   setWindowTitle(title);
00073   MessageTextLabel->setText(message);
00074 }
00075 

Generated on Mon Jan 30 15:13:07 2006 for mxcpc by  doxygen 1.4.4