Main Page   Compound List   File List   Compound Members   File Members  

AreYouSureWidget Class Reference

#include <areYouSureWidget.h>

List of all members.


Detailed Description

Simple window that requires users to click yes/no.

Definition at line 36 of file areYouSureWidget.h.

Public Methods

 AreYouSureWidget (QWidget *parent=0, const char *name=0)
 Basic constructor.

 ~AreYouSureWidget ()
 Destructor.


Private Attributes

QGridLayout * grid
 Grid objects placed in.

QLabel * message
 Message displayed in window.

QPushButton * yes
 Yes button.

QPushButton * no
 No button.

QPixmap * applicationIcon
 Application icon.


Constructor & Destructor Documentation

AreYouSureWidget::AreYouSureWidget QWidget *    parent = 0,
const char *    name = 0
 

Basic constructor.

Definition at line 30 of file areYouSureWidget.cpp.

References applicationIcon, grid, IMAGE_PATH, message, no, and yes.

00031                                                        : 
00032                                    QDialog(parent, name, true )
00033 {
00034   message = new QLabel( this );
00035   message->setText( "Are you sure?" );
00036   message->setFont( QFont( "Times", 12, QFont::Bold ) );
00037 
00038   yes = new QPushButton( this );
00039   yes->setText( "Yes" );
00040   connect( yes, SIGNAL(clicked()), SLOT(accept()) );
00041 
00042   no = new QPushButton( this );
00043   no->setText( "No" );
00044   connect( no, SIGNAL(clicked()), SLOT(reject()) );
00045         
00046   //create new grid and add widgets
00047   grid = new QGridLayout( this, 2, 2, 0);
00048   grid->addMultiCellWidget(message, 0, 0, 0, 1 );
00049   grid->addWidget( yes, 1, 0 );
00050   grid->addWidget( no, 1, 1 );
00051 
00052   //set the background of the widget to be white
00053   setPaletteBackgroundColor( QColor(255, 255, 255) );
00054 
00055   //create and set application icon
00056   applicationIcon = new QPixmap(QString(IMAGE_PATH)+"albumShaperIcon.png");
00057   setIcon( *applicationIcon );
00058   setCaption( "Are you Sure?");
00059 }

AreYouSureWidget::~AreYouSureWidget  
 

Destructor.

Definition at line 61 of file areYouSureWidget.cpp.

References grid, message, no, and yes.

00062 {
00063   delete message;
00064   delete yes;
00065   delete no;
00066   delete grid;
00067 }


Member Data Documentation

QPixmap* AreYouSureWidget::applicationIcon [private]
 

Application icon.

Definition at line 61 of file areYouSureWidget.h.

Referenced by AreYouSureWidget().

QGridLayout* AreYouSureWidget::grid [private]
 

Grid objects placed in.

Definition at line 49 of file areYouSureWidget.h.

Referenced by AreYouSureWidget(), and ~AreYouSureWidget().

QLabel* AreYouSureWidget::message [private]
 

Message displayed in window.

Definition at line 52 of file areYouSureWidget.h.

Referenced by AreYouSureWidget(), and ~AreYouSureWidget().

QPushButton* AreYouSureWidget::no [private]
 

No button.

Definition at line 58 of file areYouSureWidget.h.

Referenced by AreYouSureWidget(), and ~AreYouSureWidget().

QPushButton* AreYouSureWidget::yes [private]
 

Yes button.

Definition at line 55 of file areYouSureWidget.h.

Referenced by AreYouSureWidget(), and ~AreYouSureWidget().


The documentation for this class was generated from the following files:
Generated on Thu Apr 10 00:06:41 2003 for AlbumShaper by doxygen1.2.18