Kooka::~Kooka() { KConfig *konf = KGlobal::config (); m_view->slCloseScanDevice(); writeDockConfig ( konf, DOCK_SIZES ); delete m_printer; }
MyFracWindow::~MyFracWindow() { _presets.savePresets(kapp->config()); writeParameters(); writeDockConfig(); generatorThread.abort(); delete[] _gradientData; }
void MainWindow::setToolViewStyle(int flag) { d->m_styleIDEAlMode = flag; // see KMultiTabBar for the first 3 bits DockContainer *tmpL=(DockContainer*) (m_leftContainer->getWidget()->qt_cast("KMDI::DockContainer")); if (tmpL) tmpL->setStyle(flag); DockContainer *tmpR=(DockContainer*) (m_rightContainer->getWidget()->qt_cast("KMDI::DockContainer")); if (tmpR) tmpR->setStyle(flag); DockContainer *tmpT=(DockContainer*) (m_topContainer->getWidget()->qt_cast("KMDI::DockContainer")); if (tmpT) tmpT->setStyle(flag); DockContainer *tmpB=(DockContainer*) (m_bottomContainer->getWidget()->qt_cast("KMDI::DockContainer")); if (tmpB) tmpB->setStyle(flag); d->m_toolviewStyle = flag; bool toolviewExists = false; QMap<QWidget*,KMDI::ToolViewAccessor*>::Iterator it; for (it = m_toolViews->begin(); it != m_toolViews->end(); ++it) { KDockWidget *dockWidget = dynamic_cast<KDockWidget*>(it.data()->wrapperWidget()); if (dockWidget) { if (flag == KMDI::IconOnly) { dockWidget->setTabPageLabel(" "); dockWidget->setPixmap(*(it.data()->wrappedWidget()->icon())); } else if (flag == KMDI::TextOnly) { dockWidget->setPixmap(); //FIXME: Does not hide the icon in the IDEAl mode. dockWidget->setTabPageLabel(it.data()->wrappedWidget()->caption()); } else if (flag == KMDI::TextAndIcon) { dockWidget->setPixmap(*(it.data()->wrappedWidget()->icon())); dockWidget->setTabPageLabel(it.data()->wrappedWidget()->caption()); } toolviewExists = true; } } if (toolviewExists) { //workaround for the above FIXME to make switching to TextOnly mode work in IDEAl as well. Be sure that this version of switch* is called. if (flag == KMDI::TextOnly) { /* MainWindow::switchToTabPageMode(); MainWindow::switchToIDEAlMode();*/ //TODO } else { writeDockConfig(); readDockConfig(); } } }