void WebContentManager::update()
{
    SettingsManager settingsManager;
    QString disc;
    QString currentAccountName(settingsManager.currentAccount(panelNum));

    settingsManager.setCurrentPanel(panelNum);

    disc = settingsManager.accountDrive(currentAccountName);
    disc += QString(":");
    disc += QDir::toNativeSeparators("/");

    pathLabel->setText(disc + settingsManager.currentFolderPath(panelNum));
    drivesComboBox->setToolTip(tr("Email: ") + currentAccountName + tr("\nName: ") + settingsManager.name(currentAccountName));

    get(settingsManager.currentFolderUrl(panelNum));

    ComboBoxItem drivesMap;
    QIcon icon(QApplication::style()->standardIcon(QStyle::SP_DriveFDIcon));
    QStringList accounts(settingsManager.accounts());

    foreach(QString account, accounts)
    {
        QString driveLetter (settingsManager.accountDrive(account));
        QMap<QString, QIcon> drivesAdditionalInfo;

        drivesAdditionalInfo[account] = icon;
        drivesMap[driveLetter] = drivesAdditionalInfo;
    }
Пример #2
0
int ContentUI::getDiscLength(EPanels panel) const
{
    SettingsManager settingsManager;
    QString disc(settingsManager.accountDisc(settingsManager.currentAccount(static_cast <int> (panel))));

    disc += QString(":");
    disc += QDir::toNativeSeparators("/");

    return disc.length();
}