int StandardDialogs::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QDialog::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: slotOpenFileDlg(); break;
        case 1: slotOpenColorDlg(); break;
        case 2: slotOpenFontDlg(); break;
        default: ;
        }
        _id -= 3;
    }
    return _id;
}
StandardDialogs::StandardDialogs( QWidget *parent, Qt::WindowFlags  f )
    : QDialog( parent, f )
{  
    setWindowTitle(tr("Standard Dialogs"));

    layout = new QGridLayout( this );  
    
    filePushButton = new QPushButton();
    filePushButton->setText(tr("File Dialog"));
    
    colorPushButton = new QPushButton();
    colorPushButton->setText(tr("Color Dialog"));
    
    fontPushButton = new QPushButton( );
    fontPushButton->setText(tr("Font Dialog"));

    fileLineEdit = new QLineEdit();
    
    colorFrame = new QFrame();
    colorFrame->setFrameShape( QFrame::Box );
    colorFrame->setAutoFillBackground(true);
    
    fontLineEdit = new QLineEdit( );
    fontLineEdit->setText(tr("Hello World"));
    	
    layout->addWidget( filePushButton, 0, 0 );	
    layout->addWidget( fileLineEdit, 0, 1 );
    layout->addWidget( colorPushButton, 1, 0 );
    layout->addWidget( colorFrame, 1, 1 );
    layout->addWidget( fontPushButton, 2, 0 );
    layout->addWidget( fontLineEdit, 2, 1 );
    layout->setMargin(15);
    layout->setSpacing(10);
    
    connect(filePushButton,SIGNAL(clicked()),this,SLOT(slotOpenFileDlg()));
    connect(colorPushButton,SIGNAL(clicked()),this,SLOT(slotOpenColorDlg()));
    connect(fontPushButton,SIGNAL(clicked()),this,SLOT(slotOpenFontDlg()));
}