<commit_before>/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (<EMAIL>)
**
** This file is part of the Qt Components project on Qt Labs.
**
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions contained
** in the Technology Preview License Agreement accompanying this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file.  Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you have questions regarding the use of this file, please contact
** Nokia at <EMAIL>.
**
****************************************************************************/

#ifndef QWindowItem_H
#define QWindowItem_H

#include "qtoplevelwindow.h"

#include <QtGui/QApplication>
#include <QDeclarativeItem>
#include <QDeclarativeView>
#include <QMenuBar>


class QWindowItem : public QDeclarativeItem
{
    Q_OBJECT
    Q_PROPERTY(int x READ x WRITE setX NOTIFY xChanged)
    Q_PROPERTY(int y READ y WRITE setY NOTIFY yChanged)
    Q_PROPERTY(int height READ height WRITE setHeight NOTIFY sizeChanged)
    Q_PROPERTY(int width READ width WRITE setWidth NOTIFY sizeChanged)
    Q_PROPERTY(int minimumHeight READ minimumHeight WRITE setMinimumHeight NOTIFY minimumHeightChanged)
    Q_PROPERTY(int maximumHeight READ maximumHeight WRITE setMaximumHeight NOTIFY maximumHeightChanged)
    Q_PROPERTY(int minimumWidth READ minimumWidth WRITE setMinimumWidth NOTIFY minimumWidthChanged)
    Q_PROPERTY(int maximumWidth READ maximumWidth WRITE setMaximumWidth NOTIFY maximumWidthChanged)
    Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged)
    Q_PROPERTY(bool windowDecoration READ windowDecoration WRITE setWindowDecoration NOTIFY windowDecorationChanged)
    Q_PROPERTY(bool modal READ modal WRITE setModal NOTIFY modalityChanged)
    Q_PROPERTY(bool close READ close WRITE setClose)
    Q_PROPERTY(Qt::WindowState windowState READ windowState WRITE setWindowState NOTIFY windowStateChanged)
    Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged)

public:
    QWindowItem(QTopLevelWindow* QTopLevelWindow = 0);
    ~QWindowItem();

    QTopLevelWindow *window() { return _window; }
    QDeclarativeView *view() { return _window->view(); }
    int x() { return _window->x(); }
    int y() { return _window->y(); }
    int height() { return _window->height(); }
    int minimumHeight() { return _window->minimumHeight(); }
    int maximumHeight() { return _window->maximumHeight(); }
    int width() { return _window->width(); }
    int minimumWidth() { return _window->minimumWidth(); }
    int maximumWidth() { return _window->maximumWidth(); }
    bool isVisible() { return _window->isVisible(); }
    bool windowDecoration() { return !(_window->windowFlags() & Qt::FramelessWindowHint); }
    Qt::WindowState windowState() { return static_cast<Qt::WindowState>(static_cast<int>(_window->windowState()) & ~Qt::WindowActive); }
    QString title() const { return _window->windowTitle(); }
    bool modal() { return _window->isModal(); }
    bool close() { return false; } //we always return false here

    void setX(int x);
    void setY(int y);
    void setHeight(int height);
    void setMinimumHeight(int height);
    void setMaximumHeight(int height);<commit_msg>Added some consts<commit_after>/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (<EMAIL>)
**
** This file is part of the Qt Components project on Qt Labs.
**
** No Commercial Usage
** This file contains pre-release code and may not be distributed.
** You may use this file in accordance with the terms and conditions contained
** in the Technology Preview License Agreement accompanying this package.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file.  Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** If you have questions regarding the use of this file, please contact
** Nokia at <EMAIL>.
**
****************************************************************************/

#ifndef QWindowItem_H
#define QWindowItem_H

#include "qtoplevelwindow.h"

#include <QtGui/QApplication>
#include <QDeclarativeItem>
#include <QDeclarativeView>
#include <QMenuBar>


class QWindowItem : public QDeclarativeItem
{
    Q_OBJECT
    Q_PROPERTY(int x READ x WRITE setX NOTIFY xChanged)
    Q_PROPERTY(int y READ y WRITE setY NOTIFY yChanged)
    Q_PROPERTY(int height READ height WRITE setHeight NOTIFY sizeChanged)
    Q_PROPERTY(int width READ width WRITE setWidth NOTIFY sizeChanged)
    Q_PROPERTY(int minimumHeight READ minimumHeight WRITE setMinimumHeight NOTIFY minimumHeightChanged)
    Q_PROPERTY(int maximumHeight READ maximumHeight WRITE setMaximumHeight NOTIFY maximumHeightChanged)
    Q_PROPERTY(int minimumWidth READ minimumWidth WRITE setMinimumWidth NOTIFY minimumWidthChanged)
    Q_PROPERTY(int maximumWidth READ maximumWidth WRITE setMaximumWidth NOTIFY maximumWidthChanged)
    Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged)
    Q_PROPERTY(bool windowDecoration READ windowDecoration WRITE setWindowDecoration NOTIFY windowDecorationChanged)
    Q_PROPERTY(bool modal READ modal WRITE setModal NOTIFY modalityChanged)
    Q_PROPERTY(bool close READ close WRITE setClose)
    Q_PROPERTY(Qt::WindowState windowState READ windowState WRITE setWindowState NOTIFY windowStateChanged)
    Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged)

public:
    QWindowItem(QTopLevelWindow* QTopLevelWindow = 0);
    ~QWindowItem();

    QTopLevelWindow *window() { return _window; }
    QDeclarativeView *view() { return _window->view(); }
    int x() const { return _window->x(); }
    int y() const { return _window->y(); }
    int height() const { return _window->height(); }
    int minimumHeight() const { return _window->minimumHeight(); }
    int maximumHeight() const { return _window->maximumHeight(); }
    int width() const { return _window->width(); }
    int minimumWidth() const { return _window->minimumWidth(); }
    int maximumWidth() const { return _window->maximumWidth(); }
    bool isVisible() const { return _window->isVisible(); }
    bool windowDecoration() const { return !(_window->windowFlags() & Qt::FramelessWindowHint); }
    Qt::WindowState windowState() const { return static_cast<Qt::WindowState>(static_cast<int>(_window->windowState()) & ~Qt::WindowActive); }
    QString title() const { return _window->windowTitle(); }
    bool close() { return false; } //we always return false here
    bool modal() const { return _window->isModal(); }

    void setX(int x);
    void setY(int y);
    void setHeight(int height);
    void setMinimumHeight(int height);
    void setMaximumHeight(int height);
{'fraction_non_alphanumeric': 0.12416107382550336, 'fraction_numerical': 0.002839442436757873, 'mean_word_length': 5.087195600942655, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 47, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4778410', 'n_tokens_mistral': 2070, 'n_tokens_neox': 2015, 'n_words': 739}