# Path: reggata/logic/abstract_tool.py
# class AbstractTool(QtCore.QObject):
# 
#     def __init__(self):
#         super(AbstractTool, self).__init__()
# 
#     def id(self):
#         raise NotImplementedError()
# 
#     def title(self):
#         return "Untitled Tool"
# 
#     def relatedToolIds(self):
#         return []
# 
#     def connectRelatedTool(self, relatedTool):
#         pass
# 
#     def setRepo(self, repo):
#         pass
# 
#     def setUser(self, user):
#         pass
# 
#     def storeCurrentState(self):
#         pass
# 
#     def restoreRecentState(self):
#         pass
# 
#     def connectActionsWithActionHandlers(self):
#         pass
# 
#     def createGui(self, guiParent):
#         pass
# 
#     gui = property(fget=None, fset=None)
# 
# 
#     def buildGuiMainMenu(self):
#         self.gui.buildActions()
#         self.gui.buildMainMenu()
#         self.connectActionsWithActionHandlers()
#         return self.gui.mainMenu
# 
#     def enable(self):
#         pass
# 
#     def disable(self):
#         pass
# 
#     def toggleEnableDisable(self, enable):
#         if enable:
#             self.enable()
#         else:
#             self.disable()
# 
# 
#     def handlerSignals(self):
#         return []
# 
# Path: reggata/logic/handler_signals.py
# class HandlerSignals():
#     '''Named constants in this class is not the signal names, but the signal types.
#     They are arguments of the following signals: handlerSignal, handlerSignals.
#     handlerSignal accepts single signal type. handlerSignals accepts a list of
#     signal types. See also WidgetsUpdateManager, ActionHandlerStorage and
#     AbstractActionHandler classes.
#     '''
# 
#     ITEM_CREATED = "itemCreated"
#     ITEM_CHANGED = "itemChanged"
#     ITEM_DELETED = "itemDeleted"
#     LIST_OF_FAVORITE_REPOS_CHANGED = "listOfFavoriteReposChanged"
#     STATUS_BAR_MESSAGE = "statusBarMessage"
#     RESET_SINGLE_ROW = "resetSingleRow"     # TODO: This signal type should be hidden in ItemsTableTool, because it's not global
#     RESET_ROW_RANGE = "resetRowRange"       # TODO: This signal type should be hidden in ItemsTableTool too
#     REGGATA_CONF_CHANGED = "reggata.conf file has changed"
# 
# 
#     @staticmethod
#     def allPossibleSignals():
#         return [HandlerSignals.ITEM_CREATED,
#                 HandlerSignals.ITEM_CHANGED,
#                 HandlerSignals.ITEM_DELETED,
#                 HandlerSignals.LIST_OF_FAVORITE_REPOS_CHANGED,
#                 HandlerSignals.STATUS_BAR_MESSAGE,
#                 HandlerSignals.RESET_SINGLE_ROW,
#                 HandlerSignals.RESET_ROW_RANGE,
#                 HandlerSignals.REGGATA_CONF_CHANGED,
#                 ]
# 
# Path: reggata/gui/tag_cloud_gui.py
# class TagCloudGui(ToolGui):
#     def __init__(self, parent=None, repo=None):
#         super(TagCloudGui, self).__init__(parent)
#         self.__tagCloudTextEdit = TagCloudTextEdit(parent, repo)
# 
#         self.connect(self.__tagCloudTextEdit,
#                      QtCore.SIGNAL("selectedTagsChanged"),
#                      self._emitSelectedTagsChanged)
# 
#         self.connect(self.__tagCloudTextEdit,
#                      QtCore.SIGNAL("selectedKeywordAll"),
#                      self._emitSelectedKeywordAll)
# 
# 
# 
#         layout = QtGui.QVBoxLayout()
#         layout.addWidget(self.__tagCloudTextEdit)
#         self.setLayout(layout)
# 
#     def reset(self):
#         self.__tagCloudTextEdit.reset()
# 
#     def _setRepo(self, value):
#         self.__tagCloudTextEdit.repo = value
#     def _getRepo(self):
#         return self.__tagCloudTextEdit.repo
#     repo = property(_getRepo, _setRepo)
# 
#     def _emitSelectedTagsChanged(self, tags, notTags):
#         self.emit(QtCore.SIGNAL("selectedTagsChanged"), tags, notTags)
# 
#     def _emitSelectedKeywordAll(self):
#         self.emit(QtCore.SIGNAL("selectedKeywordAll"))
# 
#     def refresh(self):
#         self.__tagCloudTextEdit.refresh()


from PyQt4 import QtCore
from reggata.logic.abstract_tool import AbstractTool
from reggata.logic.handler_signals import HandlerSignals
from reggata.gui.tag_cloud_gui import TagCloudGui
'''
Created on 08.09.2012
@author: vlkv
'''


class TagCloud(AbstractTool):

    TOOL_ID = "TagCloudTool"

    def __init__(self):
        super(TagCloud, self).__init__()

        self._repo = None

        self._gui = None


    def id(self):
        return TagCloud.TOOL_ID


    def title(self):
        return self.tr("Tag Cloud")


    def createGui(self, guiParent):

# Path: reggata/logic/abstract_tool.py
# class AbstractTool(QtCore.QObject):
# 
#     def __init__(self):
#         super(AbstractTool, self).__init__()
# 
#     def id(self):
#         raise NotImplementedError()
# 
#     def title(self):
#         return "Untitled Tool"
# 
#     def relatedToolIds(self):
#         return []
# 
#     def connectRelatedTool(self, relatedTool):
#         pass
# 
#     def setRepo(self, repo):
#         pass
# 
#     def setUser(self, user):
#         pass
# 
#     def storeCurrentState(self):
#         pass
# 
#     def restoreRecentState(self):
#         pass
# 
#     def connectActionsWithActionHandlers(self):
#         pass
# 
#     def createGui(self, guiParent):
#         pass
# 
#     gui = property(fget=None, fset=None)
# 
# 
#     def buildGuiMainMenu(self):
#         self.gui.buildActions()
#         self.gui.buildMainMenu()
#         self.connectActionsWithActionHandlers()
#         return self.gui.mainMenu
# 
#     def enable(self):
#         pass
# 
#     def disable(self):
#         pass
# 
#     def toggleEnableDisable(self, enable):
#         if enable:
#             self.enable()
#         else:
#             self.disable()
# 
# 
#     def handlerSignals(self):
#         return []
# 
# Path: reggata/logic/handler_signals.py
# class HandlerSignals():
#     '''Named constants in this class is not the signal names, but the signal types.
#     They are arguments of the following signals: handlerSignal, handlerSignals.
#     handlerSignal accepts single signal type. handlerSignals accepts a list of
#     signal types. See also WidgetsUpdateManager, ActionHandlerStorage and
#     AbstractActionHandler classes.
#     '''
# 
#     ITEM_CREATED = "itemCreated"
#     ITEM_CHANGED = "itemChanged"
#     ITEM_DELETED = "itemDeleted"
#     LIST_OF_FAVORITE_REPOS_CHANGED = "listOfFavoriteReposChanged"
#     STATUS_BAR_MESSAGE = "statusBarMessage"
#     RESET_SINGLE_ROW = "resetSingleRow"     # TODO: This signal type should be hidden in ItemsTableTool, because it's not global
#     RESET_ROW_RANGE = "resetRowRange"       # TODO: This signal type should be hidden in ItemsTableTool too
#     REGGATA_CONF_CHANGED = "reggata.conf file has changed"
# 
# 
#     @staticmethod
#     def allPossibleSignals():
#         return [HandlerSignals.ITEM_CREATED,
#                 HandlerSignals.ITEM_CHANGED,
#                 HandlerSignals.ITEM_DELETED,
#                 HandlerSignals.LIST_OF_FAVORITE_REPOS_CHANGED,
#                 HandlerSignals.STATUS_BAR_MESSAGE,
#                 HandlerSignals.RESET_SINGLE_ROW,
#                 HandlerSignals.RESET_ROW_RANGE,
#                 HandlerSignals.REGGATA_CONF_CHANGED,
#                 ]
# 
# Path: reggata/gui/tag_cloud_gui.py
# class TagCloudGui(ToolGui):
#     def __init__(self, parent=None, repo=None):
#         super(TagCloudGui, self).__init__(parent)
#         self.__tagCloudTextEdit = TagCloudTextEdit(parent, repo)
# 
#         self.connect(self.__tagCloudTextEdit,
#                      QtCore.SIGNAL("selectedTagsChanged"),
#                      self._emitSelectedTagsChanged)
# 
#         self.connect(self.__tagCloudTextEdit,
#                      QtCore.SIGNAL("selectedKeywordAll"),
#                      self._emitSelectedKeywordAll)
# 
# 
# 
#         layout = QtGui.QVBoxLayout()
#         layout.addWidget(self.__tagCloudTextEdit)
#         self.setLayout(layout)
# 
#     def reset(self):
#         self.__tagCloudTextEdit.reset()
# 
#     def _setRepo(self, value):
#         self.__tagCloudTextEdit.repo = value
#     def _getRepo(self):
#         return self.__tagCloudTextEdit.repo
#     repo = property(_getRepo, _setRepo)
# 
#     def _emitSelectedTagsChanged(self, tags, notTags):
#         self.emit(QtCore.SIGNAL("selectedTagsChanged"), tags, notTags)
# 
#     def _emitSelectedKeywordAll(self):
#         self.emit(QtCore.SIGNAL("selectedKeywordAll"))
# 
#     def refresh(self):
#         self.__tagCloudTextEdit.refresh()


# Path: reggata/logic/tag_cloud.py
from PyQt4 import QtCore
from reggata.logic.abstract_tool import AbstractTool
from reggata.logic.handler_signals import HandlerSignals
from reggata.gui.tag_cloud_gui import TagCloudGui

'''
Created on 08.09.2012
@author: vlkv
'''


class TagCloud(AbstractTool):

    TOOL_ID = "TagCloudTool"

    def __init__(self):
        super(TagCloud, self).__init__()

        self._repo = None

        self._gui = None


    def id(self):
        return TagCloud.TOOL_ID


    def title(self):
        return self.tr("Tag Cloud")


    def createGui(self, guiParent):

        self._gui = TagCloudGui(parent=guiParent, repo=self._repo)