home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / scfilewidget.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-07-30  |  1.1 KB  |  37 lines

  1. /*
  2. For general Scribus (>=1.3.2) copyright and licensing information please refer
  3. to the COPYING file provided with the program. Following this notice may exist
  4. a copyright and/or license notice that predates the release of Scribus 1.3.2
  5. for which a new license (GPL+exception) is in place.
  6. */
  7. #ifndef SCFILEWIDGET_H
  8. #define SCFILEWIDGET_H
  9.  
  10. #include <QFileDialog>
  11.  
  12. #include "scribusapi.h"
  13.  
  14. /*! \brief Simple wrapper simulating the QFileDialog as a common widget.
  15. Usage is simple - everything is like in QFileDialog except it is not
  16. a dialog, it's a widget. It can be used for extension features etc.
  17. \note Original QFileDialog OK/Cancel buttons are hidden. You must
  18. write your own dialog accept/reject handling.
  19. There is one good idea - it's quite good to handle original dialog
  20. accepted() signal on your own to prevent ugly widget hidding when
  21. user e.g. doubleclicks the "open" file (in the parent (new) dialog):
  22. connect(fileWidget, SIGNAL(accepted()), this, SLOT(accept()));
  23. \author Petr Vanek <petr@scribus.info>
  24. */
  25. class SCRIBUS_API ScFileWidget : public QFileDialog
  26. {
  27.     Q_OBJECT
  28.  
  29.     public:
  30.         ScFileWidget(QWidget * parent);
  31.  
  32.         QString selectedFile();
  33.  
  34. };
  35.  
  36. #endif
  37.