#=======================================================================
# Author: Donovan Parks
#
# Dialog box used to customize the name of hierarchical headings.
#
# Copyright 2011 Donovan Parks
#
# This file is part of STAMP.
#
# STAMP 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 3 of the License, or
# (at your option) any later version.
#
# STAMP 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 STAMP.  If not, see <http://www.gnu.org/licenses/>.
#=======================================================================

from PyQt4 import QtGui, QtCore
from customizeHeadingsUI import Ui_CreateProfileDlg

class CustomizeHeadingsDlg(QtGui.QDialog):
  def __init__(self, parent=None):
    QtGui.QWidget.__init__(self, parent)
    
    # initialize GUI
    self.ui = Ui_CreateProfileDlg()
    self.ui.setupUi(self)

    self.centerWindow()
    
    QtCore.QObject.connect(self.ui.btnOK, QtCore.SIGNAL("clicked()"), self.accept)
    QtCore.QObject.connect(self.ui.btnCancel, QtCore.SIGNAL("clicked()"), self.reject)

  def centerWindow(self):
    screen = QtGui.QDesktopWidget().screenGeometry()
    size =  self.geometry()
    self.move((screen.width()-size.width())/2, (screen.height()-size.height())/2)
