2011-09-23 22:06:21 +02:00
|
|
|
/* ============================================================
|
|
|
|
* QupZilla - WebKit based browser
|
2011-10-17 09:57:07 +02:00
|
|
|
* Copyright (C) 2010-2011 David Rosca
|
2011-09-23 22:06:21 +02:00
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
* ============================================================ */
|
2011-09-18 15:35:44 +02:00
|
|
|
#ifndef GLOBALFUNCTIONS_H
|
|
|
|
#define GLOBALFUNCTIONS_H
|
|
|
|
|
|
|
|
#include <QByteArray>
|
|
|
|
#include <QPixmap>
|
|
|
|
#include <QBuffer>
|
|
|
|
#include <QFile>
|
2011-09-21 14:20:49 +02:00
|
|
|
#include <QWidget>
|
|
|
|
#include <QApplication>
|
|
|
|
#include <QDesktopWidget>
|
2011-10-09 14:51:25 +02:00
|
|
|
#include <QUrl>
|
2011-09-18 15:35:44 +02:00
|
|
|
|
|
|
|
QByteArray qz_pixmapToByteArray(const QPixmap &pix);
|
|
|
|
QByteArray qz_readAllFileContents(const QString &filename);
|
|
|
|
|
2011-09-21 14:20:49 +02:00
|
|
|
void qz_centerWidgetOnScreen(QWidget* w);
|
2011-10-26 19:23:50 +02:00
|
|
|
void qz_centerWidgetToParent(QWidget* w, QWidget* parent);
|
|
|
|
|
2011-10-09 14:51:25 +02:00
|
|
|
QString qz_samePartOfStrings(const QString &one, const QString &other);
|
|
|
|
QUrl qz_makeRelativeUrl(const QUrl &baseUrl, const QUrl &rUrl);
|
|
|
|
|
2011-10-12 22:28:41 +02:00
|
|
|
QString qz_ensureUniqueFilename(const QString &name);
|
|
|
|
|
2011-10-07 15:37:49 +02:00
|
|
|
QString qz_buildSystem();
|
2011-09-21 14:20:49 +02:00
|
|
|
|
2011-09-18 15:35:44 +02:00
|
|
|
#endif // GLOBALFUNCTIONS_H
|