コード例 #1
0
//
// private
//
void SourceDirTreeNode::init(bool showRelativePath)
{
    refreshIcon();

    // create and set text for text column
    QString text = m_sourceDir->dir()->absPath();
    if (showRelativePath) {
        // we are a subdir of a sourcedir --> display relative path only
        text = m_sourceDir->dir()->dirName();
    }
    text.prepend(" ");

    if (!m_sourceDir->found()) {
        text.append(" (");
        text.append(i18n("not found"));
        text.append(")");
    }
    this->setText(SourceDirTree::COLUMN_TEXT, text);

    // create and set text for selected column
    QString selected = QString("%1 / %2");
    selected = selected.arg(m_selectedFilesCount);
    selected = selected.arg(m_sourceDir->files()->count());
    this->setText(SourceDirTree::COLUMN_SELECTED, selected);
}
コード例 #2
0
ファイル: tray.cpp プロジェクト: palinek/nm-tray
void TrayPrivate::updateIcon()
{
    if (mIconCurrent == mIcon2Show)
        return;

    mIconCurrent = mIcon2Show;
    refreshIcon();
}
コード例 #3
0
ファイル: XImlib2Image.cpp プロジェクト: fixxxer/idesk
void XImlib2Image::draw()
{
    refreshIcon();
}
コード例 #4
0
ファイル: XImlib2Image.cpp プロジェクト: fixxxer/idesk
void XImlib2Image::mouseOffEffect()
{
    glowing = false;
    glowChange = true;
    refreshIcon();
}
コード例 #5
0
void ItemViewHoverButton::initIcon()
{
    // virtual, cannot call from constructor
    refreshIcon();
    resize(sizeHint());
}