// This sourcefile is created by Peter Jodda / peter@jodda.de
// It is under the Peter Jodda license:
// Everyboy may use it on his own risk. This header must stay in the file!
// If you expand this file, please contact me, that I can integrate the
// enhancemants in the original file.
//

#include <qdialog.h>
#include <qpushbutton.h>
#include <qgrid.h>
#include <qlayout.h>
#include <qlabel.h>


#include <stdio.h>

#include "aboutbox.h"
#include "texte.h"

#define KCAMEDIA_VERSION 1



//-----------------------------------------------------------------------------

AboutBox::AboutBox(QWidget *parent) : 
		QDialog(parent,"Settings",TRUE)
{
   QPushButton *ok;
   QGridLayout *grid;
   QBoxLayout  *topLayout;
   char        versionString[20];
   char        buildString[30];

   setCaption(TextGet(TEXT_CAMERA_ABOUT));

   topLayout = new QVBoxLayout( this, 2 );
   
   topLayout->addWidget(new QLabel(" ",this));
   topLayout->addWidget(new QLabel(TextGet(TEXT_CAMERA_NAME),this),0,AlignHCenter);
   topLayout->addWidget(new QLabel(" ",this));

   sprintf(versionString,"%d",KCAMEDIA_VERSION);
   sprintf(buildString  ,"%s",   __DATE__ );
   grid = new QGridLayout( topLayout, 2, 2,10);
   grid->addWidget(new QLabel(TextGet(TEXT_CAMERA_VERSION),this),0,0);
   grid->addWidget(new QLabel(TextGet(TEXT_CAMERA_BUILD_ON),this),1,0);
   grid->addWidget(new QLabel(versionString,this),0,1);
   grid->addWidget(new QLabel(buildString,this),1,1);


   topLayout->addWidget(new QLabel(" ",this));
   topLayout->addWidget(new QLabel("Copyright by Sirius Cybernetics -- Solutions for a large Universe",this));
   topLayout->addWidget(new QLabel(" ",this));
   topLayout->addWidget(new QLabel("Peter Jodda / peter@jodda.de",this),0,AlignRight);
   topLayout->addWidget(new QLabel(" ",this));


   // --- the ok button
   ok = new QPushButton( TextGet(TEXT_OK), this );
   //ok->setGeometry( 10,10, 100,30 );
   connect( ok, SIGNAL(clicked()), SLOT(accept()) );

   topLayout->addWidget(ok,20,AlignCenter);   
   

} // Aboutbox constructor

