//*****************************************************************************
// 
// Blackjack - an X windows program of the casino game.
// Copyright (C) 1997  Tom Daley 
// 
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// 
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
// 
// The license is in the file COPYING.
// 
// Tom Daley
// 1309 W. Lorraine Ave.
// Woodland Park, CO  80863-2329
// 
// daley@codenet.net (Tom Daley)
// http://users.codenet.net/daley
// 
//*****************************************************************************

#include <qpushbt.h>
#include <qlabel.h>

#include "dollar_scroll_bar.h"
#include "insurance_window.h"

//*****************************************************************************

InsuranceWindow::
InsuranceWindow(float max_bet, float bet_inc, QWidget *parent, const char* name,
                bool modal, WFlags f) : 
                QDialog(parent, name, modal, f) {

   int b_width = 40, b_height = 25, b_space = 10, l_height = 20;
   int x = 0, y = 0, width = 140, height = 140;

   QLabel *label_p = new QLabel("Insurance?", this);
   label_p->setAlignment(AlignCenter);
   label_p->setGeometry(x, y, width, height/3);

   y += height/3;
   _bet_p = new QtedDollarScrollBar("Bet = ", 0.0, max_bet, bet_inc, this);
   _bet_p->setGeometry(x, y, width, height/3);

   y += height/3;
   QPushButton *ok_p = new QPushButton("OK", this);
   ok_p->setGeometry((width - b_width)/2, y + b_space, 
                     b_width, b_height);

   connect(ok_p, SIGNAL(released()), this, SLOT(accept()));
   setFixedSize(width, height);
}

//*****************************************************************************
