def __init__(self, iface):
        """Constructor.

        :param iface: An interface instance that will be passed to this class
            which provides the hook by which you can manipulate the QGIS
            application at run time.
        :type iface: QgsInterface
        """
        # Save reference to the QGIS interface
        self.iface = iface
        # initialize plugin directory
        self.plugin_dir = os.path.dirname(__file__)
        # initialize locale
        locale = QSettings().value('locale/userLocale')[0:2]
        locale_path = os.path.join(
            self.plugin_dir,
            'i18n',
            'geosudRefToa_{}.qm'.format(locale))

        if os.path.exists(locale_path):
            self.translator = QTranslator()
            self.translator.load(locale_path)

            if qVersion() > '4.3.3':
                QCoreApplication.installTranslator(self.translator)

        # Create the dialog (after translation) and keep reference
        self.dlg = geosudRefToaDialog()

        # Declare instance attributes
        self.actions = []
        self.menu = self.tr(u'&Geosud Toa Reflectance')
        # TODO: We are going to let the user set this up in a future iteration
        self.toolbar = self.iface.addToolBar(u'geosudRefToa')
        self.toolbar.setObjectName(u'geosudRefToa')
        
        #KO_QGis Info Bar
        self.bar = QgsMessageBar()
        self.bar.setSizePolicy(QSizePolicy.Minimum, QSizePolicy.Fixed)
        self.dlg.glInfo.addWidget(self.bar, 0,0,1,1)

        #KO_Connect
        self.dlg.pbLoadImg.clicked.connect(self.displayDirFile)
        self.dlg.pbMetadata.clicked.connect(self.displayDirMetadata)
        self.dlg.pbLucky.clicked.connect(self.autoLoadMetadata)
        self.dlg.pbGetParam.clicked.connect(self.displayMetadata)
        self.dlg.cbOutput.clicked.connect(self.activeOutputDir)
        self.dlg.pbOutput.clicked.connect(self.outputDir)
        self.dlg.pbConvert.clicked.connect(self.processToa)
        self.dlg.pbAbout.clicked.connect(self.helpFile)
        self.dlg.pbClear.clicked.connect(self.clearHistory)

        #KO_Disabled
        self.dlg.pbOutput.setEnabled(False)
        self.dlg.cbOutput.setEnabled(False)
        self.dlg.pbConvert.setEnabled(False)
        self.dlg.leOutput.setEnabled(False)

        #KO_Checked
        self.dlg.rbRefNorm.setChecked(True)
 def setUp(self):
     """Runs before each test."""
     self.dialog = geosudRefToaDialog(None)
 def setUp(self):
     """Runs before each test."""
     self.dialog = geosudRefToaDialog(None)