void SWCNTBuilderWidget::ctor()
  {
    ui.setupUi(this);

    this->readSettings();

    this->connect(ui.push_build, SIGNAL(clicked()), SIGNAL(buildClicked()));
    this->connect(ui.push_hide, SIGNAL(clicked()), SLOT(close()));
  }
ossimQtOverviewBuilderDialog::ossimQtOverviewBuilderDialog(
   QWidget* parent,
   ossimImageHandler* imageHandler)
   :
      QDialog(parent, "ossimQtOverviewBuilderDialog", true),
      theImageHandler(imageHandler),
      theWriter(NULL),
      theMainVBox(NULL),
     
      theHBox1(NULL),
      theSourceImageGroupBox(NULL),         
      theSourceImageLabel(NULL),
      
      theHBox2(NULL),
      theSpacer1(NULL), 
      theBuildButton(NULL),
      theCloseButton(NULL)
{
   setCaption("Build Overviews");

   if (!theImageHandler)
   {
      close();
   }
   
   // Main vertical box.
   theMainVBox = new QVBoxLayout(this);

   // First row, display source image file name.
   theHBox1 = new QHBoxLayout(theMainVBox);
   
   theSourceImageGroupBox = new QGroupBox("source image", this);
   theSourceImageGroupBox->setAlignment(Qt::AlignHCenter);

   QString qs = theImageHandler->getFilename().c_str();
   theSourceImageLabel = new QLabel(qs,
                                    theSourceImageGroupBox,
                                    "theSourceImageLabel");
   theHBox1->addWidget(theSourceImageGroupBox);
   // End of first row.

   // Second row.
   theHBox2 = new QHBoxLayout(theMainVBox);
   
   theBuildButton = new QPushButton( this, "theBuildButton" );
   theBuildButton->setText( "build" );
   theBuildButton->setDefault(false);
   theBuildButton->setAutoDefault(false);   
   
   theCloseButton = new QPushButton( this, "theCloseButton" );
   theCloseButton->setText( "Close" );
   theCloseButton->setDefault(false);
   theCloseButton->setAutoDefault(false);   

   // theHBox2->addWidget(theSpacer1);
   theHBox2->addWidget(theBuildButton);
   theHBox2->addWidget(theCloseButton);

   //---
   // Connect all the signals to slots...
   //
   // NOTE:
   // If a push button is set to "default" or "auto default" it will always
   // call that slot when return is pressed in the dialog.
   // Since this isn't what I want all defaults are set to off!
   //---
   connect( theBuildButton, SIGNAL ( clicked() ),
            this, SLOT ( buildClicked() ) );
   
   connect( theCloseButton, SIGNAL ( clicked() ),
            this, SLOT ( closeClicked() ) );
}