# Path: objbrowser/qtpy/QtCore.py

# 
# Path: objbrowser/qtpy/QtWidgets.py

# 
# Path: objbrowser/qtpy/QtCore.py

# 
# Path: objbrowser/app.py
# def get_qsettings():
#     """ Creates a QSettings object for this application.    
#         We do not set the application and organization in the QApplication object to 
#         prevent side-effects.
#     """
#     return QtCore.QSettings("titusjan.nl", PROGRAM_NAME)


import logging
from objbrowser.qtpy import QtCore, QtWidgets
from objbrowser.qtpy.QtCore import Qt
from objbrowser.app import get_qsettings
    def get_header_context_menu_actions(self):
        """ Returns the actions of the context menu of the header
        """
        return self._horizontal_header().actions()
        
        
    def _horizontal_header(self):
        """ Returns the horizontal header (of type QHeaderView).
        
            Override this if the horizontalHeader() function does not exist.
        """
        return self.horizontalHeader()
        
        
    def __make_show_column_function(self, column_idx):
        """ Creates a function that shows or hides a column."""
        show_column = lambda checked: self.setColumnHidden(column_idx, not checked)
        return show_column   
    
    
    def read_view_settings(self, key, settings=None, reset=False):
        """ Reads the persistent program settings
        
            :param reset: If True, the program resets to its default settings
            :returns: True if the header state was restored, otherwise returns False
        """ 
        logger.debug("Reading view settings for: {}".format(key))
        header_restored = False
        if not reset:
            if settings is None:

# Path: objbrowser/qtpy/QtCore.py

# 
# Path: objbrowser/qtpy/QtWidgets.py

# 
# Path: objbrowser/qtpy/QtCore.py

# 
# Path: objbrowser/app.py
# def get_qsettings():
#     """ Creates a QSettings object for this application.    
#         We do not set the application and organization in the QApplication object to 
#         prevent side-effects.
#     """
#     return QtCore.QSettings("titusjan.nl", PROGRAM_NAME)


# Path: objbrowser/toggle_column_mixin.py
import logging
from objbrowser.qtpy import QtCore, QtWidgets
from objbrowser.qtpy.QtCore import Qt
from objbrowser.app import get_qsettings

    def get_header_context_menu_actions(self):
        """ Returns the actions of the context menu of the header
        """
        return self._horizontal_header().actions()
        
        
    def _horizontal_header(self):
        """ Returns the horizontal header (of type QHeaderView).
        
            Override this if the horizontalHeader() function does not exist.
        """
        return self.horizontalHeader()
        
        
    def __make_show_column_function(self, column_idx):
        """ Creates a function that shows or hides a column."""
        show_column = lambda checked: self.setColumnHidden(column_idx, not checked)
        return show_column   
    
    
    def read_view_settings(self, key, settings=None, reset=False):
        """ Reads the persistent program settings
        
            :param reset: If True, the program resets to its default settings
            :returns: True if the header state was restored, otherwise returns False
        """ 
        logger.debug("Reading view settings for: {}".format(key))
        header_restored = False
        if not reset:
            if settings is None:

                settings = get_qsettings()