~ubuntu-branches/ubuntu/wily/oxygen/wily

« back to all changes in this revision

Viewing changes to kstyle/config/main.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell, Scarlett Clark, Jonathan Riddell
  • Date: 2015-08-10 23:18:51 UTC
  • mfrom: (1.1.9)
  • Revision ID: package-import@ubuntu.com-20150810231851-wtw33zvkigya4f7t
Tags: 4:5.3.95-0ubuntu1
[ Scarlett Clark ]
* Vivid backport. 

[ Jonathan Riddell ]
* new upstream beta release

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
// IN THE SOFTWARE.
25
25
//////////////////////////////////////////////////////////////////////////////
26
26
 
27
 
#include "oxygenconfigdialog.h"
28
 
#include "../oxygen.h"
29
 
#include "config-liboxygen.h"
30
 
 
 
27
#include <QAbstractScrollArea>
31
28
#include <QApplication>
32
29
#include <QIcon>
33
30
 
 
31
#include <KCMultiDialog>
34
32
#include <KLocalizedString>
35
33
 
36
 
namespace Oxygen
37
 
{
38
 
 
39
 
    int run(int argc, char *argv[])
40
 
    {
41
 
        QApplication app( argc, argv );
42
 
        app.setApplicationName( i18n( "Oxygen Settings" ) );
43
 
        app.setWindowIcon( QIcon::fromTheme( QStringLiteral( "oxygen" ) ) );
44
 
        Oxygen::ConfigDialog dialog;
45
 
        dialog.show();
46
 
        bool result = app.exec();
47
 
        return result;
48
 
    }
49
 
 
50
 
}
51
 
 
52
34
//__________________________________________
53
35
int main(int argc, char *argv[])
54
36
{
55
 
    #if !OXYGEN_USE_KDE4
56
37
    KLocalizedString::setApplicationDomain("oxygen_style_config");
57
 
    #endif
58
 
 
59
 
    return Oxygen::run( argc, argv );
 
38
 
 
39
    QApplication app( argc, argv );
 
40
    app.setApplicationName( i18n( "Oxygen Settings" ) );
 
41
    app.setWindowIcon( QIcon::fromTheme( QStringLiteral( "oxygen-settings" ) ) );
 
42
 
 
43
    KCMultiDialog dialog;
 
44
    dialog.setWindowTitle( i18n( "Oxygen Settings" ) );
 
45
    dialog.addModule( QStringLiteral( "oxygenstyleconfig" ) );
 
46
    dialog.addModule( QStringLiteral( "oxygendecorationconfig" ) );
 
47
    dialog.show();
 
48
 
 
49
    foreach( auto child, dialog.findChildren<QAbstractScrollArea*>() )
 
50
    {
 
51
        child->adjustSize();
 
52
        child->viewport()->adjustSize();
 
53
    }
 
54
 
 
55
    return app.exec();
60
56
}