qt 6.5.1 original

This commit is contained in:
kleuter
2023-10-29 23:33:08 +01:00
parent 71d22ab6b0
commit 85d238dfda
21202 changed files with 5499099 additions and 0 deletions

View File

@ -0,0 +1,18 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
#####################################################################
## tst_inputmethodhints Binary:
#####################################################################
qt_internal_add_manual_test(tst_inputmethodhints
GUI
SOURCES
inputmethodhints.cpp inputmethodhints.h inputmethodhints.ui
main.cpp
LIBRARIES
Qt::Gui
Qt::Widgets
ENABLE_AUTOGEN_TOOLS
uic
)

View File

@ -0,0 +1,61 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "inputmethodhints.h"
inputmethodhints::inputmethodhints(QWidget *parent)
: QMainWindow(parent)
{
ui.setupUi(this);
connect(ui.cbDialableOnly, SIGNAL(stateChanged(int)), this, SLOT(checkboxChanged(int)));
connect(ui.cbDigitsOnly, SIGNAL(stateChanged(int)), this, SLOT(checkboxChanged(int)));
connect(ui.cbEmailOnly, SIGNAL(stateChanged(int)), this, SLOT(checkboxChanged(int)));
connect(ui.cbFormattedNumbersOnly, SIGNAL(stateChanged(int)), this, SLOT(checkboxChanged(int)));
connect(ui.cbHiddenText, SIGNAL(stateChanged(int)), this, SLOT(checkboxChanged(int)));
connect(ui.cbLowercaseOnly, SIGNAL(stateChanged(int)), this, SLOT(checkboxChanged(int)));
connect(ui.cbNoAutoUppercase, SIGNAL(stateChanged(int)), this, SLOT(checkboxChanged(int)));
connect(ui.cbNoPredictiveText, SIGNAL(stateChanged(int)), this, SLOT(checkboxChanged(int)));
connect(ui.cbPreferLowercase, SIGNAL(stateChanged(int)), this, SLOT(checkboxChanged(int)));
connect(ui.cbPreferNumbers, SIGNAL(stateChanged(int)), this, SLOT(checkboxChanged(int)));
connect(ui.cbPreferUpperCase, SIGNAL(stateChanged(int)), this, SLOT(checkboxChanged(int)));
connect(ui.cbUppercaseOnly, SIGNAL(stateChanged(int)), this, SLOT(checkboxChanged(int)));
connect(ui.cbUrlOnly, SIGNAL(stateChanged(int)), this, SLOT(checkboxChanged(int)));
}
inputmethodhints::~inputmethodhints()
{
}
void inputmethodhints::checkboxChanged(int)
{
int flags = 0;
if (ui.cbDialableOnly->isChecked())
flags |= Qt::ImhDialableCharactersOnly;
if (ui.cbDigitsOnly->isChecked())
flags |= Qt::ImhDigitsOnly;
if (ui.cbEmailOnly->isChecked())
flags |= Qt::ImhEmailCharactersOnly;
if (ui.cbFormattedNumbersOnly->isChecked())
flags |= Qt::ImhFormattedNumbersOnly;
if (ui.cbHiddenText->isChecked())
flags |= Qt::ImhHiddenText;
if (ui.cbLowercaseOnly->isChecked())
flags |= Qt::ImhLowercaseOnly;
if (ui.cbNoAutoUppercase->isChecked())
flags |= Qt::ImhNoAutoUppercase;
if (ui.cbNoPredictiveText->isChecked())
flags |= Qt::ImhNoPredictiveText;
if (ui.cbPreferLowercase->isChecked())
flags |= Qt::ImhPreferLowercase;
if (ui.cbPreferNumbers->isChecked())
flags |= Qt::ImhPreferNumbers;
if (ui.cbPreferUpperCase->isChecked())
flags |= Qt::ImhPreferUppercase;
if (ui.cbUppercaseOnly->isChecked())
flags |= Qt::ImhUppercaseOnly;
if (ui.cbUrlOnly->isChecked())
flags |= Qt::ImhUrlCharactersOnly;
ui.lineEdit->clear();
ui.lineEdit->setInputMethodHints(Qt::InputMethodHints(flags));
}

View File

@ -0,0 +1,25 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef INPUTMETHODHINTS_H
#define INPUTMETHODHINTS_H
#include <QMainWindow>
#include "ui_inputmethodhints.h"
class inputmethodhints : public QMainWindow
{
Q_OBJECT
public:
inputmethodhints(QWidget *parent = nullptr);
~inputmethodhints();
public slots:
void checkboxChanged(int);
private:
Ui::MainWindow ui;
};
#endif // INPUTMETHODHINTS_H

View File

@ -0,0 +1,10 @@
TEMPLATE = app
TARGET = tst_inputmethodhints
QT += widgets
HEADERS += inputmethodhints.h
SOURCES += main.cpp \
inputmethodhints.cpp
FORMS += inputmethodhints.ui
RESOURCES +=

View File

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>360</width>
<height>640</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>1</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>behaviour</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QCheckBox" name="cbHiddenText">
<property name="text">
<string>ImhHiddenText</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cbNoAutoUppercase">
<property name="text">
<string>ImhNoAutoUppercase</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cbPreferNumbers">
<property name="text">
<string>ImhPreferNumbers</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cbPreferUpperCase">
<property name="text">
<string>ImhPreferUppercase</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cbPreferLowercase">
<property name="text">
<string>ImhPreferLowercase</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cbNoPredictiveText">
<property name="text">
<string>ImhNoPredictiveText</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>restrictions</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCheckBox" name="cbDigitsOnly">
<property name="text">
<string>ImhDigitsOnly</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cbFormattedNumbersOnly">
<property name="text">
<string>ImhFormattedNumbersOnly</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cbUppercaseOnly">
<property name="text">
<string>ImhUppercaseOnly</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cbLowercaseOnly">
<property name="text">
<string>ImhLowercaseOnly</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cbDialableOnly">
<property name="text">
<string>ImhDialableCharactersOnly</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cbEmailOnly">
<property name="text">
<string>ImhEmailCharactersOnly</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cbUrlOnly">
<property name="text">
<string>ImhUrlCharactersOnly</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<widget class="QLineEdit" name="lineEdit"/>
</item>
</layout>
</widget>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -0,0 +1,14 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "inputmethodhints.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
inputmethodhints w;
w.showMaximized();
return a.exec();
}