Exemplo n.º 1
0
    def __init__(self):
        super(StatusBar, self).__init__()

        Pireal.load_service("status", self)

        self.connect(self, SIGNAL("messageChanged(QString)"),
                     self.__message_end)
Exemplo n.º 2
0
    def __init__(self, parent=None):
        super(Notification, self).__init__(parent)
        box = QVBoxLayout(self)
        box.setContentsMargins(50, 0, 0, 0)
        self.notificator = QLabel("")
        box.addWidget(self.notificator)

        # Timer
        self.timer = QTimer(self)
        self.timer.timeout.connect(self.clear)

        # Install service
        Pireal.load_service("notification", self)
Exemplo n.º 3
0
 def new_query(self):
     from src.gui.query_editor import query_widget
     widget = query_widget.QueryWidget()
     pireal = Pireal.get_service("pireal")
     # Load the instance
     Pireal.load_service("query-editor", widget)
     # MdiArea
     mdi = Pireal.get_service("mdi")
     widget.setMinimumSize(mdi.width(), mdi.minimumSizeHint().height())
     mdi.addSubWindow(widget)
     # Enable querie's QAction
     pireal.enable_disable_query_actions()
     widget.show()
Exemplo n.º 4
0
    def __init__(self):
        super(LateralWidget, self).__init__()
        self._list_widget = QListWidget()
        self.setWidget(self._list_widget)

        Pireal.load_service("lateral", self)

        self._list_widget.setContextMenuPolicy(Qt.CustomContextMenu)

        self.connect(self._list_widget, SIGNAL("currentRowChanged(int)"),
                     self._change_item)
        self.connect(self._list_widget,
                     SIGNAL("customContextMenuRequested(const QPoint)"),
                     self.__show_context_menu)
Exemplo n.º 5
0
    def __init__(self, orientation=Qt.Vertical):
        super(Container, self).__init__(orientation)
        self._data_bases = []
        self.__filename = ""
        vbox = QVBoxLayout(self)
        vbox.setContentsMargins(0, 0, 0, 0)
        self.__created = False
        # Stacked
        self.stacked = QStackedWidget()
        vbox.addWidget(self.stacked)

        # Table
        self.table_widget = table_widget.TableWidget()

        Pireal.load_service("container", self)
Exemplo n.º 6
0
    def __init__(self, orientation=Qt.Vertical):
        super(Container, self).__init__(orientation)
        self.__last_open_folder = None
        self.__filename = ""
        self.__created = False
        self.__modified = False
        vbox = QVBoxLayout(self)
        vbox.setContentsMargins(0, 0, 0, 0)
        # Stacked
        self.stacked = QStackedWidget()
        vbox.addWidget(self.stacked)

        # Table
        self.table_widget = table_widget.TableWidget()

        Pireal.load_service("container", self)
Exemplo n.º 7
0
    def __init__(self):
        QWidget.__init__(self)
        box = QVBoxLayout(self)
        box.setContentsMargins(0, 0, 0, 0)
        box.setSpacing(0)

        self.stacked = QStackedWidget()
        box.addWidget(self.stacked)

        self.created = False
        self.__last_open_folder = None
        self.__recent_dbs = []
        if PSetting.RECENT_DBS:
            self.__recent_dbs = PSetting.RECENT_DBS

        Pireal.load_service("central", self)
Exemplo n.º 8
0
    def __init__(self):
        QWidget.__init__(self)
        box = QVBoxLayout(self)
        box.setContentsMargins(0, 0, 0, 0)
        box.setSpacing(0)

        self.stacked = QStackedWidget()
        box.addWidget(self.stacked)

        self.created = False
        # Acá cacheo la última carpeta accedida
        self.__last_open_folder = None
        if CONFIG.get("lastOpenFolder") is not None:
            self.__last_open_folder = CONFIG.get("lastOpenFolder")
        self.__recent_dbs = []
        if CONFIG.get("recentFiles"):
            self.__recent_dbs = CONFIG.get("recentFiles")

        Pireal.load_service("central", self)

        esc_short = QShortcut(QKeySequence(Qt.Key_Escape), self)
        esc_short.activated.connect(self._hide_search)
Exemplo n.º 9
0
    def __init__(self, parent=None):
        super().__init__(parent)
        self.setOrientation(Qt.Vertical)
        # Lista de relaciones de la base de datos
        self._relations_list = RelationListQML()
        self._relations_list.set_title(self.tr("Relaciones"))
        self.addWidget(self._relations_list)
        # Lista de relaciones del resultado de consultas
        self._results_list = RelationListQML()
        self._results_list.set_title(self.tr("Resultados"))
        self.addWidget(self._results_list)

        Pireal.load_service("lateral_widget", self)

        self._relations_list.itemClicked.connect(
            lambda i: self.relationClicked.emit(i))
        #         self._relations_list.row()))
        # self._relations_list.itemSelectionChanged.connect(
        #     lambda: self.relationSelectionChanged.emit(
        #         self._relations_list.row()))
        self._results_list.itemClicked.connect(
            lambda i: self.resultClicked.emit(i))
Exemplo n.º 10
0
    def __init__(self, parent=None):
        super().__init__(parent)
        self.setOrientation(Qt.Vertical)
        # Lista de relaciones de la base de datos
        self._relations_list = RelationListQML()
        self._relations_list.set_title(self.tr("Relaciones"))
        self.addWidget(self._relations_list)
        # Lista de relaciones del resultado de consultas
        self._results_list = RelationListQML()
        self._results_list.set_title(self.tr("Resultados"))
        self.addWidget(self._results_list)

        Pireal.load_service("lateral_widget", self)

        self._relations_list.itemClicked.connect(
            lambda i: self.relationClicked.emit(i))
        #         self._relations_list.row()))
        # self._relations_list.itemSelectionChanged.connect(
        #     lambda: self.relationSelectionChanged.emit(
        #         self._relations_list.row()))
        self._results_list.itemClicked.connect(
            lambda i: self.resultClicked.emit(i))
Exemplo n.º 11
0
    def __init__(self):
        super(QueryWidget, self).__init__()
        self.__nrelation = 1
        self.__nquery = 1
        self._cursor_position = "Lin: %s, Col: %s"
        self._cursor_position_widget = QLabel(self._cursor_position % (0, 0))

        box = QVBoxLayout(self)
        box.setContentsMargins(0, 0, 5, 0)
        # Tabs
        self.tab = QTabWidget()
        self.tab.setCornerWidget(self._cursor_position_widget)
        self.tab.setTabsClosable(True)
        self.tab.setMovable(True)
        box.addWidget(self.tab)

        Pireal.load_service("query_widget", self)

        # Connections
        self.connect(self.tab, SIGNAL("tabCloseRequested(int)"),
                     self.removeTab)
        self.connect(self.tab, SIGNAL("tabCloseRequested(int)"),
                     self._check_count)
Exemplo n.º 12
0
    def __init__(self):
        super(StatusBar, self).__init__()

        Pireal.load_service("status", self)

        self.messageChanged['QString'].connect(self.__message_end)
Exemplo n.º 13
0
 def __init__(self):
     super(Actions, self).__init__()
     Pireal.load_service("actions", self)
Exemplo n.º 14
0
    def __init__(self):
        super(StatusBar, self).__init__()

        Pireal.load_service("status", self)

        self.messageChanged['QString'].connect(self.__message_end)