def __init__(self):
        super(CompareCalls, self).__init__()
        print("Starting...")
        self.setWindowTitle("AviaNZ call comparator")
        self.setWindowIcon(QIcon('img/Avianz.ico'))
        self.setWindowFlags((self.windowFlags() ^ Qt.WindowContextHelpButtonHint) | Qt.WindowMaximizeButtonHint | Qt.WindowCloseButtonHint)

        # menu bar
        fileMenu = self.menuBar()#.addMenu("&File")
        fileMenu.addAction("About", lambda: SupportClasses_GUI.MessagePopup("a", "About", ".").exec_())
        fileMenu.addAction("Quit", QApplication.quit)
        # do we need this?
        # if platform.system() == 'Darwin':
        #    helpMenu.addAction("About",self.showAbout,"Ctrl+A")

        # main dock setup
        area = QWidget()
        mainbox = QVBoxLayout()
        area.setLayout(mainbox)
        self.setCentralWidget(area)

        ## Data dir selection
        self.dirName = ""
        label = QLabel("Select input folder containing files named in one of the following formats:")
        formatlabel = QLabel("recordername_YYMMDD_hhmmss.wav\n or \nrecordername_YYYYMMDD_hhmmss.wav")
        formatlabel.setAlignment(Qt.AlignCenter)
        label.setStyleSheet("QLabel {color: #303030}")
        formatlabel.setStyleSheet("QLabel {color: #303030}")

        self.w_browse = QPushButton(" Browse Folder")
        self.w_browse.setIcon(self.style().standardIcon(QStyle.SP_DialogOpenButton))
        self.w_browse.setStyleSheet('QPushButton {background-color: #c4ccd3; font-weight: bold; font-size:14px; padding: 3px 3px 3px 3px}')
        self.w_browse.setMinimumSize(170, 40)
        self.w_browse.setSizePolicy(QSizePolicy(1,1))
        self.w_browse.clicked.connect(self.browse)

        # area showing the selected folder
        self.w_dir = QPlainTextEdit()
        self.w_dir.setReadOnly(True)
        self.w_dir.setFixedHeight(40)
        self.w_dir.setPlainText('')
        self.w_dir.setSizePolicy(QSizePolicy(3,1))

        # feedback label
        self.labelDatasIcon = QLabel()
        self.labelDatas = QLabel()

        ## Clock shift adjustment
        labelClockSp = QLabel("Select species to analyse:")
        self.clockSpBox = QComboBox()

        labelHop = QLabel("Clock shift resolution (s)")
        self.hopSpin = QDoubleSpinBox()
        self.hopSpin.setSingleStep(0.1)
        self.hopSpin.setDecimals(3)
        self.hopSpin.setValue(1.0)

        self.suggestAdjBtn = QPushButton("Auto-suggest adjustment")
        self.suggestAdjBtn.setStyleSheet('QPushButton {background-color: #c4ccd3; font-weight: bold; font-size:14px; padding: 3px 3px 3px 3px}')
        self.suggestAdjBtn.clicked.connect(self.suggestAdjustment)
        self.suggestAdjBtn.setEnabled(False)

        self.labelAdjustIcon = QLabel()
        self.labelAdjust = QLabel()

        self.reviewAdjBtn = QPushButton("Review suggested adjustments")
        self.reviewAdjBtn.setStyleSheet('QPushButton {background-color: #c4ccd3; font-weight: bold; font-size:14px; padding: 3px 3px 3px 3px}')
        self.reviewAdjBtn.clicked.connect(self.showAdjustmentsDialog)
        self.reviewAdjBtn.setEnabled(False)

        # call review
        self.compareBtn = QPushButton("Compare calls")
        self.compareBtn.setStyleSheet('QPushButton {background-color: #c4ccd3; font-weight: bold; font-size:14px; padding: 3px 3px 3px 3px}')
        self.compareBtn.clicked.connect(self.showComparisonDialog)
        self.compareBtn.setEnabled(False)
        self.compareRecSelector = QComboBox()
        self.compareRecSelector.currentTextChanged.connect(self.updateShiftSpinbox)

        self.compareShiftSpinbox = QDoubleSpinBox()
        self.compareShiftSpinbox.setSingleStep(1.0)
        self.compareShiftSpinbox.setRange(-300, 300)

        self.adjustmentsOut = QPlainTextEdit()
        self.adjustmentsOut.setReadOnly(True)
        self.componentsOut = QPlainTextEdit()
        self.componentsOut.setReadOnly(True)

        ### Layouts for each box
        # input dir
        inputGroup = QGroupBox("Input")
        inputGrid = QGridLayout()
        inputGroup.setLayout(inputGrid)
        inputGroup.setStyleSheet("QGroupBox:title{color: #505050; font-weight: 50}")

        inputGrid.addWidget(label, 0, 0, 1, 4)
        inputGrid.addWidget(formatlabel, 1, 0, 1, 4)
        inputGrid.addWidget(self.w_dir, 2, 0, 1, 3)
        inputGrid.addWidget(self.w_browse, 2, 3, 1, 1)
        hboxLabel = QHBoxLayout()
        hboxLabel.addWidget(self.labelDatasIcon)
        hboxLabel.addWidget(self.labelDatas)
        hboxLabel.addStretch(10)
        inputGrid.addLayout(hboxLabel, 3, 0, 1, 4)

        # clock adjustment
        clockadjGroup = QGroupBox("Clock adjustment")
        clockadjGrid = QGridLayout()
        clockadjGroup.setLayout(clockadjGrid)
        clockadjGroup.setStyleSheet("QGroupBox:title{color: #505050; font-weight: 50}")

        clockadjGrid.addWidget(labelClockSp, 0, 0, 1, 1)
        clockadjGrid.addWidget(self.clockSpBox, 0, 1, 1, 3)
        clockadjGrid.addWidget(labelHop, 1, 0, 1, 1)
        clockadjGrid.addWidget(self.hopSpin, 1, 1, 1, 3)
        clockadjGrid.addWidget(self.suggestAdjBtn, 2, 0, 1, 4)
        hboxLabel2 = QHBoxLayout()
        hboxLabel2.addWidget(self.labelAdjustIcon)
        hboxLabel2.addWidget(self.labelAdjust)
        hboxLabel2.addStretch(10)
        clockadjGrid.addLayout(hboxLabel2, 3, 0, 1, 4)
        clockadjGrid.addWidget(self.reviewAdjBtn, 4, 0, 1, 4)

        # call comparator
        comparisonGroup = QGroupBox("Call comparison")
        comparisonGrid = QGridLayout()
        comparisonGroup.setLayout(comparisonGrid)
        comparisonGroup.setStyleSheet("QGroupBox:title{color: #505050; font-weight: 50}")

        comparisonGrid.addWidget(QLabel("Compare recorders:"), 0, 0)
        comparisonGrid.addWidget(self.compareRecSelector, 0, 2)
        comparisonGrid.addWidget(QLabel("with shift:"), 0, 3)
        comparisonGrid.addWidget(self.compareShiftSpinbox, 0, 4)
        comparisonGrid.addWidget(self.compareBtn, 1,0,1,4)

        # output save btn and settings
        outputGroup = QGroupBox("Output")
        outputGrid = QGridLayout()
        outputGroup.setLayout(outputGrid)
        outputGroup.setStyleSheet("QGroupBox:title{color: #505050; font-weight: 50}")
        outputGrid.addWidget(self.adjustmentsOut, 0, 0, 1, 4)
        outputGrid.addWidget(self.componentsOut, 1, 0, 1, 4)

        ### Main Layout
        mainbox.addWidget(inputGroup)
        mainbox.addWidget(clockadjGroup)
        mainbox.addWidget(comparisonGroup)
        mainbox.addWidget(outputGroup)