Пример #1
0
def connect_db():
    conn = db.Db()

    if not conn.client_login():
        raise Exception("Connection to database failed!")

    return conn
Пример #2
0
 def __init__(self, task_select=False, parent=None):
     super(self.__class__, self).__init__(parent=parent)
     self.log = clogger.CLogger().log
     self.conn = db.Db()
     self.config = config.Config()
     self.initUI(task_select)
     self.initStyle()
     self.clearTask()
Пример #3
0
 def __init__(self, parent=None):
     super(self.__class__, self).__init__(parent=parent)
     self.conn = db.Db()
     self.fman = fmanager.FManager()
     self.config = config.Config()
     self.fvers = vfile.VFile(None)
     self.initUI()
     self.initStyle()
     self.clear()
Пример #4
0
 def __init__(self, treeDisplay=False, parent=None):
     super(self.__class__, self).__init__(parent=parent)
     self.log = clogger.CLogger().log
     self.conn = db.Db()
     self.fman = fmanager.FManager()
     self.config = config.Config()
     self.__tree_display = treeDisplay
     self.initUI()
     self.initStyle()
Пример #5
0
	def __init__(self, taskid = None, to_publish = False, parent = None):
		super(self.__class__, self).__init__(parent = parent)
		self.setWindowFlags(Qt.Window)
		self.log = clogger.CLogger().log
		self.conn = db.Db()
		self.fman = fmanager.FManager()
		# Pre-styling for old apps
		self.initStyle()
		self.initUI()
		self.initStyle()
		self.initData(taskid, to_publish)
Пример #6
0
def publish():
    global WND_HANDLE, SPLASH_HANDLE
    from tentaculo.api.icerebro import db
    if db.Db().login():
        from tentaculo.gui import sendreport
        window_close(True)
        WND_HANDLE = sendreport.w_createReport(to_publish=True,
                                               parent=capp.app_window())
        WND_HANDLE.run()
        SPLASH_HANDLE.finish(WND_HANDLE)
        if capp.HOST == capp.STANDALONE:
            QApplication.exec_()
            WND_HANDLE.deleteLater()
Пример #7
0
def browser():
    global WND_HANDLE, SPLASH_HANDLE
    from tentaculo.api.icerebro import db
    if db.Db().login():
        from tentaculo.gui import taskwindow
        window_close(True)
        WND_HANDLE = taskwindow.w_taskwindow(link_mode=True,
                                             parent=capp.app_window())
        WND_HANDLE.run()
        SPLASH_HANDLE.finish(WND_HANDLE)
        if capp.HOST == capp.STANDALONE:
            QApplication.exec_()
            WND_HANDLE.deleteLater()
Пример #8
0
    def initData(self, link_mode=False, task_select=False):
        self.log = clogger.CLogger().log
        self.conn = db.Db()
        self.config = config.Config()
        self.fman = fmanager.FManager()

        self.__task = None
        self.__selected_task_id = None
        self.__selected_file_id = None
        self.__selected_file_path = None
        self.__selected_file_task = None

        self.__task_enabled = False
        self.__filter_mode = 0

        self.__link_mode = link_mode
        self.__task_select = task_select
Пример #9
0
	def init_manager(self):
		self.log = clogger.CLogger().log
		self.config = config.Config()
		self.db = db.Db()
		self.module_cache = {}
Пример #10
0
def workdir():
    from tentaculo.api.icerebro import db
    conn = db.Db()
    conn.set_work_directory()