• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeutils API Reference
  • KDE Home
  • Contact Us
 

ark

Public Member Functions | List of all members
BatchExtract Class Reference

#include <batchextract.h>

Inheritance diagram for BatchExtract:
Inheritance graph
[legend]

Public Member Functions

 BatchExtract ()
 
virtual ~BatchExtract ()
 
void addExtraction (Kerfuffle::Archive *archive)
 
bool addInput (const KUrl &url)
 
bool autoSubfolder () const
 
QString destinationFolder () const
 
bool openDestinationAfterExtraction () const
 
bool preservePaths () const
 
void setAutoSubfolder (bool value)
 
void setDestinationFolder (const QString &folder)
 
void setOpenDestinationAfterExtraction (bool value)
 
void setPreservePaths (bool value)
 
bool showExtractDialog ()
 
void start ()
 

Detailed Description

This class schedules the extraction of all given compressed archives.

Like AddToArchive, this class does not need the GUI to be active, and provides the functionality available from the –batch command-line option.

Author
Harald Hvaal haral.nosp@m.dhv@.nosp@m.stud..nosp@m.ntnu.nosp@m..no

Definition at line 54 of file batchextract.h.

Constructor & Destructor Documentation

BatchExtract::BatchExtract ( )

Creates a new BatchExtract object.

Definition at line 49 of file batchextract.cpp.

BatchExtract::~BatchExtract ( )
virtual

Destroys a BatchExtract object.

Definition at line 60 of file batchextract.cpp.

Member Function Documentation

void BatchExtract::addExtraction ( Kerfuffle::Archive *  archive)

Creates an ExtractJob for the given archive and puts it on the queue.

If necessary, the destination directory for the archive is created.

Parameters
archiveThe archive that will be extracted.
See also
setAutoSubfolder

Definition at line 67 of file batchextract.cpp.

bool BatchExtract::addInput ( const KUrl &  url)

Adds a file to the list of files that will be extracted.

Parameters
urlThe file that will be added to the list.
Returns
true The file exists and a suitable plugin could be found for it.
false The file does not exist or a suitable plugin could not be found.

Definition at line 207 of file batchextract.cpp.

bool BatchExtract::autoSubfolder ( ) const

Whether to automatically create a folder inside the destination directory if the archive has more than one directory or file at top level.

Returns
true Create the subdirectory automatically.
false Do not create the subdirectory automatically.

Definition at line 106 of file batchextract.cpp.

QString BatchExtract::destinationFolder ( ) const

Returns the destination directory where the archives will be extracted to.

Returns
The destination directory. If no directory has been manually set with setDestinationFolder, QDir::currentPath() will be returned.

Definition at line 231 of file batchextract.cpp.

bool BatchExtract::openDestinationAfterExtraction ( ) const

Returns whether the destination folder should be open after all archives are extracted.

Returns
true Open the destination folder.
false Do not open the destination folder.

Definition at line 221 of file batchextract.cpp.

bool BatchExtract::preservePaths ( ) const

Whether all files should be extracted to the same directory, even if they're in different directories in the archive.

This is also known as "flat" extraction.

Returns
true Paths should be preserved.
false Paths should be ignored.

Definition at line 226 of file batchextract.cpp.

void BatchExtract::setAutoSubfolder ( bool  value)

Set whether a folder should be created when necessary so the archive is extracted to it.

If set to true, when the archive does not consist of a single folder with the other files and directories inside, a directory will be automatically created inside the destination directory and the archive will be extracted there.

Parameters
valueWhether to create this directory automatically when needed.

Definition at line 111 of file batchextract.cpp.

void BatchExtract::setDestinationFolder ( const QString &  folder)

Sets the directory the archives will be extracted to.

If setSubfolder has been used, the final destination directory will be the concatenation of both.

If folder does not exist, the current destination folder will not change.

Parameters
folderThe directory that will be used.

Definition at line 240 of file batchextract.cpp.

void BatchExtract::setOpenDestinationAfterExtraction ( bool  value)

Whether to open the destination folder after all archives are extracted.

Parameters
valueWhether to open the destination.

Definition at line 247 of file batchextract.cpp.

void BatchExtract::setPreservePaths ( bool  value)

Sets whether paths should be preserved during extraction.

When it is set to false, all files are extracted to a single directory, regardless of their hierarchy in the archive.

Parameters
valueWhether to preserve paths.

Definition at line 252 of file batchextract.cpp.

bool BatchExtract::showExtractDialog ( )

Shows the extract options dialog before extracting the files.

Returns
true The user has set some options and clicked OK.
false The user has canceled extraction.

Definition at line 257 of file batchextract.cpp.

void BatchExtract::start ( )

A wrapper that calls slotStartJob() when the event loop has started.

Definition at line 116 of file batchextract.cpp.


The documentation for this class was generated from the following files:
  • batchextract.h
  • batchextract.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:42:37 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

ark

Skip menu "ark"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdeutils API Reference

Skip menu "kdeutils API Reference"
  • ark
  • filelight
  • kcalc
  • kcharselect
  • kdf
  • kfloppy
  • kgpg
  • ktimer
  • kwallet
  • sweeper

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal