|
|
|
@ -73,11 +73,11 @@ KDirStatApp::KDirStatApp( TQWidget* , const char* name )
|
|
|
|
|
|
|
|
|
|
// Set up internal (mainWin -> mainWin) connections
|
|
|
|
|
|
|
|
|
|
connect( this, TQT_SIGNAL( readConfig ( void ) ),
|
|
|
|
|
this, TQT_SLOT ( readMainWinConfig( void ) ) );
|
|
|
|
|
connect( this, TQ_SIGNAL( readConfig ( void ) ),
|
|
|
|
|
this, TQ_SLOT ( readMainWinConfig( void ) ) );
|
|
|
|
|
|
|
|
|
|
connect( this, TQT_SIGNAL( saveConfig ( void ) ),
|
|
|
|
|
this, TQT_SLOT ( saveMainWinConfig( void ) ) );
|
|
|
|
|
connect( this, TQ_SIGNAL( saveConfig ( void ) ),
|
|
|
|
|
this, TQ_SLOT ( saveMainWinConfig( void ) ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Create main window
|
|
|
|
@ -87,25 +87,25 @@ KDirStatApp::KDirStatApp( TQWidget* , const char* name )
|
|
|
|
|
|
|
|
|
|
_treeView = new KDirTreeView( _splitter );
|
|
|
|
|
|
|
|
|
|
connect( _treeView, TQT_SIGNAL( progressInfo( const TQString & ) ),
|
|
|
|
|
this, TQT_SLOT ( statusMsg ( const TQString & ) ) );
|
|
|
|
|
connect( _treeView, TQ_SIGNAL( progressInfo( const TQString & ) ),
|
|
|
|
|
this, TQ_SLOT ( statusMsg ( const TQString & ) ) );
|
|
|
|
|
|
|
|
|
|
connect( _treeView, TQT_SIGNAL( selectionChanged( KFileInfo * ) ),
|
|
|
|
|
this, TQT_SLOT ( selectionChanged( KFileInfo * ) ) );
|
|
|
|
|
connect( _treeView, TQ_SIGNAL( selectionChanged( KFileInfo * ) ),
|
|
|
|
|
this, TQ_SLOT ( selectionChanged( KFileInfo * ) ) );
|
|
|
|
|
|
|
|
|
|
connect( _treeView, TQT_SIGNAL( contextMenu( KDirTreeViewItem *, const TQPoint & ) ),
|
|
|
|
|
this, TQT_SLOT ( contextMenu( KDirTreeViewItem *, const TQPoint & ) ) );
|
|
|
|
|
connect( _treeView, TQ_SIGNAL( contextMenu( KDirTreeViewItem *, const TQPoint & ) ),
|
|
|
|
|
this, TQ_SLOT ( contextMenu( KDirTreeViewItem *, const TQPoint & ) ) );
|
|
|
|
|
|
|
|
|
|
connect( this, TQT_SIGNAL( readConfig() ), _treeView, TQT_SLOT ( readConfig() ) );
|
|
|
|
|
connect( this, TQT_SIGNAL( saveConfig() ), _treeView, TQT_SLOT ( saveConfig() ) );
|
|
|
|
|
connect( this, TQ_SIGNAL( readConfig() ), _treeView, TQ_SLOT ( readConfig() ) );
|
|
|
|
|
connect( this, TQ_SIGNAL( saveConfig() ), _treeView, TQ_SLOT ( saveConfig() ) );
|
|
|
|
|
|
|
|
|
|
connect( _treeView, TQT_SIGNAL( finished() ), this, TQT_SLOT( createTreemapView() ) );
|
|
|
|
|
connect( _treeView, TQT_SIGNAL( aborted() ), this, TQT_SLOT( createTreemapView() ) );
|
|
|
|
|
connect( _treeView, TQT_SIGNAL( startingReading() ), this, TQT_SLOT( deleteTreemapView() ) );
|
|
|
|
|
connect( _treeView, TQ_SIGNAL( finished() ), this, TQ_SLOT( createTreemapView() ) );
|
|
|
|
|
connect( _treeView, TQ_SIGNAL( aborted() ), this, TQ_SLOT( createTreemapView() ) );
|
|
|
|
|
connect( _treeView, TQ_SIGNAL( startingReading() ), this, TQ_SLOT( deleteTreemapView() ) );
|
|
|
|
|
|
|
|
|
|
connect( _treeView, TQT_SIGNAL( startingReading() ), this, TQT_SLOT( updateActions() ) );
|
|
|
|
|
connect( _treeView, TQT_SIGNAL( finished() ), this, TQT_SLOT( updateActions() ) );
|
|
|
|
|
connect( _treeView, TQT_SIGNAL( aborted() ), this, TQT_SLOT( updateActions() ) );
|
|
|
|
|
connect( _treeView, TQ_SIGNAL( startingReading() ), this, TQ_SLOT( updateActions() ) );
|
|
|
|
|
connect( _treeView, TQ_SIGNAL( finished() ), this, TQ_SLOT( updateActions() ) );
|
|
|
|
|
connect( _treeView, TQ_SIGNAL( aborted() ), this, TQ_SLOT( updateActions() ) );
|
|
|
|
|
|
|
|
|
|
// Call inits to invoke all other construction parts
|
|
|
|
|
|
|
|
|
@ -141,72 +141,72 @@ KDirStatApp::~KDirStatApp()
|
|
|
|
|
void
|
|
|
|
|
KDirStatApp::initActions()
|
|
|
|
|
{
|
|
|
|
|
_fileAskOpenDir = KStdAction::open ( this, TQT_SLOT( fileAskOpenDir() ), actionCollection() );
|
|
|
|
|
_fileAskOpenDir = KStdAction::open ( this, TQ_SLOT( fileAskOpenDir() ), actionCollection() );
|
|
|
|
|
|
|
|
|
|
_fileAskOpenUrl = new TDEAction( i18n( "Open &URL..." ), "konqueror", 0,
|
|
|
|
|
this, TQT_SLOT( fileAskOpenUrl() ),
|
|
|
|
|
this, TQ_SLOT( fileAskOpenUrl() ),
|
|
|
|
|
actionCollection(), "file_open_url" );
|
|
|
|
|
|
|
|
|
|
_fileOpenRecent = KStdAction::openRecent ( this, TQT_SLOT( fileOpenRecent( const KURL& ) ), actionCollection() );
|
|
|
|
|
_fileCloseDir = KStdAction::close ( this, TQT_SLOT( fileCloseDir() ), actionCollection() );
|
|
|
|
|
_fileOpenRecent = KStdAction::openRecent ( this, TQ_SLOT( fileOpenRecent( const KURL& ) ), actionCollection() );
|
|
|
|
|
_fileCloseDir = KStdAction::close ( this, TQ_SLOT( fileCloseDir() ), actionCollection() );
|
|
|
|
|
|
|
|
|
|
_fileRefreshAll = new TDEAction( i18n( "Refresh &All" ), "reload", 0,
|
|
|
|
|
this, TQT_SLOT( refreshAll() ),
|
|
|
|
|
this, TQ_SLOT( refreshAll() ),
|
|
|
|
|
actionCollection(), "file_refresh_all" );
|
|
|
|
|
|
|
|
|
|
_fileRefreshSelected = new TDEAction( i18n( "Refresh &Selected" ), 0,
|
|
|
|
|
this, TQT_SLOT( refreshSelected() ),
|
|
|
|
|
this, TQ_SLOT( refreshSelected() ),
|
|
|
|
|
actionCollection(), "file_refresh_selected" );
|
|
|
|
|
|
|
|
|
|
_fileContinueReadingAtMountPoint = new TDEAction( i18n( "Continue Reading at &Mount Point" ), "drive-harddisk-mounted", 0,
|
|
|
|
|
this, TQT_SLOT( refreshSelected() ), actionCollection(),
|
|
|
|
|
this, TQ_SLOT( refreshSelected() ), actionCollection(),
|
|
|
|
|
"file_continue_reading_at_mount_point" );
|
|
|
|
|
|
|
|
|
|
_fileStopReading = new TDEAction( i18n( "Stop Rea&ding" ), "process-stop", 0,
|
|
|
|
|
this, TQT_SLOT( stopReading() ), actionCollection(),
|
|
|
|
|
this, TQ_SLOT( stopReading() ), actionCollection(),
|
|
|
|
|
"file_stop_reading" );
|
|
|
|
|
|
|
|
|
|
_fileQuit = KStdAction::quit ( kapp, TQT_SLOT( quit() ), actionCollection() );
|
|
|
|
|
_editCopy = KStdAction::copy ( this, TQT_SLOT( editCopy() ), actionCollection() );
|
|
|
|
|
_showToolBar = KStdAction::showToolbar ( this, TQT_SLOT( toggleToolBar() ), actionCollection() );
|
|
|
|
|
_showStatusBar = KStdAction::showStatusbar ( this, TQT_SLOT( toggleStatusBar() ), actionCollection() );
|
|
|
|
|
_fileQuit = KStdAction::quit ( kapp, TQ_SLOT( quit() ), actionCollection() );
|
|
|
|
|
_editCopy = KStdAction::copy ( this, TQ_SLOT( editCopy() ), actionCollection() );
|
|
|
|
|
_showToolBar = KStdAction::showToolbar ( this, TQ_SLOT( toggleToolBar() ), actionCollection() );
|
|
|
|
|
_showStatusBar = KStdAction::showStatusbar ( this, TQ_SLOT( toggleStatusBar() ), actionCollection() );
|
|
|
|
|
|
|
|
|
|
_cleanupOpenWith = new TDEAction( i18n( "Open With" ), 0,
|
|
|
|
|
this, TQT_SLOT( cleanupOpenWith() ),
|
|
|
|
|
this, TQ_SLOT( cleanupOpenWith() ),
|
|
|
|
|
actionCollection(), "cleanup_open_with" );
|
|
|
|
|
|
|
|
|
|
_treemapZoomIn = new TDEAction( i18n( "Zoom in" ), "zoom-in", Key_Plus,
|
|
|
|
|
this, TQT_SLOT( treemapZoomIn() ),
|
|
|
|
|
this, TQ_SLOT( treemapZoomIn() ),
|
|
|
|
|
actionCollection(), "treemap_zoom_in" );
|
|
|
|
|
|
|
|
|
|
_treemapZoomOut = new TDEAction( i18n( "Zoom out" ), "zoom-out", Key_Minus,
|
|
|
|
|
this, TQT_SLOT( treemapZoomOut() ),
|
|
|
|
|
this, TQ_SLOT( treemapZoomOut() ),
|
|
|
|
|
actionCollection(), "treemap_zoom_out" );
|
|
|
|
|
|
|
|
|
|
_treemapSelectParent= new TDEAction( i18n( "Select Parent" ), "go-up", Key_Asterisk,
|
|
|
|
|
this, TQT_SLOT( treemapSelectParent() ),
|
|
|
|
|
this, TQ_SLOT( treemapSelectParent() ),
|
|
|
|
|
actionCollection(), "treemap_select_parent" );
|
|
|
|
|
|
|
|
|
|
_treemapRebuild = new TDEAction( i18n( "Rebuild Treemap" ), 0,
|
|
|
|
|
this, TQT_SLOT( treemapRebuild() ),
|
|
|
|
|
this, TQ_SLOT( treemapRebuild() ),
|
|
|
|
|
actionCollection(), "treemap_rebuild" );
|
|
|
|
|
|
|
|
|
|
_showTreemapView = new TDEToggleAction( i18n( "Show Treemap" ), Key_F9,
|
|
|
|
|
this, TQT_SLOT( toggleTreemapView() ),
|
|
|
|
|
this, TQ_SLOT( toggleTreemapView() ),
|
|
|
|
|
actionCollection(), "options_show_treemap" );
|
|
|
|
|
|
|
|
|
|
new TDEAction( i18n( "Help about Treemaps" ), "help", 0,
|
|
|
|
|
this, TQT_SLOT( treemapHelp() ),
|
|
|
|
|
this, TQ_SLOT( treemapHelp() ),
|
|
|
|
|
actionCollection(), "treemap_help" );
|
|
|
|
|
|
|
|
|
|
TDEAction * pref = KStdAction::preferences( this, TQT_SLOT( preferences() ), actionCollection() );
|
|
|
|
|
TDEAction * pref = KStdAction::preferences( this, TQ_SLOT( preferences() ), actionCollection() );
|
|
|
|
|
|
|
|
|
|
_reportMailToOwner = new TDEAction( i18n( "Send &Mail to Owner" ), "mail_generic", 0,
|
|
|
|
|
_treeView, TQT_SLOT( sendMailToOwner() ),
|
|
|
|
|
_treeView, TQ_SLOT( sendMailToOwner() ),
|
|
|
|
|
actionCollection(), "report_mail_to_owner" );
|
|
|
|
|
|
|
|
|
|
_helpSendFeedbackMail = new TDEAction( i18n( "Send &Feedback Mail..." ), 0,
|
|
|
|
|
this, TQT_SLOT( sendFeedbackMail() ),
|
|
|
|
|
this, TQ_SLOT( sendFeedbackMail() ),
|
|
|
|
|
actionCollection(), "help_send_feedback_mail" );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -242,14 +242,14 @@ KDirStatApp::initCleanups()
|
|
|
|
|
_cleanupCollection->addUserCleanups( USER_CLEANUPS );
|
|
|
|
|
_cleanupCollection->slotReadConfig();
|
|
|
|
|
|
|
|
|
|
connect( _treeView, TQT_SIGNAL( selectionChanged( KFileInfo * ) ),
|
|
|
|
|
_cleanupCollection, TQT_SIGNAL( selectionChanged( KFileInfo * ) ) );
|
|
|
|
|
connect( _treeView, TQ_SIGNAL( selectionChanged( KFileInfo * ) ),
|
|
|
|
|
_cleanupCollection, TQ_SIGNAL( selectionChanged( KFileInfo * ) ) );
|
|
|
|
|
|
|
|
|
|
connect( this, TQT_SIGNAL( readConfig( void ) ),
|
|
|
|
|
_cleanupCollection, TQT_SIGNAL( readConfig( void ) ) );
|
|
|
|
|
connect( this, TQ_SIGNAL( readConfig( void ) ),
|
|
|
|
|
_cleanupCollection, TQ_SIGNAL( readConfig( void ) ) );
|
|
|
|
|
|
|
|
|
|
connect( this, TQT_SIGNAL( saveConfig( void ) ),
|
|
|
|
|
_cleanupCollection, TQT_SIGNAL( saveConfig( void ) ) );
|
|
|
|
|
connect( this, TQ_SIGNAL( saveConfig( void ) ),
|
|
|
|
|
_cleanupCollection, TQ_SIGNAL( saveConfig( void ) ) );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -279,9 +279,9 @@ KDirStatApp::initPacMan( bool enablePacMan )
|
|
|
|
|
_pacManDelimiter = new TQWidget( toolBar() );
|
|
|
|
|
toolBar()->insertWidget( ++id, 1, _pacManDelimiter );
|
|
|
|
|
|
|
|
|
|
connect( _treeView, TQT_SIGNAL( startingReading() ), _pacMan, TQT_SLOT( start() ) );
|
|
|
|
|
connect( _treeView, TQT_SIGNAL( finished() ), _pacMan, TQT_SLOT( stop () ) );
|
|
|
|
|
connect( _treeView, TQT_SIGNAL( aborted() ), _pacMan, TQT_SLOT( stop () ) );
|
|
|
|
|
connect( _treeView, TQ_SIGNAL( startingReading() ), _pacMan, TQ_SLOT( start() ) );
|
|
|
|
|
connect( _treeView, TQ_SIGNAL( finished() ), _pacMan, TQ_SLOT( stop () ) );
|
|
|
|
|
connect( _treeView, TQ_SIGNAL( aborted() ), _pacMan, TQ_SLOT( stop () ) );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
@ -317,14 +317,14 @@ KDirStatApp::initActivityTracker()
|
|
|
|
|
_activityTracker = new KActivityTracker( this, "Feedback",
|
|
|
|
|
INITIAL_FEEDBACK_REMINDER );
|
|
|
|
|
|
|
|
|
|
connect( _activityTracker, TQT_SIGNAL( thresholdReached() ),
|
|
|
|
|
this, TQT_SLOT ( askForFeedback() ) );
|
|
|
|
|
connect( _activityTracker, TQ_SIGNAL( thresholdReached() ),
|
|
|
|
|
this, TQ_SLOT ( askForFeedback() ) );
|
|
|
|
|
|
|
|
|
|
connect( _treeView, TQT_SIGNAL( userActivity( int ) ),
|
|
|
|
|
_activityTracker, TQT_SLOT ( trackActivity( int ) ) );
|
|
|
|
|
connect( _treeView, TQ_SIGNAL( userActivity( int ) ),
|
|
|
|
|
_activityTracker, TQ_SLOT ( trackActivity( int ) ) );
|
|
|
|
|
|
|
|
|
|
connect( _cleanupCollection, TQT_SIGNAL( userActivity( int ) ),
|
|
|
|
|
_activityTracker, TQT_SLOT ( trackActivity( int ) ) );
|
|
|
|
|
connect( _cleanupCollection, TQ_SIGNAL( userActivity( int ) ),
|
|
|
|
|
_activityTracker, TQ_SLOT ( trackActivity( int ) ) );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -809,19 +809,19 @@ KDirStatApp::createTreemapView()
|
|
|
|
|
TQSize( _splitter->width(), _treemapViewHeight ) );
|
|
|
|
|
TQ_CHECK_PTR( _treemapView );
|
|
|
|
|
|
|
|
|
|
connect( _treemapView, TQT_SIGNAL( contextMenu( KTreemapTile *, const TQPoint & ) ),
|
|
|
|
|
this, TQT_SLOT ( contextMenu( KTreemapTile *, const TQPoint & ) ) );
|
|
|
|
|
connect( _treemapView, TQ_SIGNAL( contextMenu( KTreemapTile *, const TQPoint & ) ),
|
|
|
|
|
this, TQ_SLOT ( contextMenu( KTreemapTile *, const TQPoint & ) ) );
|
|
|
|
|
|
|
|
|
|
connect( _treemapView, TQT_SIGNAL( treemapChanged() ),
|
|
|
|
|
this, TQT_SLOT ( updateActions() ) );
|
|
|
|
|
connect( _treemapView, TQ_SIGNAL( treemapChanged() ),
|
|
|
|
|
this, TQ_SLOT ( updateActions() ) );
|
|
|
|
|
|
|
|
|
|
connect( _treemapView, TQT_SIGNAL( selectionChanged( KFileInfo * ) ),
|
|
|
|
|
this, TQT_SLOT ( selectionChanged( KFileInfo * ) ) );
|
|
|
|
|
connect( _treemapView, TQ_SIGNAL( selectionChanged( KFileInfo * ) ),
|
|
|
|
|
this, TQ_SLOT ( selectionChanged( KFileInfo * ) ) );
|
|
|
|
|
|
|
|
|
|
if ( _activityTracker )
|
|
|
|
|
{
|
|
|
|
|
connect( _treemapView, TQT_SIGNAL( userActivity ( int ) ),
|
|
|
|
|
_activityTracker, TQT_SLOT ( trackActivity( int ) ) );
|
|
|
|
|
connect( _treemapView, TQ_SIGNAL( userActivity ( int ) ),
|
|
|
|
|
_activityTracker, TQ_SLOT ( trackActivity( int ) ) );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_treemapView->show(); // TQSplitter needs explicit show() for new children
|
|
|
|
|