Exemplo n.º 1
0
void StackFolder::folderChanged(const KUrl& url)
{

    if (m_graphicsWidget) {

        m_folderChanging = true;
        //kDebug() << "StackFolder::folderChanged():  m_folderChanging = " <<  m_folderChanging << "m_firstChangings = " << m_firstChangings;

        if (isPopupShowing() && m_firstChangings > 1) {
            m_needShow = true;
            hidePopup();
        }

        if (m_downloadUrl.isParentOf(url)) {
            m_model->sort(DirModel::ModifiedTime);
        } 
        else {
            m_model->sort(DirModel::Name);
    }
        
        const int count = m_dirModel->dirLister()->itemsForDir(url).count();
        QSize size = sizeToFitIcons(count);

        m_graphicsWidget->resize(size);
        m_graphicsWidget->setMinimumSize(size);
        m_graphicsWidget->setMaximumSize(size);

        if (m_firstChangings == 1) {
            m_firstChangings = 2;
    }
        m_folderChanging = false;
        //kDebug() << "StackFolder::folderChanged() <<  m_folderChanging = " <<  m_folderChanging << "m_firstChangings = " << m_firstChangings;

    }
    updateIconWidget();
}
void MMessageBoxViewPrivate::prepareLayout()
{
    updateIconWidget();
    updateTitleWidget();
    updateTextWidget();
}