Logo Search packages:      
Sourcecode: ktechlab version File versions  Download package

void KTechlab::readProperties ( KConfig *  conf  )  [protected]

This function is called when this app is restored. The KConfig object points to the session management config file that was saved with saveProperties

Definition at line 657 of file ktechlab.cpp.

References addWindow(), RecentFilesAction::loadEntries(), SymbolViewer::readProperties(), ViewContainer::restoreState(), and ProjectManager::slotOpenProject().

{
      startRestore( conf, "KateMDI" );
      
      m_recentFiles->loadEntries();
      m_recentProjects->loadEntries();
      
      //BEGIN Restore Open Views
      if ( KTLConfig::restoreDocumentsOnStartup() )
      {
            // If we have a lot of views open from last time, then opening them will take a long time.
            // So we want to enter the qt event loop to finish drawing the window et al before adding the views.
            qApp->processEvents();
      
            const QStringList groupList = conf->groupList();
            const QStringList::const_iterator groupListEnd = groupList.end();
            for ( QStringList::const_iterator it = groupList.begin(); it != groupListEnd; ++it )
            {
                  if ( (*it).startsWith("ViewContainer") )
                  {
                        ViewContainer *viewContainer = new ViewContainer( *it, this );
                  
                        conf->setGroup(*it);
                        viewContainer->restoreState( conf, *it );
                  
                        addWindow( viewContainer );
                  }
            }
      }
      //END Restore Open Views
      
      conf->setGroup("Project");
      if ( conf->readPathEntry("Open") != QString::null )
            ProjectManager::self()->slotOpenProject( KURL( conf->readPathEntry("Open") ) );
      
#ifndef NO_GPSIM
      SymbolViewer::self()->readProperties( conf );
#endif
      
      finishRestore();
      
      // Dumbass KMainWindow - can't handle my width/height correctly. Whoever thought of the "+1" hack anyway?!
      conf->setGroup("UI");
      resize( conf->readNumEntry( "Width", 800 ), conf->readNumEntry( "Height", 500 ) );
      KWin::setState( winId(), conf->readLongNumEntry( "WinState", NET::Max ) );
}


Generated by  Doxygen 1.6.0   Back to index