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

k4dirstat::k4dirstat (  )

Default Constructor

Definition at line 70 of file k4dirstat.cpp.

References contextMenu(), createTreemapViewDelayed(), deleteTreemapView(), initCleanups(), initStatusBar(), readConfig(), readMainWinConfig(), saveConfig(), saveMainWinConfig(), selectionChanged(), statusMsg(), and updateActions().

    : KXmlGuiWindow(),
     // m_view(new k4dirstatView(this)),
      m_printer(0)
{
    // accept dnd
    setAcceptDrops(true);

    // Simple inits

    _activityTracker    = 0;  // Might or might not be needed


    // Those will be created delayed, only when needed

    _settingsDialog     = 0;
    _feedbackDialog     = 0;
    _treemapView  = 0;
    _pacMan       = 0;
    _pacManDelimiter    = 0;


    // Set up internal (mainWin -> mainWin) connections

    connect( this,      SIGNAL( readConfig       ( void ) ),
             this,      SLOT  ( readMainWinConfig( void ) ) );

    connect( this,      SIGNAL( saveConfig       ( void ) ),
             this,      SLOT  ( saveMainWinConfig( void ) ) );


    // Create main window

    _splitter = new QSplitter( Qt::Vertical, this );
    setCentralWidget( _splitter );

    _treeView = new KDirTreeView( _splitter );

    connect( _treeView, SIGNAL( progressInfo( const QString & ) ),
             this,      SLOT  ( statusMsg   ( const QString & ) ) );

    connect( _treeView, SIGNAL( selectionChanged( KFileInfo * ) ),
             this,      SLOT  ( selectionChanged( KFileInfo * ) ) );

    connect( _treeView, SIGNAL( contextMenu( KDirTreeViewItem *, const QPoint & ) ),
             this,      SLOT  ( contextMenu( KDirTreeViewItem *, const QPoint & ) ) );

    connect( this,      SIGNAL( readConfig()          ), _treeView,     SLOT  ( readConfig() ) );
    connect( this,      SIGNAL( saveConfig()          ), _treeView,     SLOT  ( saveConfig() ) );

    connect( _treeView, SIGNAL( finished()            ), this, SLOT( createTreemapViewDelayed() ) );
    connect( _treeView, SIGNAL( aborted()       ), this, SLOT( createTreemapViewDelayed() ) );
    connect( _treeView, SIGNAL( startingReading()     ), this, SLOT( deleteTreemapView() ) );

    connect( _treeView, SIGNAL( startingReading()     ), this, SLOT( updateActions() ) );
    connect( _treeView, SIGNAL( finished()            ), this, SLOT( updateActions() ) );
    connect( _treeView, SIGNAL( aborted()             ), this, SLOT( updateActions() ) );

    // tell the KXmlGuiWindow that this is indeed the main widget
    //setCentralWidget(m_view);

    // set up the elements of the status bar
    initStatusBar();

    // then, setup our actions
    setupActions();

    // setup the cleanup actions
    initCleanups();

    // add a status bar
    statusBar()->show();

    // a call to KXmlGuiWindow::setupGUI() populates the GUI
    // with actions, using KXMLGUI.
    // It also applies the saved mainwindow settings, if any, and ask the
    // mainwindow to automatically save settings if changed: window size,
    // toolbar position, icon size, etc.
    setupGUI();
    \
    _treeViewContextMenu = static_cast<QMenu*> (factory()->container( "treeViewContextMenu", this ));
    _treemapContextMenu  = static_cast<QMenu*> (factory()->container( "treemapContextMenu",  this ));

    readMainWinConfig();

    // Disable certain actions at startup

    _editCopy->setEnabled( false );
    _reportMailToOwner->setEnabled( false );
    _fileRefreshAll->setEnabled( false );
    _fileRefreshSelected->setEnabled( false );
    updateActions();
}

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index