File indexing completed on 2024-05-19 05:35:22

0001 //////////////////////////////////////////////////////////////////////////////
0002 // oxygenanimationconfigitem.h
0003 // animation configuration item
0004 // -------------------
0005 //
0006 // SPDX-FileCopyrightText: 2010 Hugo Pereira Da Costa <hugo.pereira@free.fr>
0007 //
0008 // SPDX-License-Identifier: MIT
0009 //////////////////////////////////////////////////////////////////////////////
0010 
0011 #include <QAbstractScrollArea>
0012 #include <QApplication>
0013 #include <QIcon>
0014 
0015 #include <KCMultiDialog>
0016 #include <KLocalizedString>
0017 
0018 //__________________________________________
0019 int main(int argc, char *argv[])
0020 {
0021     KLocalizedString::setApplicationDomain("oxygen_style_config");
0022 
0023     QApplication app(argc, argv);
0024     app.setApplicationName(i18n("Oxygen Settings"));
0025     app.setWindowIcon(QIcon::fromTheme(QStringLiteral("oxygen-settings")));
0026 
0027     KCMultiDialog dialog;
0028     dialog.setWindowTitle(i18n("Oxygen Settings"));
0029     dialog.addModule(KPluginMetaData(QStringLiteral("kstyle_config/kstyle_oxygen_config")));
0030     dialog.addModule(KPluginMetaData(QStringLiteral("org.kde.kdecoration2.kcm/kcm_oxygendecoration")));
0031     dialog.show();
0032 
0033     const auto children = dialog.findChildren<QAbstractScrollArea *>();
0034     for (auto child : children) {
0035         child->adjustSize();
0036         child->viewport()->adjustSize();
0037     }
0038 
0039     return app.exec();
0040 }