PageRenderTime 43ms CodeModel.GetById 14ms RepoModel.GetById 1ms app.codeStats 0ms

/texworks-0.4.4/src/ResourcesDialog.h

#
C Header | 54 lines | 20 code | 13 blank | 21 comment | 0 complexity | b63c892dd4e8f6ca08056542d91273bd MD5 | raw file
Possible License(s): GPL-2.0
  1. /*
  2. This is part of TeXworks, an environment for working with TeX documents
  3. Copyright (C) 2007-2012 Jonathan Kew, Stefan L??ffler, Charlie Sharpsteen
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. For links to further information, or to contact the authors,
  15. see <http://www.tug.org/texworks/>.
  16. */
  17. #ifndef ResourcesDialog_H
  18. #define ResourcesDialog_H
  19. #include <QDialog>
  20. #include <QUrl>
  21. #include <QDesktopServices>
  22. #include "ui_ResourcesDialog.h"
  23. class ResourcesDialog : public QDialog, private Ui::ResourcesDialog
  24. {
  25. Q_OBJECT
  26. public:
  27. ResourcesDialog(QWidget *parent);
  28. static DialogCode doResourcesDialog(QWidget *parent);
  29. public slots:
  30. // void toggleDetails();
  31. private slots:
  32. void openURL(const QString& url) const { QDesktopServices::openUrl(QUrl(url)); }
  33. private:
  34. void init();
  35. static QString pathToLink(const QString & path);
  36. };
  37. #endif // !defined(ResourcesDialog_H)