Logo Search packages:      
Sourcecode: kcm-tablet version File versions  Download package

void ProfileManagement::deleteProfile (  ) 

Deletes the profile from the current connected device.

Should no profile be left a default profile will be created and selected.

Definition at line 165 of file profilemanagement.cpp.

References createNewProfile(), m_deviceName, and m_profileName.

Referenced by Wacom::TabletWidget::delProfile().

{
    KSharedConfig::Ptr profilesConfig = KSharedConfig::openConfig("tabletprofilesrc", KConfig::SimpleConfig);
    KConfigGroup deviceGroup = KConfigGroup(profilesConfig, m_deviceName);
    KConfigGroup profileGroup = KConfigGroup(&deviceGroup, m_profileName);

    profileGroup.deleteGroup();
    m_profileName.clear();

    profilesConfig->reparseConfiguration();

    if (deviceGroup.groupList().isEmpty()) {
        createNewProfile();
        profilesConfig->reparseConfiguration();
    }
}


Generated by  Doxygen 1.6.0   Back to index