void KMovingConfig::load(void) { QString key; KConfigGroup cg(config, "Windows"); //KS 10Jan2003 - Geometry Tip during window move/resize bool showGeomTip = cg.readEntry(KWIN_GEOMETRY, false); setGeometryTip(showGeomTip); setMoveResizeMaximized(cg.readEntry(KWIN_MOVE_RESIZE_MAXIMIZED, false)); int v; v = cg.readEntry(KWM_BRDR_SNAP_ZONE, KWM_BRDR_SNAP_ZONE_DEFAULT); if (v > MAX_BRDR_SNAP) setBorderSnapZone(MAX_BRDR_SNAP); else if (v < 0) setBorderSnapZone(0); else setBorderSnapZone(v); v = cg.readEntry(KWM_WNDW_SNAP_ZONE, KWM_WNDW_SNAP_ZONE_DEFAULT); if (v > MAX_WNDW_SNAP) setWindowSnapZone(MAX_WNDW_SNAP); else if (v < 0) setWindowSnapZone(0); else setWindowSnapZone(v); v = cg.readEntry(KWM_CNTR_SNAP_ZONE, KWM_CNTR_SNAP_ZONE_DEFAULT); if (v > MAX_CNTR_SNAP) setCenterSnapZone(MAX_CNTR_SNAP); else if (v < 0) setCenterSnapZone(0); else setCenterSnapZone(v); OverlapSnap->setChecked(cg.readEntry("SnapOnlyWhenOverlapping", false)); emit KCModule::changed(false); }
void KMovingConfig::defaults() { setGeometryTip(false); setMoveResizeMaximized(false); //copied from kcontrol/konq/kwindesktop, aleXXX setWindowSnapZone(KWM_WNDW_SNAP_ZONE_DEFAULT); setBorderSnapZone(KWM_BRDR_SNAP_ZONE_DEFAULT); setCenterSnapZone(KWM_CNTR_SNAP_ZONE_DEFAULT); OverlapSnap->setChecked(false); emit KCModule::changed(true); }
void KMovingConfig::load( void ) { QString key; KConfigGroup cg(config, "Windows"); key = cg.readEntry(KWIN_MOVE, "Opaque"); if( key == "Transparent") setMove(TRANSPARENT); else if( key == "Opaque") setMove(OPAQUE); // DF: please keep the default consistent with kwin (options.cpp line 145) key = cg.readEntry(KWIN_RESIZE_OPAQUE, "Opaque"); if( key == "Opaque") setResizeOpaque(RESIZE_OPAQUE); else if ( key == "Transparent") setResizeOpaque(RESIZE_TRANSPARENT); //KS 10Jan2003 - Geometry Tip during window move/resize bool showGeomTip = cg.readEntry(KWIN_GEOMETRY, false); setGeometryTip( showGeomTip ); setMoveResizeMaximized(cg.readEntry(KWIN_MOVE_RESIZE_MAXIMIZED, false)); int v; v = cg.readEntry(KWM_BRDR_SNAP_ZONE, KWM_BRDR_SNAP_ZONE_DEFAULT); if (v > MAX_BRDR_SNAP) setBorderSnapZone(MAX_BRDR_SNAP); else if (v < 0) setBorderSnapZone (0); else setBorderSnapZone(v); v = cg.readEntry(KWM_WNDW_SNAP_ZONE, KWM_WNDW_SNAP_ZONE_DEFAULT); if (v > MAX_WNDW_SNAP) setWindowSnapZone(MAX_WNDW_SNAP); else if (v < 0) setWindowSnapZone (0); else setWindowSnapZone(v); v = cg.readEntry(KWM_CNTR_SNAP_ZONE, KWM_CNTR_SNAP_ZONE_DEFAULT); if (v > MAX_CNTR_SNAP) setCenterSnapZone(MAX_CNTR_SNAP); else if (v < 0) setCenterSnapZone (0); else setCenterSnapZone(v); OverlapSnap->setChecked(cg.readEntry("SnapOnlyWhenOverlapping", false)); emit KCModule::changed(false); }