browsercore/appfw/Api/Common/UiUtil.h
author hgs
Fri, 15 Oct 2010 17:30:59 -0400
changeset 16 3c88a81ff781
parent 12 afcd8e6d025b
permissions -rw-r--r--
201041
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
1450b09d0cfd Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     1
/*
1450b09d0cfd Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
1450b09d0cfd Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     3
* All rights reserved.
1450b09d0cfd Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     4
*
3
hgs
parents: 0
diff changeset
     5
* This program is free software: you can redistribute it and/or modify
hgs
parents: 0
diff changeset
     6
* it under the terms of the GNU Lesser General Public License as published by
hgs
parents: 0
diff changeset
     7
* the Free Software Foundation, version 2.1 of the License.
hgs
parents: 0
diff changeset
     8
* 
hgs
parents: 0
diff changeset
     9
* This program is distributed in the hope that it will be useful,
hgs
parents: 0
diff changeset
    10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
hgs
parents: 0
diff changeset
    11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
hgs
parents: 0
diff changeset
    12
* GNU Lesser General Public License for more details.
0
1450b09d0cfd Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    13
*
3
hgs
parents: 0
diff changeset
    14
* You should have received a copy of the GNU Lesser General Public License
hgs
parents: 0
diff changeset
    15
* along with this program.  If not, 
hgs
parents: 0
diff changeset
    16
* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
0
1450b09d0cfd Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    17
*
3
hgs
parents: 0
diff changeset
    18
* Description:
0
1450b09d0cfd Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    19
*
1450b09d0cfd Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    20
*/
1450b09d0cfd Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    21
1450b09d0cfd Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    22
#include <QString>
1450b09d0cfd Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    23
#include <QFile>
1450b09d0cfd Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    24
#include <QUrl>
1450b09d0cfd Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    25
#include "BWFGlobal.h"
1450b09d0cfd Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    26
1450b09d0cfd Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    27
namespace WRT {
1450b09d0cfd Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    28
    class BWF_EXPORT UiUtil
1450b09d0cfd Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    29
    {
1450b09d0cfd Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    30
    public:
1450b09d0cfd Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    31
        static QString loadFiletoString(const QString &name);
1450b09d0cfd Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    32
        static QUrl guessUrlFromString(const QString &string);
12
hgs
parents: 3
diff changeset
    33
     	static QUrl searchUrl(const QString &string);
hgs
parents: 3
diff changeset
    34
        static QString removeScheme(const QString & str);
16
hgs
parents: 12
diff changeset
    35
        static QUrl encodeQueryItems(QUrl& url, bool encodeNonAscii);
hgs
parents: 12
diff changeset
    36
    private:
hgs
parents: 12
diff changeset
    37
        static QUrl searchUrlWithoutCheck(const QString &string);
0
1450b09d0cfd Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    38
    };
1450b09d0cfd Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    39
}