# Path: scgv/qtviews/base.py
# class BaseDialog(QDialog):
# 
#     def __init__(self, *args, **kwargs):
#         super(BaseDialog, self).__init__(*args, **kwargs)
#         # self.setWindowFlags(
#         #     self.windowFlags() |
#         #     Qt.CustomizeWindowHint |
#         #     Qt.WindowMaximizeButtonHint |
#         #     Qt.WindowType_Mask)
#         self.signals = CloseSignals()
#         print(self.sizeHint())
#         # self.resize(self.sizeHint())
# 
#     def closeEvent(self, event):
#         print("closing window...")
#         self.signals.closing.emit()
# 
# class CloseSignals(QObject):
#     closing = pyqtSignal()


import pandas as pd
import numpy as np
from collections import defaultdict
from functools import partial
from PyQt5.QtCore import Qt, pyqtSignal
from PyQt5.QtWidgets import QHBoxLayout, QVBoxLayout, \
    QPushButton, QTableWidget, QTableWidgetItem, QCheckBox
from scgv.qtviews.base import BaseDialog, CloseSignals

        button_box.addWidget(cancel_button)
        button_box.addWidget(apply_button)
        layout.addLayout(button_box)

    def on_apply_action(self):
        self.signals.selected_tracks_change.emit(self.selected_tracks)
        self.close()

    def on_cancel_action(self):
        self.close()

    def build_model(self, guide_df):
        dtypes = guide_df.dtypes
        data = defaultdict(list)
        for index, (name, dtype) in enumerate(dtypes.iteritems()):
            has_nan = guide_df[name].isna()
            if np.any(has_nan):
                continue

            rank = len(guide_df[name].unique())
            if rank < self.MIN_RANK or rank > self.MAX_RANK:
                continue
            data['index'].append(index)
            data['name'].append(name)
            data['dtype'].append(dtype)
            data['rank'].append(rank)

        self.model_df = pd.DataFrame(
            data, columns=['index', 'name', 'dtype', 'rank']

# Path: scgv/qtviews/base.py
# class BaseDialog(QDialog):
# 
#     def __init__(self, *args, **kwargs):
#         super(BaseDialog, self).__init__(*args, **kwargs)
#         # self.setWindowFlags(
#         #     self.windowFlags() |
#         #     Qt.CustomizeWindowHint |
#         #     Qt.WindowMaximizeButtonHint |
#         #     Qt.WindowType_Mask)
#         self.signals = CloseSignals()
#         print(self.sizeHint())
#         # self.resize(self.sizeHint())
# 
#     def closeEvent(self, event):
#         print("closing window...")
#         self.signals.closing.emit()
# 
# class CloseSignals(QObject):
#     closing = pyqtSignal()


# Path: scgv/qtviews/guide.py
import pandas as pd
import numpy as np
from collections import defaultdict
from functools import partial
from PyQt5.QtCore import Qt, pyqtSignal
from PyQt5.QtWidgets import QHBoxLayout, QVBoxLayout, \
    QPushButton, QTableWidget, QTableWidgetItem, QCheckBox
from scgv.qtviews.base import BaseDialog, CloseSignals


        button_box.addWidget(cancel_button)
        button_box.addWidget(apply_button)
        layout.addLayout(button_box)

    def on_apply_action(self):
        self.signals.selected_tracks_change.emit(self.selected_tracks)
        self.close()

    def on_cancel_action(self):
        self.close()

    def build_model(self, guide_df):
        dtypes = guide_df.dtypes
        data = defaultdict(list)
        for index, (name, dtype) in enumerate(dtypes.iteritems()):
            has_nan = guide_df[name].isna()
            if np.any(has_nan):
                continue

            rank = len(guide_df[name].unique())
            if rank < self.MIN_RANK or rank > self.MAX_RANK:
                continue
            data['index'].append(index)
            data['name'].append(name)
            data['dtype'].append(dtype)
            data['rank'].append(rank)

        self.model_df = pd.DataFrame(
            data, columns=['index', 'name', 'dtype', 'rank']

        )