示例#1
0
NewsList::NewsList() : m_curAccount(0)
{
    m_ui.setupUi(this);
    m_ui.tableGroups->setModel(&m_model);
    m_ui.tableGroups->setColumnWidth(0, 150);
    m_ui.progressBar->setMaximum(0);
    m_ui.progressBar->setMinimum(0);
    m_ui.progressBar->setValue(0);
    m_ui.progressBar->setVisible(false);
    m_ui.actionRefresh->setShortcut(QKeySequence::Refresh);
    m_ui.actionRefresh->setEnabled(false);    
    m_ui.actionFavorite->setEnabled(false);
    m_ui.actionStop->setEnabled(false);    
    m_ui.chkShowEmpty->setChecked(false);

    const auto nameWidth = m_ui.tableGroups->columnWidth((int)app::NewsList::Columns::Name);
    m_ui.tableGroups->setColumnWidth((int)app::NewsList::Columns::Name, nameWidth * 3);
    m_ui.tableGroups->setColumnWidth((int)app::NewsList::Columns::Subscribed, 32);

    QObject::connect(app::g_accounts, SIGNAL(accountsUpdated()),
        this, SLOT(accountsUpdated()));

    QObject::connect(&m_model, SIGNAL(progressUpdated(quint32, quint32, quint32)),
        this, SLOT(progressUpdated(quint32, quint32, quint32)));
    QObject::connect(&m_model, SIGNAL(loadComplete(quint32)),
        this, SLOT(loadComplete(quint32)));
    QObject::connect(&m_model, SIGNAL(makeComplete(quint32)),
        this, SLOT(makeComplete(quint32)));
}
void InboxMessageSet::init()
{
    // Add every email account as a folder within the inbox
    synchronizeAccountChildren();

    connect(model(), SIGNAL(accountsAdded(QMailAccountIdList)), this, SLOT(accountsAdded(QMailAccountIdList)));
    connect(model(), SIGNAL(accountsUpdated(QMailAccountIdList)), this, SLOT(accountsUpdated(QMailAccountIdList)));
    connect(model(), SIGNAL(accountsRemoved(QMailAccountIdList)), this, SLOT(accountsRemoved(QMailAccountIdList)));
    connect(model(), SIGNAL(accountContentsModified(QMailAccountIdList)), this, SLOT(accountContentsModified(QMailAccountIdList)));

    EmailStandardFolderMessageSet::init();
}
示例#3
0
void NewsList::loadState(app::Settings& settings)
{
    app::loadTableLayout("newslist", m_ui.tableGroups, settings);
    app::loadState("newslist", m_ui.editFilter, settings);
    app::loadState("newslist", m_ui.chkShowEmpty, settings);
    app::loadState("newslist", m_ui.chkShowText, settings);
    app::loadState("newslist", m_ui.chkMusic, settings);
    app::loadState("newslist", m_ui.chkMovies, settings);
    app::loadState("newslist", m_ui.chkTV, settings);
    app::loadState("newslist", m_ui.chkGames, settings);
    app::loadState("newslist", m_ui.chkApps, settings);
    app::loadState("newslist", m_ui.chkAdult, settings);
    app::loadState("newslist", m_ui.chkImages, settings);    
    app::loadState("newslist", m_ui.chkOther, settings);

    accountsUpdated();
}