Ejemplo n.º 1
0
    def __init__(self, weboob, parent=None):
        QWidget.__init__(self, parent)
        self.ui = Ui_Contacts()
        self.ui.setupUi(self)

        self.weboob = weboob
        self.contact = None
        self.ui.contactList.setItemDelegate(HTMLDelegate())

        self.url_process = None
        self.photo_processes = {}

        self.ui.groupBox.addItem('All',
                                 MetaGroup(self.weboob, 'all', self.tr('All')))
        self.ui.groupBox.addItem(
            'Online', MetaGroup(self.weboob, 'online', self.tr('Online')))
        self.ui.groupBox.addItem(
            'Offline', MetaGroup(self.weboob, 'offline', self.tr('Offline')))
        self.ui.groupBox.setCurrentIndex(1)

        self.connect(self.ui.groupBox, SIGNAL('currentIndexChanged(int)'),
                     self.groupChanged)
        self.connect(self.ui.contactList,
                     SIGNAL('itemClicked(QListWidgetItem*)'),
                     self.contactChanged)
        self.connect(self.ui.refreshButton, SIGNAL('clicked()'),
                     self.refreshContactList)
        self.connect(self.ui.urlButton, SIGNAL('clicked()'), self.urlClicked)
Ejemplo n.º 2
0
    def __init__(self, weboob, parent=None):
        QDialog.__init__(self, parent)
        self.ui = Ui_QueryDialog()
        self.ui.setupUi(self)

        self.weboob = weboob
        self.ui.resultsList.setItemDelegate(HTMLDelegate())
        self.ui.citiesList.setItemDelegate(HTMLDelegate())

        self.search_process = None

        self.connect(self.ui.cityEdit, SIGNAL('returnPressed()'),
                     self.searchCity)
        self.connect(self.ui.resultsList,
                     SIGNAL('itemDoubleClicked(QListWidgetItem*)'),
                     self.insertCity)
        self.connect(self.ui.citiesList,
                     SIGNAL('itemDoubleClicked(QListWidgetItem*)'),
                     self.removeCity)
        self.connect(self.ui.buttonBox, SIGNAL('accepted()'), self.okButton)

        if hasattr(self.ui.cityEdit, "setPlaceholderText"):
            self.ui.cityEdit.setPlaceholderText("Press enter to search city")
Ejemplo n.º 3
0
    def __init__(self, config, storage, weboob, app, parent=None):
        QtMainWindow.__init__(self, parent)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)

        self.config = config
        self.storage = storage
        self.weboob = weboob
        self.app = app
        self.process = None
        self.housing = None
        self.displayed_photo_idx = 0
        self.process_photo = {}
        self.process_bookmarks = {}

        self.ui.housingsList.setItemDelegate(HTMLDelegate())
        self.ui.housingFrame.hide()

        self.connect(self.ui.actionBackends, SIGNAL("triggered()"),
                     self.backendsConfig)
        self.connect(self.ui.queriesList, SIGNAL('currentIndexChanged(int)'),
                     self.queryChanged)
        self.connect(self.ui.addQueryButton, SIGNAL('clicked()'),
                     self.addQuery)
        self.connect(self.ui.editQueryButton, SIGNAL('clicked()'),
                     self.editQuery)
        self.connect(self.ui.removeQueryButton, SIGNAL('clicked()'),
                     self.removeQuery)
        self.connect(self.ui.bookmarksButton, SIGNAL('clicked()'),
                     self.displayBookmarks)
        self.connect(
            self.ui.housingsList,
            SIGNAL('currentItemChanged(QListWidgetItem*, QListWidgetItem*)'),
            self.housingSelected)
        self.connect(self.ui.previousButton, SIGNAL('clicked()'),
                     self.previousClicked)
        self.connect(self.ui.nextButton, SIGNAL('clicked()'), self.nextClicked)
        self.connect(self.ui.bookmark, SIGNAL('stateChanged(int)'),
                     self.bookmarkChanged)

        self.reloadQueriesList()
        self.refreshHousingsList()

        if self.weboob.count_backends() == 0:
            self.backendsConfig()

        if len(self.config.get('queries')) == 0:
            self.addQuery()
Ejemplo n.º 4
0
    def __init__(self, weboob, parent=None):
        QWidget.__init__(self, parent)
        self.ui = Ui_Events()
        self.ui.setupUi(self)

        self.weboob = weboob
        self.photo_processes = {}
        self.event_filter = None

        self.connect(self.ui.eventsList,
                     SIGNAL('itemDoubleClicked(QTreeWidgetItem*, int)'),
                     self.eventDoubleClicked)
        self.connect(self.ui.typeBox, SIGNAL('currentIndexChanged(int)'),
                     self.typeChanged)
        self.connect(self.ui.refreshButton, SIGNAL('clicked()'),
                     self.refreshEventsList)

        self.ui.eventsList.setItemDelegate(HTMLDelegate())
        self.ui.eventsList.sortByColumn(1, Qt.DescendingOrder)