├── .gitignore
├── ButtonBase
├── ButtonBase.qrc
├── ButtonBase.vcxproj
├── ButtonBase.vcxproj.filters
├── ButtonTest.cpp
├── ButtonTest.h
├── ButtonTest.ui
├── SwitchButton.cpp
├── SwitchButton.h
├── SwitchButtonBase.cpp
├── SwitchButtonBase.h
└── main.cpp
├── Clock
├── Clock.cpp
├── Clock.h
├── Clock.qrc
├── Clock.ui
├── Clock.vcxproj
├── Clock.vcxproj.filters
├── main.cpp
└── qrc
│ └── bg.jpg
├── ComboBox
├── ComboBox.vcxproj
├── ComboBox.vcxproj.filters
├── ComboBoxTest.cpp
├── ComboBoxTest.h
├── ComboBoxTest.qrc
├── ComboBoxTest.ui
├── accountitem.cpp
├── accountitem.h
├── main.cpp
├── qrc
│ ├── ico_gb_list.png
│ ├── ico_sl.png
│ ├── ico_xia.png
│ ├── qss
│ │ ├── listWidget.qss
│ │ └── whiteScrollbar.qss
│ ├── th-c1.png
│ ├── th-c10.png
│ ├── th-c11.png
│ ├── th-c12.png
│ ├── th-c13.png
│ ├── th-c2.png
│ ├── th-c3.png
│ ├── th-c4.png
│ ├── th-c5.png
│ ├── th-c6.png
│ ├── th-c7.png
│ ├── th-c8.png
│ └── th-c9.png
├── vComboBox.cpp
└── vComboBox.h
├── DockWin
├── DockWin.cpp
├── DockWin.h
├── DockWin.qrc
├── DockWin.ui
├── DockWin.vcxproj
├── DockWin.vcxproj.filters
└── main.cpp
├── DragObject
├── DragObject.cpp
├── DragObject.h
├── DragObject.vcxproj
├── DragObject.vcxproj.filters
├── DragObjectTestWidget.cpp
├── DragObjectTestWidget.h
├── DragObjectTestWidget.qrc
├── DragObjectTestWidget.ui
└── main.cpp
├── GIF
├── 1.gif
├── 10.gif
├── 11.gif
├── 12.gif
├── 13.gif
├── 14.gif
├── 15.gif
├── 16.gif
├── 17.gif
├── 18.gif
├── 19.gif
├── 2.gif
├── 20.gif
├── 21.gif
├── 22.gif
├── 23.gif
├── 24.gif
├── 25.gif
├── 26.gif
├── 27.gif
├── 28.gif
├── 29.gif
├── 3.gif
├── 4.gif
├── 5.gif
├── 6.gif
├── 7.gif
├── 8.gif
├── 9.gif
└── rollingBox.gif
├── GalleryWidget
├── GalleryWidget.qrc
├── GalleryWidget.vcxproj
├── GalleryWidget.vcxproj.filters
├── galleryMainWidget.cpp
├── galleryMainWidget.h
├── galleryMainWidget.ui
├── galleryphotowidget.cpp
├── galleryphotowidget.h
├── gallerywidget.cpp
├── gallerywidget.h
├── interactivebuttonbase.cpp
├── interactivebuttonbase.h
├── main.cpp
├── qrc
│ ├── 1.jpg
│ ├── 10.jpg
│ ├── 11.jpg
│ ├── 2.jpg
│ ├── 3.jpg
│ ├── 4.jpg
│ ├── 5.jpg
│ ├── 6.jpg
│ ├── 7.jpg
│ ├── 8.jpg
│ ├── 9.jpg
│ └── qss
│ │ └── whiteScrollbar.qss
├── waterzoombutton.cpp
└── waterzoombutton.h
├── GraphicsEffect
├── GraphicsEffect.cpp
├── GraphicsEffect.h
├── GraphicsEffect.qrc
├── GraphicsEffect.ui
├── GraphicsEffect.vcxproj
├── GraphicsEffect.vcxproj.filters
├── main.cpp
└── qrc
│ ├── 1.png
│ ├── 2.png
│ ├── 3.png
│ └── 4.png
├── IconPanel
├── IconPanel.qrc
├── IconPanel.vcxproj
├── IconPanel.vcxproj.filters
├── IconPanelTest.cpp
├── IconPanelTest.h
├── IconPanelTest.ui
├── font
│ ├── fa-regular-400.ttf
│ ├── fontawesome-webfont.ttf
│ ├── iconfont.ttf
│ └── pe-icon-set-weather.ttf
├── iconhelper.cpp
├── iconhelper.h
├── main.cpp
├── panelwidget.cpp
└── panelwidget.h
├── JsWithCpp
├── JsWithCpp.cpp
├── JsWithCpp.h
├── JsWithCpp.ui
├── JsWithCpp.vcxproj
├── JsWithCpp.vcxproj.filters
├── WebConnect.cpp
├── WebConnect.h
├── WebLobby.cpp
├── WebLobby.h
├── main.cpp
└── qrc
│ ├── JsWithCpp.qrc
│ ├── index.html
│ └── qwebchannel.js
├── LICENSE
├── LineEdit
├── LineEdit.cpp
├── LineEdit.h
├── LineEdit.qrc
├── LineEdit.ui
├── LineEdit.vcxproj
├── LineEdit.vcxproj.filters
├── main.cpp
└── qrc
│ ├── ico_gb_wxz.png
│ └── ico_gb_xz.png
├── Lrc
├── Lrc.cpp
├── Lrc.h
├── Lrc.qrc
├── Lrc.ui
├── Lrc.vcxproj
├── Lrc.vcxproj.filters
└── main.cpp
├── QtWidgetsApplication.sln
├── README.md
├── SmoothScrollBarTest
├── SmoothScrollArea.cpp
├── SmoothScrollArea.h
├── SmoothScrollBar.cpp
├── SmoothScrollBar.h
├── SmoothScrollBarTest.cpp
├── SmoothScrollBarTest.h
├── SmoothScrollBarTest.qrc
├── SmoothScrollBarTest.ui
├── SmoothScrollBarTest.vcxproj
├── SmoothScrollBarTest.vcxproj.filters
├── main.cpp
└── qrc
│ └── qss
│ ├── blackScrollbar.qss
│ └── whiteScrollbar.qss
├── SysteamTrayTest
├── SysteamTrayManager.cpp
├── SysteamTrayManager.h
├── SysteamTrayTest.cpp
├── SysteamTrayTest.h
├── SysteamTrayTest.qrc
├── SysteamTrayTest.ui
├── SysteamTrayTest.vcxproj
├── SysteamTrayTest.vcxproj.filters
├── SystemTrayWarn.cpp
├── SystemTrayWarn.h
├── SystemTrayWarn.ui
├── common.ini
├── main.cpp
└── qrc
│ ├── 1.jpg
│ ├── 1.png
│ ├── Qt.png
│ ├── ic_gb.png
│ ├── ico_gb_wxz.png
│ ├── ico_gb_xz.png
│ ├── ico_gx_nor.png
│ └── ico_gx_sel.png
├── Verification
├── Verification.cpp
├── Verification.h
├── Verification.qrc
├── Verification.vcxproj
├── Verification.vcxproj.filters
├── VerificationTest.cpp
├── VerificationTest.h
├── VerificationTest.ui
└── main.cpp
├── animation
├── animation.vcxproj
├── animation.vcxproj.filters
├── animationTest.cpp
├── animationTest.h
├── animationTest.qrc
├── animationTest.ui
├── combo.cpp
├── combo.h
├── combo.ui
├── main.cpp
├── popAnimation.cpp
├── popAnimation.h
├── qrc
│ ├── number
│ │ ├── z0.png
│ │ ├── z1.png
│ │ ├── z2.png
│ │ ├── z3.png
│ │ ├── z4.png
│ │ ├── z5.png
│ │ ├── z6.png
│ │ ├── z7.png
│ │ ├── z8.png
│ │ ├── z9.png
│ │ └── zx.png
│ ├── th-c1.png
│ ├── th-c10.png
│ ├── th-c11.png
│ ├── th-c12.png
│ ├── th-c13.png
│ ├── th-c2.png
│ ├── th-c3.png
│ ├── th-c4.png
│ ├── th-c5.png
│ ├── th-c6.png
│ ├── th-c7.png
│ ├── th-c8.png
│ └── th-c9.png
├── rotationLabel.cpp
└── rotationLabel.h
├── banner
├── QBannerWidget.cpp
├── QBannerWidget.h
├── Resources
│ ├── 1.jpg
│ ├── 1.png
│ ├── 2.jpg
│ ├── 2.png
│ ├── 3.jpg
│ ├── 3.png
│ ├── 4.jpg
│ ├── 4.png
│ ├── 5.jpg
│ ├── 5.png
│ ├── 6.jpg
│ ├── 6.png
│ ├── 7.jpg
│ ├── 7.png
│ ├── 8.jpg
│ ├── 8.png
│ ├── left.png
│ ├── lefthover.png
│ ├── right.png
│ └── righthover.png
├── banner.qrc
├── banner.rar
├── banner.vcxproj
├── banner.vcxproj.filters
├── bannerTest.cpp
├── bannerTest.h
├── bannerTest.ui
└── main.cpp
├── carouselLabel
├── carouselLabel.cpp
├── carouselLabel.h
├── carouselLabel.qrc
├── carouselLabel.vcxproj
├── carouselLabel.vcxproj.filters
├── carouselLabelTest.cpp
├── carouselLabelTest.h
├── carouselLabelTest.ui
├── image
│ ├── 1.jpg
│ ├── 10.jpg
│ ├── 11.jpg
│ ├── 12.jpg
│ ├── 2.jpg
│ ├── 3.jpg
│ ├── 4.jpg
│ ├── 5.jpg
│ ├── 6.jpg
│ ├── 7.jpg
│ ├── 8.jpg
│ ├── 9.jpg
│ └── bg.jpg
└── main.cpp
├── changeUserInfo
├── LabelToast.cpp
├── LabelToast.h
├── LabelToast.ui
├── baseInfoWidget.cpp
├── baseInfoWidget.h
├── baseInfoWidget.ui
├── birthInfoWidget.cpp
├── birthInfoWidget.h
├── birthInfoWidget.ui
├── changeUserInfo.cpp
├── changeUserInfo.h
├── changeUserInfo.qrc
├── changeUserInfo.ui
├── changeUserInfo.vcxproj
├── changeUserInfo.vcxproj.filters
├── emotionWidget.cpp
├── emotionWidget.h
├── emotionWidget.ui
├── gameInfoWidget.cpp
├── gameInfoWidget.h
├── gameInfoWidget.ui
├── imageTool.cpp
├── imageTool.h
├── likeGameConfig.cpp
├── likeGameConfig.h
├── logoItem.cpp
├── logoItem.h
├── logoItem.ui
├── main.cpp
├── pinyin.cpp
├── pinyin.h
├── qrc
│ ├── 1000-23A98AF33723EB82D5AC9FBD44A4F7EA
│ ├── ico_gb_wxz.png
│ ├── ico_gb_xz.png
│ ├── ico_yyf_14_gb.png
│ ├── ico_zkt_18_sx.png
│ ├── icon_sq.png
│ ├── icon_zk.png
│ ├── iconly_light_outline_search.png
│ ├── qss
│ │ └── whiteScrollbar.qss
│ └── ylf_icon_wsm.png
├── rollingBox.cpp
├── rollingBox.h
├── userInfoWidget.cpp
├── userInfoWidget.h
├── userInfoWidget.ui
├── vGameButton.cpp
├── vGameButton.h
├── vGameButton.ui
├── vLabel.cpp
├── vLabel.h
├── vLineEdit.cpp
├── vLineEdit.h
├── vTextEdits.cpp
└── vTextEdits.h
├── chatBubbe
├── chatBubbe.cpp
├── chatBubbe.h
├── chatBubbe.qrc
├── chatBubbe.ui
├── chatBubbe.vcxproj
├── chatBubbe.vcxproj.filters
├── main.cpp
└── qrc
│ ├── chat_bubble_1.png
│ ├── chat_bubble_10.png
│ ├── chat_bubble_12.png
│ ├── chat_bubble_15.png
│ ├── chat_bubble_16.png
│ ├── chat_bubble_17.png
│ ├── chat_bubble_18.png
│ ├── chat_bubble_19.png
│ ├── chat_bubble_2.png
│ ├── chat_bubble_21.png
│ ├── chat_bubble_22.png
│ ├── chat_bubble_23.png
│ ├── chat_bubble_27.png
│ ├── chat_bubble_28.png
│ ├── chat_bubble_29.png
│ ├── chat_bubble_3.png
│ ├── chat_bubble_4.png
│ ├── chat_bubble_5.png
│ └── chat_bubble_6.png
├── chatMessageWidget
├── chatMessageBrowser.cpp
├── chatMessageBrowser.h
├── chatMessageItem.cpp
├── chatMessageItem.h
├── chatMessageItem.ui
├── chatMessageWidget.cpp
├── chatMessageWidget.h
├── chatMessageWidget.qrc
├── chatMessageWidget.ui
├── chatMessageWidget.vcxproj
├── chatMessageWidget.vcxproj.filters
├── image
│ ├── 1.jpg
│ ├── 10.jpg
│ ├── 11.jpg
│ ├── 12.jpg
│ ├── 2.jpg
│ ├── 3.jpg
│ ├── 4.jpg
│ ├── 5.jpg
│ ├── 6.jpg
│ ├── 7.jpg
│ ├── 8.jpg
│ ├── 9.jpg
│ ├── bg.jpg
│ ├── ic_gb.png
│ ├── ic_zxh.png
│ ├── ico_emoji.png
│ ├── ico_photo.png
│ └── lt_ic_zdh.png
├── imageTool.cpp
├── imageTool.h
├── logoItem.cpp
├── logoItem.h
├── logoItem.ui
├── main.cpp
├── testWidget.cpp
└── testWidget.h
├── clickedAnimation
├── WaterClicked.cpp
├── WaterClicked.h
├── clickedAnimation.cpp
├── clickedAnimation.h
├── clickedAnimation.qrc
├── clickedAnimation.ui
├── clickedAnimation.vcxproj
├── clickedAnimation.vcxproj.filters
├── imageLabel.cpp
├── imageLabel.h
├── main.cpp
└── qrc
│ └── icon_sz2.png
├── floatingWin
├── floatingWin.cpp
├── floatingWin.h
├── floatingWin.qrc
├── floatingWin.ui
├── floatingWin.vcxproj
├── floatingWin.vcxproj.filters
├── main.cpp
└── qrc
│ └── bg.png
├── frameLessScale
├── DragShadow.cpp
├── DragShadow.h
├── frameLessScale.cpp
├── frameLessScale.h
├── frameLessScale.qrc
├── frameLessScale.ui
├── frameLessScale.vcxproj
├── frameLessScale.vcxproj.filters
├── frameless.cpp
├── frameless.h
├── framelessdialog.cpp
├── framelessdialog.h
├── framelessmainwindow.cpp
├── framelessmainwindow.h
├── framelesswidget.cpp
├── framelesswidget.h
└── main.cpp
├── marqueeLabel
├── main.cpp
├── marqueeLabel.cpp
├── marqueeLabel.h
├── marqueeLabel.qrc
├── marqueeLabel.ui
├── marqueeLabel.vcxproj
├── marqueeLabel.vcxproj.filters
├── vmarqueelabel.cpp
└── vmarqueelabel.h
├── moveWidget
├── main.cpp
├── moveWidget.cpp
├── moveWidget.h
├── moveWidget.qrc
├── moveWidget.ui
├── moveWidget.vcxproj
├── moveWidget.vcxproj.filters
├── moveWidgetTest.cpp
├── moveWidgetTest.h
├── moveWidgetTest.ui
└── qrc
│ └── Qt.png
├── notify
├── NotifyCountWidget.cpp
├── NotifyCountWidget.h
├── NotifyCountWidget.ui
├── arrangedWidget.cpp
├── arrangedWidget.h
├── image
│ ├── 0.jpg
│ ├── 1.jpg
│ ├── 10.jpg
│ ├── 11.jpg
│ ├── 12.jpg
│ ├── 2.jpg
│ ├── 3.jpg
│ ├── 4.jpg
│ ├── 5.jpg
│ ├── 6.jpg
│ ├── 7.jpg
│ ├── 8.jpg
│ ├── 9.jpg
│ ├── ico_yyf_14_gb.png
│ └── message.png
├── imageTool.cpp
├── imageTool.h
├── main.cpp
├── notify.qrc
├── notify.vcxproj
├── notify.vcxproj.filters
├── notifyTestWidget.cpp
├── notifyTestWidget.h
├── notifyTestWidget.ui
├── notifyWidget.cpp
├── notifyWidget.h
├── notifyWidget.ui
├── notifymanager.cpp
└── notifymanager.h
├── paintEvent
├── main.cpp
├── paintEvent.cpp
├── paintEvent.h
├── paintEvent.qrc
├── paintEvent.ui
├── paintEvent.vcxproj
└── paintEvent.vcxproj.filters
├── pinyin
├── main.cpp
├── pinyin.cpp
├── pinyin.h
├── pinyin.vcxproj
├── pinyin.vcxproj.filters
├── pinyinTest.cpp
├── pinyinTest.h
├── pinyinTest.qrc
└── pinyinTest.ui
├── progress
├── QRoundProgressBar.cpp
├── QRoundProgressBar.h
├── animationprocessbar.cpp
├── animationprocessbar.h
├── batteryprogressbar.cpp
├── batteryprogressbar.h
├── main.cpp
├── myprocessbar.cpp
├── myprocessbar.h
├── progress.vcxproj
├── progress.vcxproj.filters
├── progressTest.cpp
├── progressTest.h
├── progressTest.qrc
├── progressTest.ui
├── roundprogressbar.cpp
├── roundprogressbar.h
├── vProgressBar.cpp
├── vProgressBar.h
├── vProgressBars.cpp
├── vProgressBars.h
├── vWaterProgressBar.cpp
├── vWaterProgressBar.h
├── vpkProgressBar.cpp
└── vpkProgressBar.h
├── rollingBox
├── QtWidgetsApplication.cpp
├── QtWidgetsApplication.h
├── QtWidgetsApplication.qrc
├── QtWidgetsApplication.ui
├── QtWidgetsApplication.vcxproj
├── QtWidgetsApplication.vcxproj.filters
├── main.cpp
├── rollingBox.cpp
└── rollingBox.h
├── slidepuzzlewidget
├── Resources
│ ├── back1.jpg
│ ├── back2.jpg
│ ├── back3.jpg
│ └── back4.jpg
├── frmslidepuzzlewidget.cpp
├── frmslidepuzzlewidget.h
├── frmslidepuzzlewidget.qrc
├── frmslidepuzzlewidget.ui
├── main.cpp
├── puzzlewidget.cpp
├── puzzlewidget.h
├── slidepuzzlewidget.pro
├── slidepuzzlewidget.vcxproj
├── slidepuzzlewidget.vcxproj.filters
├── sliderpuzzlewidget.cpp
├── sliderpuzzlewidget.h
├── sliderpuzzlewidget.ui
├── ui_frmslidepuzzlewidget.h
└── ui_sliderpuzzlewidget.h
├── sqlite
├── vloginsqlite.cpp
└── vloginsqlite.h
└── suspensionSlide
├── main.cpp
├── qrc
├── image
│ └── 1.jpg
└── qss
│ ├── blackScrollbar.qss
│ └── whiteScrollbar.qss
├── suspensionScrollBar.cpp
├── suspensionScrollBar.h
├── suspensionSlide.vcxproj
├── suspensionSlide.vcxproj.filters
├── suspensionSlideTest.cpp
├── suspensionSlideTest.h
├── suspensionSlideTest.qrc
└── suspensionSlideTest.ui
/ButtonBase/ButtonBase.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/ButtonBase/ButtonTest.cpp:
--------------------------------------------------------------------------------
1 | #include "ButtonTest.h"
2 |
3 | ButtonBase::ButtonBase(QWidget *parent)
4 | : QWidget(parent)
5 | {
6 | ui.setupUi(this);
7 |
8 | ui.toolButtonV2->setSwitchButtonType(emSwitchButtonType::V2);
9 | ui.toolButtonV3->setSwitchButtonType(emSwitchButtonType::V3);
10 | }
11 |
12 | ButtonBase::~ButtonBase()
13 | {}
14 |
--------------------------------------------------------------------------------
/ButtonBase/ButtonTest.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include "ui_ButtonTest.h"
5 |
6 | class ButtonBase : public QWidget
7 | {
8 | Q_OBJECT
9 |
10 | public:
11 | ButtonBase(QWidget *parent = nullptr);
12 | ~ButtonBase();
13 |
14 | private:
15 | Ui::ButtonBaseClass ui;
16 | };
17 |
--------------------------------------------------------------------------------
/ButtonBase/SwitchButton.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "SwitchButtonBase.h"
4 |
5 | enum emSwitchButtonType {
6 | V1 = 0,
7 | V2 = 1,
8 | V3 = 2,
9 | };
10 |
11 | class SwitchButton : public SwitchButtonBase
12 | {
13 | Q_OBJECT
14 |
15 | public:
16 | explicit SwitchButton(QWidget* parent = nullptr);
17 |
18 | void setParams(const QColor& indicatorColor = QColor(255, 255, 255),
19 | const QColor& backgroundColor = QColor(188, 188, 188),
20 | const QColor& checkedBackgroundColor = QColor(0, 89, 89),
21 | const QColor& checkedIndicatorColor = QColor(255, 255, 255));
22 |
23 | void setSwitchButtonType(emSwitchButtonType eType);
24 |
25 |
26 | protected:
27 | void paintBackground(QPainter& painter) override;
28 | void paintIndicator(QPainter& painter) override;
29 |
30 | private:
31 | void paintBackgroundV1(QPainter& painter);
32 | void paintIndicatorV1(QPainter& painter);
33 |
34 | void paintBackgroundV2(QPainter& painter);
35 | void paintIndicatorV2(QPainter& painter);
36 |
37 | void paintBackgroundV3(QPainter& painter);
38 | void paintIndicatorV3(QPainter& painter);
39 |
40 | private:
41 | QColor indicator_color;
42 | QColor background_color;
43 | QColor checked_background_color;
44 | QColor checked_indicator_color;
45 | emSwitchButtonType eSwitchButtonType;
46 | };
47 |
48 |
--------------------------------------------------------------------------------
/ButtonBase/SwitchButtonBase.cpp:
--------------------------------------------------------------------------------
1 | #include "SwitchButtonBase.h"
2 |
3 | SwitchButtonBase::SwitchButtonBase(QWidget* parent)
4 | : QToolButton(parent), _indicatorX(0.0f), start(0), end(0)
5 | {
6 | setCheckable(true);
7 |
8 | slideAni = new QPropertyAnimation(this, "indicatorX");
9 | slideAni->setDuration(200);
10 | }
11 |
12 | void SwitchButtonBase::mouseReleaseEvent(QMouseEvent* event)
13 | {
14 | QToolButton::mouseReleaseEvent(event);
15 | if (isChecked())
16 | slideAni->setEndValue(end);
17 | else
18 | slideAni->setEndValue(start);
19 | slideAni->start();
20 | }
21 |
22 | void SwitchButtonBase::paintEvent(QPaintEvent* event)
23 | {
24 | QPainter painter(this);
25 | painter.setRenderHint(QPainter::Antialiasing);
26 | paintBackground(painter);
27 | paintIndicator(painter);
28 | }
29 |
30 | void SwitchButtonBase::resizeEvent(QResizeEvent* event)
31 | {
32 | QToolButton::resizeEvent(event);
33 | animaParamsInit();
34 | }
35 |
36 | float SwitchButtonBase::indicatorX() const
37 | {
38 | return _indicatorX;
39 | }
40 |
41 | void SwitchButtonBase::setIndicatorX(float x)
42 | {
43 | _indicatorX = x;
44 | update();
45 | emit indicatorXChanged();
46 | }
47 |
48 | void SwitchButtonBase::animaParamsInit()
49 | {
50 | start = height() / 2;
51 | end = width() - 2 - start;
52 | _indicatorX = start;
53 | }
54 |
--------------------------------------------------------------------------------
/ButtonBase/SwitchButtonBase.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 | #include
6 |
7 | class SwitchButtonBase : public QToolButton
8 | {
9 | Q_OBJECT
10 | Q_PROPERTY(float indicatorX READ indicatorX WRITE setIndicatorX NOTIFY indicatorXChanged)
11 |
12 | public:
13 | explicit SwitchButtonBase(QWidget* parent = nullptr);
14 |
15 | protected:
16 | void mouseReleaseEvent(QMouseEvent* event) override;
17 | void paintEvent(QPaintEvent* event) override;
18 | void resizeEvent(QResizeEvent* event) override;
19 |
20 | float indicatorX() const;
21 | void setIndicatorX(float x);
22 |
23 | virtual void paintBackground(QPainter& painter) = 0;
24 | virtual void paintIndicator(QPainter& painter) = 0;
25 |
26 | virtual void animaParamsInit();
27 |
28 | signals:
29 | void indicatorXChanged();
30 |
31 | protected:
32 | QPropertyAnimation* slideAni;
33 | float _indicatorX;
34 | float start, end;
35 | };
36 |
--------------------------------------------------------------------------------
/ButtonBase/main.cpp:
--------------------------------------------------------------------------------
1 | #include "ButtonTest.h"
2 | #include
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 | ButtonBase w;
8 | w.show();
9 | return a.exec();
10 | }
11 |
--------------------------------------------------------------------------------
/Clock/Clock.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/Clock/Clock.cpp
--------------------------------------------------------------------------------
/Clock/Clock.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/Clock/Clock.h
--------------------------------------------------------------------------------
/Clock/Clock.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | qrc/bg.jpg
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Clock/Clock.ui:
--------------------------------------------------------------------------------
1 |
2 | ClockClass
3 |
4 |
5 | ClockClass
6 |
7 |
8 |
9 | 0
10 | 0
11 | 600
12 | 400
13 |
14 |
15 |
16 | Clock
17 | $centralwidget$
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Clock/Clock.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hh;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | qrc;rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 | {99349809-55BA-4b9d-BF79-8FDBB0286EB3}
18 | ui
19 |
20 |
21 | {639EADAA-A684-42e4-A9AD-28FC9BCB8F7C}
22 | ts
23 |
24 |
25 |
26 |
27 | Resource Files
28 |
29 |
30 | Form Files
31 |
32 |
33 | Header Files
34 |
35 |
36 | Source Files
37 |
38 |
39 |
40 |
41 | Source Files
42 |
43 |
44 |
--------------------------------------------------------------------------------
/Clock/main.cpp:
--------------------------------------------------------------------------------
1 | #include "Clock.h"
2 | #include
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 | Clock w;
8 | w.show();
9 | return a.exec();
10 | }
11 |
--------------------------------------------------------------------------------
/Clock/qrc/bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/Clock/qrc/bg.jpg
--------------------------------------------------------------------------------
/ComboBox/ComboBoxTest.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/ComboBox/ComboBoxTest.cpp
--------------------------------------------------------------------------------
/ComboBox/ComboBoxTest.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/ComboBox/ComboBoxTest.h
--------------------------------------------------------------------------------
/ComboBox/ComboBoxTest.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | qrc/ico_sl.png
4 | qrc/ico_xia.png
5 | qrc/ico_gb_list.png
6 | qrc/th-c1.png
7 | qrc/th-c2.png
8 | qrc/th-c3.png
9 | qrc/th-c4.png
10 | qrc/th-c5.png
11 | qrc/th-c6.png
12 | qrc/th-c7.png
13 | qrc/th-c8.png
14 | qrc/th-c9.png
15 | qrc/th-c10.png
16 | qrc/th-c11.png
17 | qrc/th-c12.png
18 | qrc/th-c13.png
19 |
20 |
21 | qrc/qss/listWidget.qss
22 | qrc/qss/whiteScrollbar.qss
23 |
24 |
25 |
--------------------------------------------------------------------------------
/ComboBox/accountitem.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/ComboBox/accountitem.cpp
--------------------------------------------------------------------------------
/ComboBox/accountitem.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/ComboBox/accountitem.h
--------------------------------------------------------------------------------
/ComboBox/main.cpp:
--------------------------------------------------------------------------------
1 | #include "ComboBoxTest.h"
2 | #include
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 | QApplication::setEffectEnabled(Qt::UI_AnimateCombo, false);
8 | ComboBoxTest w;
9 | w.show();
10 | return a.exec();
11 | }
12 |
--------------------------------------------------------------------------------
/ComboBox/qrc/ico_gb_list.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/ComboBox/qrc/ico_gb_list.png
--------------------------------------------------------------------------------
/ComboBox/qrc/ico_sl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/ComboBox/qrc/ico_sl.png
--------------------------------------------------------------------------------
/ComboBox/qrc/ico_xia.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/ComboBox/qrc/ico_xia.png
--------------------------------------------------------------------------------
/ComboBox/qrc/qss/listWidget.qss:
--------------------------------------------------------------------------------
1 | QListWidget
2 | {
3 | outline:0px; /*去除item虚线框*/
4 | border-radius:20px;
5 | background: rgba(50,52,58,1);
6 | padding-top:10px;
7 | padding-bottom:10px;
8 | }
9 |
10 | QListWidget::item
11 | {
12 | margin-top:4px;
13 | margin-bootom:4px;
14 | height:56px;
15 | }
16 |
17 | QListWidget::item:selected
18 | {
19 | border-radius:8px;
20 | background:rgba(2, 3, 2, 0);
21 | }
22 |
23 | QListWidget::item:hover
24 | {
25 | border-radius:8px;
26 | background-color:rgba(2, 3, 2, 0.15);
27 | }
--------------------------------------------------------------------------------
/ComboBox/qrc/th-c1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/ComboBox/qrc/th-c1.png
--------------------------------------------------------------------------------
/ComboBox/qrc/th-c10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/ComboBox/qrc/th-c10.png
--------------------------------------------------------------------------------
/ComboBox/qrc/th-c11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/ComboBox/qrc/th-c11.png
--------------------------------------------------------------------------------
/ComboBox/qrc/th-c12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/ComboBox/qrc/th-c12.png
--------------------------------------------------------------------------------
/ComboBox/qrc/th-c13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/ComboBox/qrc/th-c13.png
--------------------------------------------------------------------------------
/ComboBox/qrc/th-c2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/ComboBox/qrc/th-c2.png
--------------------------------------------------------------------------------
/ComboBox/qrc/th-c3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/ComboBox/qrc/th-c3.png
--------------------------------------------------------------------------------
/ComboBox/qrc/th-c4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/ComboBox/qrc/th-c4.png
--------------------------------------------------------------------------------
/ComboBox/qrc/th-c5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/ComboBox/qrc/th-c5.png
--------------------------------------------------------------------------------
/ComboBox/qrc/th-c6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/ComboBox/qrc/th-c6.png
--------------------------------------------------------------------------------
/ComboBox/qrc/th-c7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/ComboBox/qrc/th-c7.png
--------------------------------------------------------------------------------
/ComboBox/qrc/th-c8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/ComboBox/qrc/th-c8.png
--------------------------------------------------------------------------------
/ComboBox/qrc/th-c9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/ComboBox/qrc/th-c9.png
--------------------------------------------------------------------------------
/ComboBox/vComboBox.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/ComboBox/vComboBox.cpp
--------------------------------------------------------------------------------
/ComboBox/vComboBox.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/ComboBox/vComboBox.h
--------------------------------------------------------------------------------
/DockWin/DockWin.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/DockWin/DockWin.cpp
--------------------------------------------------------------------------------
/DockWin/DockWin.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include "ui_DockWin.h"
5 |
6 | class DockWin : public QMainWindow
7 | {
8 | Q_OBJECT
9 |
10 | public:
11 | DockWin(QWidget *parent = Q_NULLPTR);
12 |
13 | private:
14 | Ui::DockWinClass ui;
15 | };
16 |
--------------------------------------------------------------------------------
/DockWin/DockWin.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/DockWin/DockWin.ui:
--------------------------------------------------------------------------------
1 |
2 | DockWinClass
3 |
4 |
5 | DockWinClass
6 |
7 |
8 |
9 | 0
10 | 0
11 | 600
12 | 400
13 |
14 |
15 |
16 | DockWin
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/DockWin/DockWin.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hh;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | qrc;rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 | {99349809-55BA-4b9d-BF79-8FDBB0286EB3}
18 | ui
19 |
20 |
21 | {639EADAA-A684-42e4-A9AD-28FC9BCB8F7C}
22 | ts
23 |
24 |
25 |
26 |
27 | Resource Files
28 |
29 |
30 | Form Files
31 |
32 |
33 | Header Files
34 |
35 |
36 | Source Files
37 |
38 |
39 |
40 |
41 | Source Files
42 |
43 |
44 |
--------------------------------------------------------------------------------
/DockWin/main.cpp:
--------------------------------------------------------------------------------
1 | #include "DockWin.h"
2 | #include
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 | DockWin w;
8 | w.show();
9 | return a.exec();
10 | }
11 |
--------------------------------------------------------------------------------
/DragObject/DragObject.h:
--------------------------------------------------------------------------------
1 | #ifndef MOVEWIDGET_H
2 | #define MOVEWIDGET_H
3 |
4 | /**
5 | * 通用控件移动类
6 | * 1. 可以指定需要移动的QObject
7 | * 2. 可设置是否限定鼠标左键拖动
8 | * 3. 支持任意QObject控件
9 | */
10 |
11 | #include
12 |
13 | #ifdef quc
14 | class Q_DECL_EXPORT MoveWidget : public QObject
15 | #else
16 | class DragObject : public QObject
17 | #endif
18 |
19 | {
20 | Q_OBJECT
21 | public:
22 | explicit DragObject(QObject *parent = 0);
23 |
24 | protected:
25 | bool eventFilter(QObject *watched, QEvent *event);
26 |
27 | private:
28 | QPoint lastPoint; //最后按下的坐标
29 | bool pressed; //鼠标是否按下
30 | bool leftButton; //限定鼠标左键
31 | bool inControl; //限定在容器内
32 | QWidget *widget = nullptr; //移动的控件
33 |
34 | public Q_SLOTS:
35 | //设置是否限定鼠标左键
36 | void setLeftButton(bool leftButton);
37 | //设置是否限定不能移出容器外面
38 | void setInControl(bool inControl);
39 | //设置要移动的控件
40 | void setWidget(QWidget *widget);
41 | };
42 |
43 | #endif // MOVEWIDGET_H
44 |
--------------------------------------------------------------------------------
/DragObject/DragObjectTestWidget.cpp:
--------------------------------------------------------------------------------
1 | #include "DragObjectTestWidget.h"
2 | #include "DragObject.h"
3 | #include
4 |
5 | DragObjectTestWidget::DragObjectTestWidget(QWidget *parent)
6 | : QWidget(parent)
7 | {
8 | ui.setupUi(this);
9 |
10 | DragObject *d1 = new DragObject(this);
11 | if (d1) {
12 | d1->setWidget(ui.widget);
13 | }
14 |
15 | DragObject *d2 = new DragObject(this);
16 | if (d2) {
17 | d2->setWidget(ui.progressBar);
18 | }
19 |
20 | DragObject *d3= new DragObject(this);
21 | if (d3) {
22 | d3->setWidget(ui.pushButton);
23 | }
24 |
25 | DragObject *d4 = new DragObject(this);
26 | if (d4) {
27 | d4->setWidget(ui.lcdNumber);
28 | }
29 |
30 | /*connect(ui.pushButton, &QPushButton::clicked, this, [=]() {
31 |
32 | QTimer::singleShot(1000, [=]() {
33 | close();
34 | });
35 |
36 | });*/
37 |
38 | }
39 |
40 | DragObjectTestWidget::~DragObjectTestWidget()
41 | {
42 | }
43 |
--------------------------------------------------------------------------------
/DragObject/DragObjectTestWidget.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include "ui_DragObjectTestWidget.h"
5 |
6 | class DragObjectTestWidget : public QWidget
7 | {
8 | Q_OBJECT
9 |
10 | public:
11 | DragObjectTestWidget(QWidget *parent = Q_NULLPTR);
12 | ~DragObjectTestWidget();
13 |
14 | private:
15 | Ui::DragObjectTestWidgetClass ui;
16 | };
17 |
--------------------------------------------------------------------------------
/DragObject/DragObjectTestWidget.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/DragObject/DragObjectTestWidget.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | DragObjectTestWidgetClass
4 |
5 |
6 |
7 | 0
8 | 0
9 | 890
10 | 617
11 |
12 |
13 |
14 | DragObjectTestWidget
15 |
16 |
17 |
18 |
19 | 30
20 | 40
21 | 341
22 | 181
23 |
24 |
25 |
26 | background-color: rgb(255, 0, 127);
27 |
28 |
29 |
30 |
31 |
32 | 40
33 | 250
34 | 171
35 | 41
36 |
37 |
38 |
39 | PushButton
40 |
41 |
42 |
43 |
44 |
45 | 50
46 | 390
47 | 171
48 | 71
49 |
50 |
51 |
52 | 24
53 |
54 |
55 |
56 |
57 |
58 | 540
59 | 70
60 | 191
61 | 91
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/DragObject/main.cpp:
--------------------------------------------------------------------------------
1 | #include "DragObjectTestWidget.h"
2 | #include
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 | DragObjectTestWidget w;
8 | w.show();
9 | return a.exec();
10 | }
11 |
--------------------------------------------------------------------------------
/GIF/1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GIF/1.gif
--------------------------------------------------------------------------------
/GIF/10.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GIF/10.gif
--------------------------------------------------------------------------------
/GIF/11.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GIF/11.gif
--------------------------------------------------------------------------------
/GIF/12.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GIF/12.gif
--------------------------------------------------------------------------------
/GIF/13.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GIF/13.gif
--------------------------------------------------------------------------------
/GIF/14.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GIF/14.gif
--------------------------------------------------------------------------------
/GIF/15.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GIF/15.gif
--------------------------------------------------------------------------------
/GIF/16.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GIF/16.gif
--------------------------------------------------------------------------------
/GIF/17.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GIF/17.gif
--------------------------------------------------------------------------------
/GIF/18.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GIF/18.gif
--------------------------------------------------------------------------------
/GIF/19.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GIF/19.gif
--------------------------------------------------------------------------------
/GIF/2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GIF/2.gif
--------------------------------------------------------------------------------
/GIF/20.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GIF/20.gif
--------------------------------------------------------------------------------
/GIF/21.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GIF/21.gif
--------------------------------------------------------------------------------
/GIF/22.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GIF/22.gif
--------------------------------------------------------------------------------
/GIF/23.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GIF/23.gif
--------------------------------------------------------------------------------
/GIF/24.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GIF/24.gif
--------------------------------------------------------------------------------
/GIF/25.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GIF/25.gif
--------------------------------------------------------------------------------
/GIF/26.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GIF/26.gif
--------------------------------------------------------------------------------
/GIF/27.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GIF/27.gif
--------------------------------------------------------------------------------
/GIF/28.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GIF/28.gif
--------------------------------------------------------------------------------
/GIF/29.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GIF/29.gif
--------------------------------------------------------------------------------
/GIF/3.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GIF/3.gif
--------------------------------------------------------------------------------
/GIF/4.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GIF/4.gif
--------------------------------------------------------------------------------
/GIF/5.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GIF/5.gif
--------------------------------------------------------------------------------
/GIF/6.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GIF/6.gif
--------------------------------------------------------------------------------
/GIF/7.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GIF/7.gif
--------------------------------------------------------------------------------
/GIF/8.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GIF/8.gif
--------------------------------------------------------------------------------
/GIF/9.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GIF/9.gif
--------------------------------------------------------------------------------
/GIF/rollingBox.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GIF/rollingBox.gif
--------------------------------------------------------------------------------
/GalleryWidget/GalleryWidget.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | qrc/1.jpg
4 | qrc/2.jpg
5 | qrc/3.jpg
6 | qrc/4.jpg
7 | qrc/5.jpg
8 | qrc/6.jpg
9 | qrc/7.jpg
10 | qrc/8.jpg
11 | qrc/9.jpg
12 | qrc/10.jpg
13 | qrc/11.jpg
14 | qrc/qss/whiteScrollbar.qss
15 |
16 |
17 |
--------------------------------------------------------------------------------
/GalleryWidget/galleryMainWidget.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GalleryWidget/galleryMainWidget.cpp
--------------------------------------------------------------------------------
/GalleryWidget/galleryMainWidget.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include "ui_galleryMainWidget.h"
5 |
6 | class GalleryMainWidget : public QWidget
7 | {
8 | Q_OBJECT
9 | public:
10 | explicit GalleryMainWidget(QWidget *parent = Q_NULLPTR);
11 | ~GalleryMainWidget();
12 |
13 | private:
14 | Ui::MainWidget ui;
15 | };
16 |
--------------------------------------------------------------------------------
/GalleryWidget/galleryphotowidget.h:
--------------------------------------------------------------------------------
1 | #ifndef GALLERYPHOTOWIDGET_H
2 | #define GALLERYPHOTOWIDGET_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include "waterzoombutton.h"
9 |
10 | struct GalleryPhotoData
11 | {
12 | QPixmap pixmap;
13 | QString title;
14 | QString subTitle;
15 | };
16 |
17 | class GalleryPhotoWidget : public WaterZoomButton
18 | {
19 | Q_OBJECT
20 | public:
21 | GalleryPhotoWidget(GalleryPhotoData data, QWidget* parent = nullptr);
22 |
23 | protected:
24 | void paintEvent(QPaintEvent* event);
25 |
26 | public:
27 | static int fixed_width, fixed_height;
28 | static int content_width, content_height;
29 | static int pixmap_width, pixmap_height;
30 | static QColor title_color;
31 | static QColor subTitle_color;
32 |
33 | private:
34 | QPixmap pixmap;
35 | QString title, subTitle;
36 | };
37 |
38 | #endif // GALLERYPHOTOWIDGET_H
39 |
--------------------------------------------------------------------------------
/GalleryWidget/gallerywidget.h:
--------------------------------------------------------------------------------
1 | #ifndef GALLERYWIDGET_H
2 | #define GALLERYWIDGET_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include "galleryphotowidget.h"
12 |
13 | class GalleryWidget : public QScrollArea
14 | {
15 | Q_OBJECT
16 | public:
17 | GalleryWidget(QWidget *parent = nullptr);
18 |
19 | void loadData(QList list);
20 | void resizeGallery(QPoint emit_pos = QPoint(0, 0));
21 |
22 | protected:
23 | void resizeEvent(QResizeEvent *event) override;
24 |
25 | signals:
26 | void signalPictureClicked(GalleryPhotoWidget* bean);
27 |
28 | public slots:
29 |
30 | public:
31 | static int item_spacing_h;
32 | static int item_spacing_v;
33 |
34 | private:
35 | QList widgets;
36 | QWidget* center_widget;
37 | };
38 |
39 | #endif // GALLERYWIDGET_H
40 |
--------------------------------------------------------------------------------
/GalleryWidget/interactivebuttonbase.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GalleryWidget/interactivebuttonbase.cpp
--------------------------------------------------------------------------------
/GalleryWidget/interactivebuttonbase.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GalleryWidget/interactivebuttonbase.h
--------------------------------------------------------------------------------
/GalleryWidget/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include "galleryMainWidget.h"
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 | GalleryMainWidget w;
8 | w.show();
9 | return a.exec();
10 | }
11 |
--------------------------------------------------------------------------------
/GalleryWidget/qrc/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GalleryWidget/qrc/1.jpg
--------------------------------------------------------------------------------
/GalleryWidget/qrc/10.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GalleryWidget/qrc/10.jpg
--------------------------------------------------------------------------------
/GalleryWidget/qrc/11.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GalleryWidget/qrc/11.jpg
--------------------------------------------------------------------------------
/GalleryWidget/qrc/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GalleryWidget/qrc/2.jpg
--------------------------------------------------------------------------------
/GalleryWidget/qrc/3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GalleryWidget/qrc/3.jpg
--------------------------------------------------------------------------------
/GalleryWidget/qrc/4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GalleryWidget/qrc/4.jpg
--------------------------------------------------------------------------------
/GalleryWidget/qrc/5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GalleryWidget/qrc/5.jpg
--------------------------------------------------------------------------------
/GalleryWidget/qrc/6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GalleryWidget/qrc/6.jpg
--------------------------------------------------------------------------------
/GalleryWidget/qrc/7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GalleryWidget/qrc/7.jpg
--------------------------------------------------------------------------------
/GalleryWidget/qrc/8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GalleryWidget/qrc/8.jpg
--------------------------------------------------------------------------------
/GalleryWidget/qrc/9.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GalleryWidget/qrc/9.jpg
--------------------------------------------------------------------------------
/GalleryWidget/waterzoombutton.cpp:
--------------------------------------------------------------------------------
1 | #include "waterzoombutton.h"
2 |
3 | WaterZoomButton::WaterZoomButton(QString text, QWidget *parent) : InteractiveButtonBase(text, parent)
4 | {
5 | choking = 10;
6 | radius_zoom = -1;
7 | choking_prop = 0;
8 | }
9 |
10 | void WaterZoomButton::setChoking(int c)
11 | {
12 | choking = c;
13 | }
14 |
15 | void WaterZoomButton::setChokingProp(double p)
16 | {
17 | choking = min(width(), height()) * p;
18 | choking_prop = p;
19 | }
20 |
21 | void WaterZoomButton::setRadiusZoom(int radius)
22 | {
23 | radius_zoom = radius;
24 | }
25 |
26 | void WaterZoomButton::setRadius(int x, int x2)
27 | {
28 | // 注意:最终绘制中只计算 x 的半径,无视 y 的半径
29 | InteractiveButtonBase::setRadius(x);
30 | radius_zoom = x2;
31 | }
32 |
33 | QPainterPath WaterZoomButton::getBgPainterPath()
34 | {
35 | QPainterPath path;
36 | int c;
37 | int r;
38 | if (!hover_progress)
39 | {
40 | c = choking;
41 | r = radius_x;
42 | }
43 | else
44 | {
45 | c = choking * (1 - getNolinearProg(hover_progress, hovering?FastSlower:SlowFaster));
46 | r = radius_zoom < 0 ? radius_x :
47 | radius_x + (radius_zoom-radius_x) * hover_progress / 100;
48 | }
49 |
50 | if (r)
51 | path.addRoundedRect(QRect(c,c,size().width()-c*2,size().height()-c*2), r, r);
52 | else
53 | path.addRect(QRect(c,c,size().width()-c*2,size().height()-c*2));
54 | return path;
55 | }
56 |
57 | void WaterZoomButton::resizeEvent(QResizeEvent *event)
58 | {
59 | InteractiveButtonBase::resizeEvent(event);
60 |
61 | if (qAbs(choking_prop)>0.0001)
62 | {
63 | choking = min(width(), height()) * choking_prop;
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/GalleryWidget/waterzoombutton.h:
--------------------------------------------------------------------------------
1 | #ifndef WATERZOOMBUTTON_H
2 | #define WATERZOOMBUTTON_H
3 |
4 | #include
5 | #include "interactivebuttonbase.h"
6 |
7 | class WaterZoomButton : public InteractiveButtonBase
8 | {
9 | public:
10 | WaterZoomButton(QString text = "", QWidget* parent = nullptr);
11 |
12 | void setChoking(int c);
13 | void setChokingProp(double p);
14 | void setRadiusZoom(int radius);
15 | void setRadius(int x, int x2);
16 |
17 | protected:
18 | QPainterPath getBgPainterPath() override;
19 | void resizeEvent(QResizeEvent *event) override;
20 |
21 | protected:
22 | int choking; // 向里缩的长度
23 | double choking_prop;
24 | int radius_zoom; // 收缩时的半径
25 | };
26 |
27 | #endif // WATERZOOMBUTTON_H
28 |
--------------------------------------------------------------------------------
/GraphicsEffect/GraphicsEffect.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GraphicsEffect/GraphicsEffect.cpp
--------------------------------------------------------------------------------
/GraphicsEffect/GraphicsEffect.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GraphicsEffect/GraphicsEffect.h
--------------------------------------------------------------------------------
/GraphicsEffect/GraphicsEffect.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | qrc/2.png
4 | qrc/3.png
5 | qrc/4.png
6 | qrc/1.png
7 |
8 |
9 |
--------------------------------------------------------------------------------
/GraphicsEffect/GraphicsEffect.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hh;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | qrc;rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 | {99349809-55BA-4b9d-BF79-8FDBB0286EB3}
18 | ui
19 |
20 |
21 | {639EADAA-A684-42e4-A9AD-28FC9BCB8F7C}
22 | ts
23 |
24 |
25 |
26 |
27 | Resource Files
28 |
29 |
30 | Form Files
31 |
32 |
33 | Header Files
34 |
35 |
36 | Source Files
37 |
38 |
39 |
40 |
41 | Source Files
42 |
43 |
44 |
--------------------------------------------------------------------------------
/GraphicsEffect/main.cpp:
--------------------------------------------------------------------------------
1 | #include "GraphicsEffect.h"
2 | #include
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 | GraphicsEffect w;
8 | w.show();
9 | return a.exec();
10 | }
11 |
--------------------------------------------------------------------------------
/GraphicsEffect/qrc/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GraphicsEffect/qrc/1.png
--------------------------------------------------------------------------------
/GraphicsEffect/qrc/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GraphicsEffect/qrc/2.png
--------------------------------------------------------------------------------
/GraphicsEffect/qrc/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GraphicsEffect/qrc/3.png
--------------------------------------------------------------------------------
/GraphicsEffect/qrc/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/GraphicsEffect/qrc/4.png
--------------------------------------------------------------------------------
/IconPanel/IconPanel.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | font/fa-regular-400.ttf
4 | font/fontawesome-webfont.ttf
5 | font/iconfont.ttf
6 | font/pe-icon-set-weather.ttf
7 |
8 |
9 |
--------------------------------------------------------------------------------
/IconPanel/IconPanelTest.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/IconPanel/IconPanelTest.cpp
--------------------------------------------------------------------------------
/IconPanel/IconPanelTest.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include "ui_IconPanelTest.h"
5 |
6 | class IconPanel : public QWidget
7 | {
8 | Q_OBJECT
9 |
10 | public:
11 | IconPanel(QWidget *parent = Q_NULLPTR);
12 |
13 | private:
14 | void initPanel1();
15 | void initPanel2();
16 | void initPanel3();
17 | void initPanel4();
18 | bool checkIcon(int icon);
19 |
20 | private slots:
21 | void sltToggled1(bool check);
22 | void sltToggled2(bool check);
23 | void sltToggled3(bool check);
24 | void sltToggled4(bool check);
25 |
26 | private:
27 | Ui::IconPanelClass ui;
28 |
29 | QList labs1;
30 | QList labs2;
31 | QList labs3;
32 | QList labs4;
33 | };
34 |
--------------------------------------------------------------------------------
/IconPanel/font/fa-regular-400.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/IconPanel/font/fa-regular-400.ttf
--------------------------------------------------------------------------------
/IconPanel/font/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/IconPanel/font/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/IconPanel/font/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/IconPanel/font/iconfont.ttf
--------------------------------------------------------------------------------
/IconPanel/font/pe-icon-set-weather.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/IconPanel/font/pe-icon-set-weather.ttf
--------------------------------------------------------------------------------
/IconPanel/main.cpp:
--------------------------------------------------------------------------------
1 | #include "IconPanelTest.h"
2 | #include
3 |
4 | int main(int argc, char *argv[]){
5 | QApplication a(argc, argv);
6 | IconPanel w;
7 | w.show();
8 | return a.exec();
9 | }
10 |
--------------------------------------------------------------------------------
/JsWithCpp/JsWithCpp.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/JsWithCpp/JsWithCpp.cpp
--------------------------------------------------------------------------------
/JsWithCpp/JsWithCpp.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include "ui_JsWithCpp.h"
5 |
6 | class JsWithCpp : public QWidget
7 | {
8 | Q_OBJECT
9 |
10 | public:
11 | JsWithCpp(QWidget *parent = Q_NULLPTR);
12 | ~JsWithCpp();
13 |
14 | private:
15 | void loadWeb();
16 |
17 | private slots:
18 | void parseWebMessage(const QString & message);
19 | void sendMessageToWeb();
20 |
21 | private:
22 | Ui::JsWithCppClass ui;
23 | };
24 |
--------------------------------------------------------------------------------
/JsWithCpp/WebLobby.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/JsWithCpp/WebLobby.cpp
--------------------------------------------------------------------------------
/JsWithCpp/WebLobby.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/JsWithCpp/WebLobby.h
--------------------------------------------------------------------------------
/JsWithCpp/main.cpp:
--------------------------------------------------------------------------------
1 | #include "JsWithCpp.h"
2 | #include
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 | qputenv("QTWEBENGINE_REMOTE_DEBUGGING", "9999");
8 | JsWithCpp w;
9 | w.show();
10 | return a.exec();
11 | }
12 |
--------------------------------------------------------------------------------
/JsWithCpp/qrc/JsWithCpp.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | qwebchannel.js
4 | index.html
5 |
6 |
7 |
--------------------------------------------------------------------------------
/LineEdit/LineEdit.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/LineEdit/LineEdit.cpp
--------------------------------------------------------------------------------
/LineEdit/LineEdit.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include "ui_LineEdit.h"
5 |
6 | class LineEdit : public QWidget
7 | {
8 | Q_OBJECT
9 |
10 | public:
11 | LineEdit(QWidget *parent = Q_NULLPTR);
12 | ~LineEdit();
13 |
14 | private slots:
15 | void sltNumLimitToggled(bool check);
16 | void sltNumLetterLimitToggled(bool check);
17 | void sltNoLimitToggled(bool check);
18 | void sltLimitChInput();
19 | void sltLimitInputLength();
20 | void sltInputIsPassWord();
21 | void sltTextEdited(const QString& text);
22 |
23 | private:
24 | Ui::LineEditClass ui;
25 |
26 | QValidator *validator1 = nullptr;
27 | QValidator *validator2 = nullptr;
28 | QValidator *validator3 = nullptr;
29 |
30 | bool m_IsLimitChInput = true;
31 | bool m_IsPassWordInput = false;
32 |
33 | QStringList m_userIdList = QStringList();
34 | QString m_oldLineEditText = QString();
35 | QCompleter *m_completer = nullptr;
36 | };
37 |
--------------------------------------------------------------------------------
/LineEdit/LineEdit.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | qrc/ico_gb_wxz.png
4 | qrc/ico_gb_xz.png
5 |
6 |
7 |
--------------------------------------------------------------------------------
/LineEdit/LineEdit.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hh;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | qrc;rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 | {99349809-55BA-4b9d-BF79-8FDBB0286EB3}
18 | ui
19 |
20 |
21 | {639EADAA-A684-42e4-A9AD-28FC9BCB8F7C}
22 | ts
23 |
24 |
25 |
26 |
27 | Resource Files
28 |
29 |
30 | Form Files
31 |
32 |
33 | Header Files
34 |
35 |
36 | Source Files
37 |
38 |
39 |
40 |
41 | Source Files
42 |
43 |
44 |
--------------------------------------------------------------------------------
/LineEdit/main.cpp:
--------------------------------------------------------------------------------
1 | #include "LineEdit.h"
2 | #include
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 | LineEdit w;
8 | w.show();
9 | return a.exec();
10 | }
11 |
--------------------------------------------------------------------------------
/LineEdit/qrc/ico_gb_wxz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/LineEdit/qrc/ico_gb_wxz.png
--------------------------------------------------------------------------------
/LineEdit/qrc/ico_gb_xz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/LineEdit/qrc/ico_gb_xz.png
--------------------------------------------------------------------------------
/Lrc/Lrc.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/Lrc/Lrc.cpp
--------------------------------------------------------------------------------
/Lrc/Lrc.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/Lrc/Lrc.h
--------------------------------------------------------------------------------
/Lrc/Lrc.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Lrc/Lrc.ui:
--------------------------------------------------------------------------------
1 |
2 | LrcClass
3 |
4 |
5 | LrcClass
6 |
7 |
8 |
9 | 0
10 | 0
11 | 600
12 | 400
13 |
14 |
15 |
16 | Lrc
17 | $centralwidget$
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/Lrc/Lrc.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hh;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | qrc;rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 | {99349809-55BA-4b9d-BF79-8FDBB0286EB3}
18 | ui
19 |
20 |
21 | {639EADAA-A684-42e4-A9AD-28FC9BCB8F7C}
22 | ts
23 |
24 |
25 |
26 |
27 | Resource Files
28 |
29 |
30 | Form Files
31 |
32 |
33 | Header Files
34 |
35 |
36 | Source Files
37 |
38 |
39 |
40 |
41 | Source Files
42 |
43 |
44 |
--------------------------------------------------------------------------------
/Lrc/main.cpp:
--------------------------------------------------------------------------------
1 | #include "Lrc.h"
2 | #include
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 | Lrc w;
8 | w.show();
9 | return a.exec();
10 | }
11 |
--------------------------------------------------------------------------------
/SmoothScrollBarTest/SmoothScrollArea.cpp:
--------------------------------------------------------------------------------
1 | #include "smoothScrollArea.h"
2 | #include
3 | #include
4 | #include
5 | #include
6 |
7 | SmoothScrollArea::SmoothScrollArea(QWidget *parent) : QScrollArea(parent)
8 | {
9 | vScrollBar = new SmoothScrollBar();
10 | vScrollBar->setOrientation(Qt::Orientation::Vertical);
11 | setVerticalScrollBar(vScrollBar);
12 |
13 | }
14 |
15 | void SmoothScrollArea::InitSmoothScrollArea()
16 | {
17 | auto layout = new QVBoxLayout;
18 | QWidget* w = new QWidget;
19 | for (int i = 0; i < 100; i++) {
20 | QFont font;
21 | font.setPointSize(12);
22 | auto a = new QLabel(QString::number(i));
23 | a->setFont(font);
24 | layout->addWidget(a);
25 | }
26 | w->setLayout(layout);
27 | setWidget(w);
28 | }
29 |
30 | void SmoothScrollArea::wheelEvent(QWheelEvent *e)
31 | {
32 | vScrollBar->scroll(e->angleDelta().y());
33 | }
34 |
--------------------------------------------------------------------------------
/SmoothScrollBarTest/SmoothScrollArea.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 | #include "smoothscrollbar.h"
6 |
7 | class SmoothScrollArea : public QScrollArea
8 | {
9 | Q_OBJECT
10 |
11 | public:
12 | explicit SmoothScrollArea(QWidget *parent = nullptr);
13 |
14 | void InitSmoothScrollArea();
15 |
16 | private:
17 | SmoothScrollBar* vScrollBar;
18 | void wheelEvent(QWheelEvent* e);
19 | };
20 |
--------------------------------------------------------------------------------
/SmoothScrollBarTest/SmoothScrollBar.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/SmoothScrollBarTest/SmoothScrollBar.cpp
--------------------------------------------------------------------------------
/SmoothScrollBarTest/SmoothScrollBar.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 |
6 | class SmoothScrollBar : public QScrollBar
7 | {
8 | Q_OBJECT
9 | public:
10 | SmoothScrollBar(QWidget *parent=nullptr);
11 |
12 | private:
13 | void mousePressEvent(QMouseEvent *) override;
14 | void mouseReleaseEvent(QMouseEvent *) override;
15 | void mouseMoveEvent(QMouseEvent *) override;
16 |
17 | public slots:
18 | void setValue(int value);
19 | void scroll(int value);
20 |
21 | private:
22 | QPropertyAnimation *m_scrollAni = nullptr;
23 | int m_targetValue = 0;
24 |
25 | };
26 |
--------------------------------------------------------------------------------
/SmoothScrollBarTest/SmoothScrollBarTest.cpp:
--------------------------------------------------------------------------------
1 | #include "SmoothScrollBarTest.h"
2 | #include "SmoothScrollArea.h"
3 |
4 | SmoothScrollBarTest::SmoothScrollBarTest(QWidget *parent)
5 | : QMainWindow(parent)
6 | {
7 | ui.setupUi(this);
8 | SmoothScrollArea *area = new SmoothScrollArea();
9 | area->InitSmoothScrollArea();
10 | setCentralWidget(area);
11 | }
12 |
13 | SmoothScrollBarTest::~SmoothScrollBarTest()
14 | {}
15 |
--------------------------------------------------------------------------------
/SmoothScrollBarTest/SmoothScrollBarTest.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include "ui_SmoothScrollBarTest.h"
5 |
6 | class SmoothScrollBarTest : public QMainWindow
7 | {
8 | Q_OBJECT
9 |
10 | public:
11 | SmoothScrollBarTest(QWidget *parent = nullptr);
12 | ~SmoothScrollBarTest();
13 |
14 | private:
15 | Ui::SmoothScrollBarTestClass ui;
16 | };
17 |
--------------------------------------------------------------------------------
/SmoothScrollBarTest/SmoothScrollBarTest.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | qrc/qss/blackScrollbar.qss
4 | qrc/qss/whiteScrollbar.qss
5 |
6 |
7 |
--------------------------------------------------------------------------------
/SmoothScrollBarTest/SmoothScrollBarTest.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | SmoothScrollBarTestClass
4 |
5 |
6 |
7 | 0
8 | 0
9 | 600
10 | 400
11 |
12 |
13 |
14 | SmoothScrollBarTest
15 |
16 |
17 |
18 |
19 |
20 |
21 |
31 |
32 |
33 | TopToolBarArea
34 |
35 |
36 | false
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/SmoothScrollBarTest/main.cpp:
--------------------------------------------------------------------------------
1 | #include "SmoothScrollBarTest.h"
2 | #include
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 | SmoothScrollBarTest w;
8 | w.show();
9 | return a.exec();
10 | }
11 |
--------------------------------------------------------------------------------
/SysteamTrayTest/SysteamTrayManager.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/SysteamTrayTest/SysteamTrayManager.cpp
--------------------------------------------------------------------------------
/SysteamTrayTest/SysteamTrayManager.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/SysteamTrayTest/SysteamTrayManager.h
--------------------------------------------------------------------------------
/SysteamTrayTest/SysteamTrayTest.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/SysteamTrayTest/SysteamTrayTest.cpp
--------------------------------------------------------------------------------
/SysteamTrayTest/SysteamTrayTest.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/SysteamTrayTest/SysteamTrayTest.h
--------------------------------------------------------------------------------
/SysteamTrayTest/SysteamTrayTest.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | qrc/1.jpg
4 | qrc/ic_gb.png
5 | qrc/Qt.png
6 | qrc/ico_gb_wxz.png
7 | qrc/ico_gb_xz.png
8 | qrc/ico_gx_nor.png
9 | qrc/ico_gx_sel.png
10 | qrc/1.png
11 |
12 |
13 |
--------------------------------------------------------------------------------
/SysteamTrayTest/SystemTrayWarn.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/SysteamTrayTest/SystemTrayWarn.cpp
--------------------------------------------------------------------------------
/SysteamTrayTest/SystemTrayWarn.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/SysteamTrayTest/SystemTrayWarn.h
--------------------------------------------------------------------------------
/SysteamTrayTest/common.ini:
--------------------------------------------------------------------------------
1 | [config]
2 | status=2
3 |
--------------------------------------------------------------------------------
/SysteamTrayTest/main.cpp:
--------------------------------------------------------------------------------
1 | #include "SysteamTrayTest.h"
2 | #include
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 | qApp->setQuitOnLastWindowClosed(false);
8 | SysteamTrayTest w;
9 | w.show();
10 | return a.exec();
11 | }
12 |
--------------------------------------------------------------------------------
/SysteamTrayTest/qrc/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/SysteamTrayTest/qrc/1.jpg
--------------------------------------------------------------------------------
/SysteamTrayTest/qrc/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/SysteamTrayTest/qrc/1.png
--------------------------------------------------------------------------------
/SysteamTrayTest/qrc/Qt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/SysteamTrayTest/qrc/Qt.png
--------------------------------------------------------------------------------
/SysteamTrayTest/qrc/ic_gb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/SysteamTrayTest/qrc/ic_gb.png
--------------------------------------------------------------------------------
/SysteamTrayTest/qrc/ico_gb_wxz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/SysteamTrayTest/qrc/ico_gb_wxz.png
--------------------------------------------------------------------------------
/SysteamTrayTest/qrc/ico_gb_xz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/SysteamTrayTest/qrc/ico_gb_xz.png
--------------------------------------------------------------------------------
/SysteamTrayTest/qrc/ico_gx_nor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/SysteamTrayTest/qrc/ico_gx_nor.png
--------------------------------------------------------------------------------
/SysteamTrayTest/qrc/ico_gx_sel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/SysteamTrayTest/qrc/ico_gx_sel.png
--------------------------------------------------------------------------------
/Verification/Verification.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/Verification/Verification.cpp
--------------------------------------------------------------------------------
/Verification/Verification.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/Verification/Verification.h
--------------------------------------------------------------------------------
/Verification/Verification.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Verification/Verification.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hh;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | qrc;rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 | {99349809-55BA-4b9d-BF79-8FDBB0286EB3}
18 | ui
19 |
20 |
21 | {639EADAA-A684-42e4-A9AD-28FC9BCB8F7C}
22 | ts
23 |
24 |
25 |
26 |
27 | Resource Files
28 |
29 |
30 | Form Files
31 |
32 |
33 | Header Files
34 |
35 |
36 | Source Files
37 |
38 |
39 |
40 |
41 | Source Files
42 |
43 |
44 | Source Files
45 |
46 |
47 |
48 |
49 | Header Files
50 |
51 |
52 |
--------------------------------------------------------------------------------
/Verification/VerificationTest.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/Verification/VerificationTest.cpp
--------------------------------------------------------------------------------
/Verification/VerificationTest.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include "ui_VerificationTest.h"
5 |
6 | class VerificationTest : public QWidget
7 | {
8 | Q_OBJECT
9 |
10 | public:
11 | VerificationTest(QWidget *parent = Q_NULLPTR);
12 | ~VerificationTest();
13 |
14 | private slots:
15 | void sltVerficationCodeBtn();
16 |
17 | private:
18 | Ui::VerificationClass ui;
19 | };
20 |
--------------------------------------------------------------------------------
/Verification/main.cpp:
--------------------------------------------------------------------------------
1 | #include "VerificationTest.h"
2 | #include
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 | VerificationTest w;
8 | w.show();
9 | return a.exec();
10 | }
11 |
--------------------------------------------------------------------------------
/animation/animationTest.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/animation/animationTest.cpp
--------------------------------------------------------------------------------
/animation/animationTest.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/animation/animationTest.h
--------------------------------------------------------------------------------
/animation/animationTest.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | qrc/th-c1.png
4 | qrc/th-c2.png
5 | qrc/th-c3.png
6 | qrc/th-c4.png
7 | qrc/th-c5.png
8 | qrc/th-c6.png
9 | qrc/th-c7.png
10 | qrc/th-c8.png
11 | qrc/th-c9.png
12 | qrc/th-c10.png
13 | qrc/th-c11.png
14 | qrc/th-c12.png
15 | qrc/th-c13.png
16 |
17 |
18 | qrc/number/z0.png
19 | qrc/number/z1.png
20 | qrc/number/z2.png
21 | qrc/number/z3.png
22 | qrc/number/z4.png
23 | qrc/number/z5.png
24 | qrc/number/z6.png
25 | qrc/number/z7.png
26 | qrc/number/z8.png
27 | qrc/number/z9.png
28 | qrc/number/zx.png
29 |
30 |
31 |
--------------------------------------------------------------------------------
/animation/combo.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/animation/combo.cpp
--------------------------------------------------------------------------------
/animation/combo.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/animation/combo.h
--------------------------------------------------------------------------------
/animation/combo.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | comBo
4 |
5 |
6 |
7 | 0
8 | 0
9 | 400
10 | 150
11 |
12 |
13 |
14 | Form
15 |
16 |
17 |
18 |
19 | 25
20 | 25
21 | 350
22 | 100
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/animation/main.cpp:
--------------------------------------------------------------------------------
1 | #include "animationTest.h"
2 | #include
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 | animationTest w;
8 | w.show();
9 | return a.exec();
10 | }
11 |
--------------------------------------------------------------------------------
/animation/popAnimation.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/animation/popAnimation.cpp
--------------------------------------------------------------------------------
/animation/popAnimation.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/animation/popAnimation.h
--------------------------------------------------------------------------------
/animation/qrc/number/z0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/animation/qrc/number/z0.png
--------------------------------------------------------------------------------
/animation/qrc/number/z1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/animation/qrc/number/z1.png
--------------------------------------------------------------------------------
/animation/qrc/number/z2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/animation/qrc/number/z2.png
--------------------------------------------------------------------------------
/animation/qrc/number/z3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/animation/qrc/number/z3.png
--------------------------------------------------------------------------------
/animation/qrc/number/z4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/animation/qrc/number/z4.png
--------------------------------------------------------------------------------
/animation/qrc/number/z5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/animation/qrc/number/z5.png
--------------------------------------------------------------------------------
/animation/qrc/number/z6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/animation/qrc/number/z6.png
--------------------------------------------------------------------------------
/animation/qrc/number/z7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/animation/qrc/number/z7.png
--------------------------------------------------------------------------------
/animation/qrc/number/z8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/animation/qrc/number/z8.png
--------------------------------------------------------------------------------
/animation/qrc/number/z9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/animation/qrc/number/z9.png
--------------------------------------------------------------------------------
/animation/qrc/number/zx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/animation/qrc/number/zx.png
--------------------------------------------------------------------------------
/animation/qrc/th-c1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/animation/qrc/th-c1.png
--------------------------------------------------------------------------------
/animation/qrc/th-c10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/animation/qrc/th-c10.png
--------------------------------------------------------------------------------
/animation/qrc/th-c11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/animation/qrc/th-c11.png
--------------------------------------------------------------------------------
/animation/qrc/th-c12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/animation/qrc/th-c12.png
--------------------------------------------------------------------------------
/animation/qrc/th-c13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/animation/qrc/th-c13.png
--------------------------------------------------------------------------------
/animation/qrc/th-c2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/animation/qrc/th-c2.png
--------------------------------------------------------------------------------
/animation/qrc/th-c3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/animation/qrc/th-c3.png
--------------------------------------------------------------------------------
/animation/qrc/th-c4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/animation/qrc/th-c4.png
--------------------------------------------------------------------------------
/animation/qrc/th-c5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/animation/qrc/th-c5.png
--------------------------------------------------------------------------------
/animation/qrc/th-c6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/animation/qrc/th-c6.png
--------------------------------------------------------------------------------
/animation/qrc/th-c7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/animation/qrc/th-c7.png
--------------------------------------------------------------------------------
/animation/qrc/th-c8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/animation/qrc/th-c8.png
--------------------------------------------------------------------------------
/animation/qrc/th-c9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/animation/qrc/th-c9.png
--------------------------------------------------------------------------------
/animation/rotationLabel.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/animation/rotationLabel.cpp
--------------------------------------------------------------------------------
/animation/rotationLabel.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/animation/rotationLabel.h
--------------------------------------------------------------------------------
/banner/QBannerWidget.h:
--------------------------------------------------------------------------------
1 | #ifndef QBANNERWIDGET_H
2 | #define QBANNERWIDGET_H
3 |
4 | #include
5 | #include
6 |
7 | class QParallelAnimationGroup;
8 | class QPropertyAnimation;
9 |
10 | enum emAnimationType {
11 | UnKnow = -1,
12 | Next = 0,
13 | Prev = 1,
14 | Jump,
15 | };
16 |
17 | class QBannerWidget : public QWidget
18 | {
19 | Q_OBJECT
20 |
21 | public:
22 | QBannerWidget(QWidget *parent);
23 | ~QBannerWidget();
24 |
25 | public:
26 | void addImage(const QString &image);
27 | void setImageSize(QSize size);
28 |
29 | public slots:
30 | void sltNext();
31 | void sltPrev();
32 | void sltJump(int index);
33 |
34 | protected:
35 | void paintEvent(QPaintEvent *event);
36 |
37 | private:
38 | void drawLeft(QPainter *painter);
39 | void drawCenter(QPainter *painter);
40 | void drawRight(QPainter *painter);
41 | QImage getGrayImage(const QImage &image);
42 |
43 | private slots:
44 | void slot_ValueChanged(const QVariant &value);
45 | void slot_finished();
46 |
47 | private:
48 | QStringList x_imageList;
49 | int x_index;
50 | bool x_isAnimation;
51 | QParallelAnimationGroup *x_pAnimationGroup = nullptr;
52 | QPropertyAnimation *x_pLeftAnimation = nullptr;
53 | QPropertyAnimation *x_pCenterAnimation = nullptr;
54 | QPropertyAnimation *x_pRightAnimation = nullptr;
55 | emAnimationType x_animationType;
56 | QRect x_leftRect, x_centerRect, x_rightRect;
57 | };
58 |
59 | #endif
60 |
--------------------------------------------------------------------------------
/banner/Resources/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/banner/Resources/1.jpg
--------------------------------------------------------------------------------
/banner/Resources/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/banner/Resources/1.png
--------------------------------------------------------------------------------
/banner/Resources/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/banner/Resources/2.jpg
--------------------------------------------------------------------------------
/banner/Resources/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/banner/Resources/2.png
--------------------------------------------------------------------------------
/banner/Resources/3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/banner/Resources/3.jpg
--------------------------------------------------------------------------------
/banner/Resources/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/banner/Resources/3.png
--------------------------------------------------------------------------------
/banner/Resources/4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/banner/Resources/4.jpg
--------------------------------------------------------------------------------
/banner/Resources/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/banner/Resources/4.png
--------------------------------------------------------------------------------
/banner/Resources/5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/banner/Resources/5.jpg
--------------------------------------------------------------------------------
/banner/Resources/5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/banner/Resources/5.png
--------------------------------------------------------------------------------
/banner/Resources/6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/banner/Resources/6.jpg
--------------------------------------------------------------------------------
/banner/Resources/6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/banner/Resources/6.png
--------------------------------------------------------------------------------
/banner/Resources/7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/banner/Resources/7.jpg
--------------------------------------------------------------------------------
/banner/Resources/7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/banner/Resources/7.png
--------------------------------------------------------------------------------
/banner/Resources/8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/banner/Resources/8.jpg
--------------------------------------------------------------------------------
/banner/Resources/8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/banner/Resources/8.png
--------------------------------------------------------------------------------
/banner/Resources/left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/banner/Resources/left.png
--------------------------------------------------------------------------------
/banner/Resources/lefthover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/banner/Resources/lefthover.png
--------------------------------------------------------------------------------
/banner/Resources/right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/banner/Resources/right.png
--------------------------------------------------------------------------------
/banner/Resources/righthover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/banner/Resources/righthover.png
--------------------------------------------------------------------------------
/banner/banner.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | Resources/1.png
4 | Resources/2.png
5 | Resources/3.png
6 | Resources/4.png
7 | Resources/5.png
8 | Resources/6.png
9 | Resources/7.png
10 | Resources/8.png
11 | Resources/left.png
12 | Resources/right.png
13 | Resources/lefthover.png
14 | Resources/righthover.png
15 |
16 |
17 |
--------------------------------------------------------------------------------
/banner/banner.rar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/banner/banner.rar
--------------------------------------------------------------------------------
/banner/banner.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hh;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | qrc;rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 | {99349809-55BA-4b9d-BF79-8FDBB0286EB3}
18 | ui
19 |
20 |
21 | {639EADAA-A684-42e4-A9AD-28FC9BCB8F7C}
22 | ts
23 |
24 |
25 |
26 |
27 | Resource Files
28 |
29 |
30 | Form Files
31 |
32 |
33 | Header Files
34 |
35 |
36 | Source Files
37 |
38 |
39 |
40 |
41 | Source Files
42 |
43 |
44 | Source Files
45 |
46 |
47 |
48 |
49 | Header Files
50 |
51 |
52 |
--------------------------------------------------------------------------------
/banner/bannerTest.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/banner/bannerTest.cpp
--------------------------------------------------------------------------------
/banner/bannerTest.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/banner/bannerTest.h
--------------------------------------------------------------------------------
/banner/main.cpp:
--------------------------------------------------------------------------------
1 | #include "bannerTest.h"
2 | #include
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 | bannerTest w;
8 | w.show();
9 | return a.exec();
10 | }
11 |
--------------------------------------------------------------------------------
/carouselLabel/carouselLabel.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/carouselLabel/carouselLabel.cpp
--------------------------------------------------------------------------------
/carouselLabel/carouselLabel.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 | #include
6 |
7 | class QButtonGroup;
8 | class QHBoxLayout;
9 | class QPropertyAnimation;
10 | class QSequentialAnimationGroup;
11 | class QParallelAnimationGroup;
12 |
13 | class CarouselLabel : public QLabel
14 | {
15 | Q_OBJECT
16 | public:
17 | CarouselLabel(QWidget *parent = Q_NULLPTR);
18 | ~CarouselLabel();
19 |
20 | void addImage(const QList>& imagepathpairlst);
21 |
22 | private:
23 | void initControl();
24 |
25 | private slots:
26 | void sltbuttonClicked(int);
27 | void sltImagevalueChanged(const QVariant & variant);
28 | void sltBtnExpvalueChanged(const QVariant & variant);
29 | void sltBtnShrikvalueChanged(const QVariant & variant);
30 | void sltImageShowTimeOut();
31 |
32 | private:
33 | void paintEvent(QPaintEvent *event);
34 | virtual void resizeEvent(QResizeEvent *event);
35 | void wheelEvent(QWheelEvent *event);
36 |
37 | private:
38 | int m_offset;
39 | int m_curIndex;
40 | int m_preIndex;
41 | bool m_blefttoright;
42 | QButtonGroup *m_btnGroup = nullptr;
43 | QParallelAnimationGroup *m_btnParalGroup = nullptr;
44 | QPropertyAnimation *m_imageAnimation = nullptr;
45 | QPropertyAnimation *m_btnShrikAnimation = nullptr;
46 | QPropertyAnimation *m_btnExpAnimation = nullptr;
47 | QWidget *m_horizontalLayoutWidget = nullptr;
48 | QHBoxLayout *m_switchBtnLayout = nullptr;
49 | QTimer m_imageTimer;
50 | QTimer m_sleepTimer;
51 | bool m_sleepFinsh;
52 | QList> m_imagepathpairlst;
53 | };
--------------------------------------------------------------------------------
/carouselLabel/carouselLabel.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | image/1.jpg
4 | image/2.jpg
5 | image/3.jpg
6 | image/4.jpg
7 | image/5.jpg
8 | image/6.jpg
9 | image/7.jpg
10 | image/8.jpg
11 | image/9.jpg
12 | image/10.jpg
13 | image/11.jpg
14 | image/12.jpg
15 | image/bg.jpg
16 |
17 |
18 |
--------------------------------------------------------------------------------
/carouselLabel/carouselLabelTest.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/carouselLabel/carouselLabelTest.cpp
--------------------------------------------------------------------------------
/carouselLabel/carouselLabelTest.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include "ui_carouselLabelTest.h"
5 |
6 | class carouselLabelTest : public QWidget
7 | {
8 | Q_OBJECT
9 |
10 | public:
11 | carouselLabelTest(QWidget *parent = Q_NULLPTR);
12 | ~carouselLabelTest();
13 |
14 | private:
15 | Ui::carouselLabelClass ui;
16 | };
17 |
--------------------------------------------------------------------------------
/carouselLabel/carouselLabelTest.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | carouselLabelClass
4 |
5 |
6 |
7 | 0
8 | 0
9 | 506
10 | 313
11 |
12 |
13 |
14 | carouselLabel
15 |
16 |
17 |
18 | 0
19 |
20 |
21 | 20
22 |
23 |
24 | 20
25 |
26 |
27 | 20
28 |
29 |
30 | 20
31 |
32 | -
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | CarouselLabel
45 | QLabel
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/carouselLabel/image/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/carouselLabel/image/1.jpg
--------------------------------------------------------------------------------
/carouselLabel/image/10.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/carouselLabel/image/10.jpg
--------------------------------------------------------------------------------
/carouselLabel/image/11.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/carouselLabel/image/11.jpg
--------------------------------------------------------------------------------
/carouselLabel/image/12.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/carouselLabel/image/12.jpg
--------------------------------------------------------------------------------
/carouselLabel/image/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/carouselLabel/image/2.jpg
--------------------------------------------------------------------------------
/carouselLabel/image/3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/carouselLabel/image/3.jpg
--------------------------------------------------------------------------------
/carouselLabel/image/4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/carouselLabel/image/4.jpg
--------------------------------------------------------------------------------
/carouselLabel/image/5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/carouselLabel/image/5.jpg
--------------------------------------------------------------------------------
/carouselLabel/image/6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/carouselLabel/image/6.jpg
--------------------------------------------------------------------------------
/carouselLabel/image/7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/carouselLabel/image/7.jpg
--------------------------------------------------------------------------------
/carouselLabel/image/8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/carouselLabel/image/8.jpg
--------------------------------------------------------------------------------
/carouselLabel/image/9.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/carouselLabel/image/9.jpg
--------------------------------------------------------------------------------
/carouselLabel/image/bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/carouselLabel/image/bg.jpg
--------------------------------------------------------------------------------
/carouselLabel/main.cpp:
--------------------------------------------------------------------------------
1 | #include "carouselLabelTest.h"
2 | #include
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 | carouselLabelTest w;
8 | w.show();
9 | return a.exec();
10 | }
11 |
--------------------------------------------------------------------------------
/changeUserInfo/LabelToast.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/changeUserInfo/LabelToast.cpp
--------------------------------------------------------------------------------
/changeUserInfo/LabelToast.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/changeUserInfo/LabelToast.h
--------------------------------------------------------------------------------
/changeUserInfo/LabelToast.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | toastAuto
4 |
5 |
6 |
7 | 0
8 | 0
9 | 654
10 | 51
11 |
12 |
13 |
14 | Form
15 |
16 |
17 |
18 | 0
19 |
20 |
21 | 0
22 |
23 |
24 | 0
25 |
26 |
27 | 0
28 |
29 |
30 | 0
31 |
32 | -
33 |
34 |
35 | -
36 |
37 |
38 | Qt::Horizontal
39 |
40 |
41 |
42 | 651
43 | 20
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/changeUserInfo/baseInfoWidget.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/changeUserInfo/baseInfoWidget.cpp
--------------------------------------------------------------------------------
/changeUserInfo/baseInfoWidget.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/changeUserInfo/baseInfoWidget.h
--------------------------------------------------------------------------------
/changeUserInfo/birthInfoWidget.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/changeUserInfo/birthInfoWidget.cpp
--------------------------------------------------------------------------------
/changeUserInfo/birthInfoWidget.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/changeUserInfo/birthInfoWidget.h
--------------------------------------------------------------------------------
/changeUserInfo/changeUserInfo.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/changeUserInfo/changeUserInfo.cpp
--------------------------------------------------------------------------------
/changeUserInfo/changeUserInfo.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/changeUserInfo/changeUserInfo.h
--------------------------------------------------------------------------------
/changeUserInfo/changeUserInfo.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | qrc/ico_yyf_14_gb.png
4 | qrc/ico_zkt_18_sx.png
5 | qrc/ico_gb_wxz.png
6 | qrc/ico_gb_xz.png
7 | qrc/ylf_icon_wsm.png
8 | qrc/icon_sq.png
9 | qrc/icon_zk.png
10 | qrc/iconly_light_outline_search.png
11 |
12 |
13 | qrc/qss/whiteScrollbar.qss
14 |
15 |
16 |
--------------------------------------------------------------------------------
/changeUserInfo/emotionWidget.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/changeUserInfo/emotionWidget.cpp
--------------------------------------------------------------------------------
/changeUserInfo/emotionWidget.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/changeUserInfo/emotionWidget.h
--------------------------------------------------------------------------------
/changeUserInfo/gameInfoWidget.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/changeUserInfo/gameInfoWidget.cpp
--------------------------------------------------------------------------------
/changeUserInfo/gameInfoWidget.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/changeUserInfo/gameInfoWidget.h
--------------------------------------------------------------------------------
/changeUserInfo/imageTool.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/changeUserInfo/imageTool.cpp
--------------------------------------------------------------------------------
/changeUserInfo/imageTool.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 |
5 | QPixmap getRoundRectPixmap(QPixmap srcPixMap, const QSize & size, int radius);
6 |
--------------------------------------------------------------------------------
/changeUserInfo/likeGameConfig.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/changeUserInfo/likeGameConfig.cpp
--------------------------------------------------------------------------------
/changeUserInfo/likeGameConfig.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/changeUserInfo/likeGameConfig.h
--------------------------------------------------------------------------------
/changeUserInfo/logoItem.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/changeUserInfo/logoItem.cpp
--------------------------------------------------------------------------------
/changeUserInfo/logoItem.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/changeUserInfo/logoItem.h
--------------------------------------------------------------------------------
/changeUserInfo/main.cpp:
--------------------------------------------------------------------------------
1 | #include "changeUserInfo.h"
2 | #include
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 | changeUserInfo w;
8 | w.show();
9 | return a.exec();
10 | }
11 |
--------------------------------------------------------------------------------
/changeUserInfo/pinyin.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/changeUserInfo/pinyin.cpp
--------------------------------------------------------------------------------
/changeUserInfo/pinyin.h:
--------------------------------------------------------------------------------
1 | #ifndef PINYIN_H
2 | #define PINYIN_H
3 |
4 | #include
5 |
6 | QString firstPinYinLetter(const QString &str);
7 |
8 | #endif // PINYIN_H
9 |
--------------------------------------------------------------------------------
/changeUserInfo/qrc/1000-23A98AF33723EB82D5AC9FBD44A4F7EA:
--------------------------------------------------------------------------------
1 | {"keys":["gameId","gameName"],"values":[["1","王者荣耀"],["2","明日之后"],["3","绝地求生:刺激战场"],["4","绝地求生:全军出击"],["5","阴阳师"],["6","传奇世界"],["7","球球大作战"],["8","荒野行动"],["9","终结者2"],["10","虚荣"],["11","火影忍者OL"],["12","QQ飞车"],["13","穿越火线:枪战王者"],["14","我的世界"],["15","部落冲突:皇室战争"],["16","三国杀"],["17","楚留香"],["18","决战平安京"],["19","第五人格"],["20","创造与魔法"]]}
--------------------------------------------------------------------------------
/changeUserInfo/qrc/ico_gb_wxz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/changeUserInfo/qrc/ico_gb_wxz.png
--------------------------------------------------------------------------------
/changeUserInfo/qrc/ico_gb_xz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/changeUserInfo/qrc/ico_gb_xz.png
--------------------------------------------------------------------------------
/changeUserInfo/qrc/ico_yyf_14_gb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/changeUserInfo/qrc/ico_yyf_14_gb.png
--------------------------------------------------------------------------------
/changeUserInfo/qrc/ico_zkt_18_sx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/changeUserInfo/qrc/ico_zkt_18_sx.png
--------------------------------------------------------------------------------
/changeUserInfo/qrc/icon_sq.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/changeUserInfo/qrc/icon_sq.png
--------------------------------------------------------------------------------
/changeUserInfo/qrc/icon_zk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/changeUserInfo/qrc/icon_zk.png
--------------------------------------------------------------------------------
/changeUserInfo/qrc/iconly_light_outline_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/changeUserInfo/qrc/iconly_light_outline_search.png
--------------------------------------------------------------------------------
/changeUserInfo/qrc/ylf_icon_wsm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/changeUserInfo/qrc/ylf_icon_wsm.png
--------------------------------------------------------------------------------
/changeUserInfo/rollingBox.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/changeUserInfo/rollingBox.cpp
--------------------------------------------------------------------------------
/changeUserInfo/rollingBox.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/changeUserInfo/rollingBox.h
--------------------------------------------------------------------------------
/changeUserInfo/userInfoWidget.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/changeUserInfo/userInfoWidget.cpp
--------------------------------------------------------------------------------
/changeUserInfo/userInfoWidget.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/changeUserInfo/userInfoWidget.h
--------------------------------------------------------------------------------
/changeUserInfo/vGameButton.cpp:
--------------------------------------------------------------------------------
1 | #include "vGameButton.h"
2 | #include
3 |
4 | GameButton::GameButton(QWidget *parent /* = Q_NULLPTR */)
5 | :QCheckBox(parent), m_gameName(QString())
6 | {
7 | ui.setupUi(this);
8 |
9 | connect(this, &QCheckBox::toggled, this, [=](bool check) {
10 | emit sigToggled(m_gameName, check, this);
11 | });
12 | }
13 |
14 | GameButton::~GameButton()
15 | {
16 |
17 | }
18 |
19 | void GameButton::setContent(const QString & text)
20 | {
21 | m_gameName = text;
22 | ui.label_text->setText(text);
23 | }
24 |
25 | void GameButton::mousePressEvent(QMouseEvent * event)
26 | {
27 | if (event->button() == Qt::LeftButton)
28 | {
29 | this->click();
30 | }
31 | QWidget::mousePressEvent(event);
32 | }
33 |
--------------------------------------------------------------------------------
/changeUserInfo/vGameButton.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/changeUserInfo/vGameButton.h
--------------------------------------------------------------------------------
/changeUserInfo/vGameButton.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | vGameItem
4 |
5 |
6 |
7 | 0
8 | 0
9 | 508
10 | 36
11 |
12 |
13 |
14 |
15 | 508
16 | 36
17 |
18 |
19 |
20 |
21 | 508
22 | 36
23 |
24 |
25 |
26 | PointingHandCursor
27 |
28 |
29 | game
30 |
31 |
32 | Qt::RightToLeft
33 |
34 |
35 | QCheckBox
36 | {
37 | padding-right:20px;
38 | }
39 |
40 | QCheckBox::indicator
41 | {
42 | width:14px;
43 |
44 | }
45 |
46 | QCheckBox::indicator:unchecked
47 | {
48 | image: url(:/changeUserInfo/qrc/ico_gb_wxz.png);
49 | }
50 |
51 | QCheckBox::indicator:checked
52 | {
53 | image: url(:/changeUserInfo/qrc/ico_gb_xz.png);
54 | }
55 |
56 |
57 | false
58 |
59 |
60 |
61 |
62 | 20
63 | 0
64 | 441
65 | 36
66 |
67 |
68 |
69 | font-size: 12px;
70 | font-family: 微软雅黑;
71 | color: #FFFFFF;
72 | padding-left:20px;
73 | border:none;
74 | background-color:transparent;
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
--------------------------------------------------------------------------------
/changeUserInfo/vLabel.cpp:
--------------------------------------------------------------------------------
1 | #include "vLabel.h"
2 | #include
3 |
4 | vLabel::vLabel(QWidget *parent /* = Q_NULLPTR */)
5 | :QLabel(parent)
6 | {
7 |
8 | }
9 |
10 | vLabel::~vLabel()
11 | {
12 | }
13 |
14 | void vLabel::mousePressEvent(QMouseEvent * event)
15 | {
16 | if (event->button() == Qt::LeftButton) {
17 | emit sigRightMouseClicked();
18 | }
19 | this->setFocus();
20 | //QLabel::mousePressEvent(event);
21 | }
22 |
23 | void vLabel::focusInEvent(QFocusEvent * event)
24 | {
25 | if (m_isOpen) {
26 | this->setStyleSheet("color: rgba(255,255,255,1);background-color:transparent;border: 1px solid #01EEC3;");
27 | emit sigFocusState(true);
28 | }
29 | QLabel::focusInEvent(event);
30 | }
31 |
32 | void vLabel::focusOutEvent(QFocusEvent * event)
33 | {
34 | if (m_isOpen) {
35 | this->setStyleSheet("color: rgba(255,255,255,0.5);");
36 | emit sigFocusState(false);
37 | }
38 | QLabel::focusOutEvent(event);
39 | }
40 |
--------------------------------------------------------------------------------
/changeUserInfo/vLabel.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 |
5 | class vLabel : public QLabel
6 | {
7 | Q_OBJECT
8 | public:
9 | vLabel(QWidget *parent = Q_NULLPTR);
10 | ~vLabel();
11 |
12 | void setFocusSignals(bool isOpen) { m_isOpen = isOpen; };
13 |
14 | signals:
15 | void sigRightMouseClicked();
16 | void sigFocusState(bool state);
17 |
18 | private:
19 | virtual void mousePressEvent(QMouseEvent *event);
20 | virtual void focusInEvent(QFocusEvent *event);
21 | virtual void focusOutEvent(QFocusEvent *event);
22 |
23 | private:
24 | bool m_isOpen;
25 | };
26 |
27 |
--------------------------------------------------------------------------------
/changeUserInfo/vLineEdit.cpp:
--------------------------------------------------------------------------------
1 | #include "vLineEdit.h"
2 |
3 | vLineEdit::vLineEdit(QWidget *parent /* = Q_NULLPTR */)
4 | :QLineEdit(parent)
5 | {
6 | this->setContextMenuPolicy(Qt::NoContextMenu);
7 | }
8 |
9 | vLineEdit::~vLineEdit()
10 | {
11 | }
12 |
13 | void vLineEdit::focusInEvent(QFocusEvent * event)
14 | {
15 | this->setStyleSheet("color: rgba(255,255,255,1);background-color:transparent;border: 1px solid #01EEC3;");
16 | QLineEdit::focusInEvent(event);
17 | }
18 |
19 | void vLineEdit::focusOutEvent(QFocusEvent * event)
20 | {
21 | this->setStyleSheet("color: rgba(255,255,255,0.5);");
22 | QLineEdit::focusOutEvent(event);
23 | }
24 |
--------------------------------------------------------------------------------
/changeUserInfo/vLineEdit.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 |
5 | class vLineEdit : public QLineEdit
6 | {
7 | Q_OBJECT
8 | public:
9 | vLineEdit(QWidget *parent = Q_NULLPTR);
10 | ~vLineEdit();
11 |
12 | private:
13 | virtual void focusInEvent(QFocusEvent *event);
14 | virtual void focusOutEvent(QFocusEvent *event);
15 | };
16 |
17 |
--------------------------------------------------------------------------------
/changeUserInfo/vTextEdits.cpp:
--------------------------------------------------------------------------------
1 | #include "vTextEdits.h"
2 |
3 | vTextEdits::vTextEdits(QWidget *parent /* = Q_NULLPTR */)
4 | :QTextEdit(parent)
5 | {
6 | }
7 |
8 | vTextEdits::~vTextEdits()
9 | {
10 | }
11 |
12 | void vTextEdits::focusInEvent(QFocusEvent * event)
13 | {
14 | this->setStyleSheet("color: rgba(255,255,255,1);");
15 | this->
16 | QTextEdit::focusInEvent(event);
17 | emit sigFocusState(true);
18 | }
19 |
20 | void vTextEdits::focusOutEvent(QFocusEvent * event)
21 | {
22 | this->setStyleSheet("color: rgba(255,255,255,0.5);");
23 | QTextEdit::focusOutEvent(event);
24 | emit sigFocusState(false);
25 | }
26 |
--------------------------------------------------------------------------------
/changeUserInfo/vTextEdits.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 |
5 | class vTextEdits : public QTextEdit
6 | {
7 | Q_OBJECT
8 | public:
9 | vTextEdits(QWidget *parent = Q_NULLPTR);
10 | ~vTextEdits();
11 |
12 | signals:
13 | void sigFocusState(bool state);
14 |
15 | private:
16 | virtual void focusInEvent(QFocusEvent *event);
17 | virtual void focusOutEvent(QFocusEvent *event);
18 | };
19 |
20 |
--------------------------------------------------------------------------------
/chatBubbe/chatBubbe.cpp:
--------------------------------------------------------------------------------
1 | #include "chatBubbe.h"
2 |
3 | chatBubbe::chatBubbe(QWidget *parent)
4 | : QWidget(parent)
5 | {
6 | ui.setupUi(this);
7 | }
8 |
9 | chatBubbe::~chatBubbe()
10 | {
11 | }
12 |
--------------------------------------------------------------------------------
/chatBubbe/chatBubbe.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include "ui_chatBubbe.h"
5 |
6 | class chatBubbe : public QWidget
7 | {
8 | Q_OBJECT
9 |
10 | public:
11 | chatBubbe(QWidget *parent = Q_NULLPTR);
12 | ~chatBubbe();
13 |
14 | private:
15 | Ui::chatBubbeClass ui;
16 | };
17 |
--------------------------------------------------------------------------------
/chatBubbe/chatBubbe.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | qrc/chat_bubble_1.png
4 | qrc/chat_bubble_2.png
5 | qrc/chat_bubble_3.png
6 | qrc/chat_bubble_4.png
7 | qrc/chat_bubble_5.png
8 | qrc/chat_bubble_6.png
9 | qrc/chat_bubble_10.png
10 | qrc/chat_bubble_12.png
11 | qrc/chat_bubble_15.png
12 | qrc/chat_bubble_16.png
13 | qrc/chat_bubble_17.png
14 | qrc/chat_bubble_18.png
15 | qrc/chat_bubble_19.png
16 | qrc/chat_bubble_21.png
17 | qrc/chat_bubble_22.png
18 | qrc/chat_bubble_23.png
19 | qrc/chat_bubble_27.png
20 | qrc/chat_bubble_28.png
21 | qrc/chat_bubble_29.png
22 |
23 |
24 |
--------------------------------------------------------------------------------
/chatBubbe/chatBubbe.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hh;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | qrc;rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 | {99349809-55BA-4b9d-BF79-8FDBB0286EB3}
18 | ui
19 |
20 |
21 | {639EADAA-A684-42e4-A9AD-28FC9BCB8F7C}
22 | ts
23 |
24 |
25 |
26 |
27 | Resource Files
28 |
29 |
30 | Form Files
31 |
32 |
33 | Header Files
34 |
35 |
36 | Source Files
37 |
38 |
39 |
40 |
41 | Source Files
42 |
43 |
44 |
--------------------------------------------------------------------------------
/chatBubbe/main.cpp:
--------------------------------------------------------------------------------
1 | #include "chatBubbe.h"
2 | #include
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 | chatBubbe w;
8 | w.show();
9 | return a.exec();
10 | }
11 |
--------------------------------------------------------------------------------
/chatBubbe/qrc/chat_bubble_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatBubbe/qrc/chat_bubble_1.png
--------------------------------------------------------------------------------
/chatBubbe/qrc/chat_bubble_10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatBubbe/qrc/chat_bubble_10.png
--------------------------------------------------------------------------------
/chatBubbe/qrc/chat_bubble_12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatBubbe/qrc/chat_bubble_12.png
--------------------------------------------------------------------------------
/chatBubbe/qrc/chat_bubble_15.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatBubbe/qrc/chat_bubble_15.png
--------------------------------------------------------------------------------
/chatBubbe/qrc/chat_bubble_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatBubbe/qrc/chat_bubble_16.png
--------------------------------------------------------------------------------
/chatBubbe/qrc/chat_bubble_17.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatBubbe/qrc/chat_bubble_17.png
--------------------------------------------------------------------------------
/chatBubbe/qrc/chat_bubble_18.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatBubbe/qrc/chat_bubble_18.png
--------------------------------------------------------------------------------
/chatBubbe/qrc/chat_bubble_19.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatBubbe/qrc/chat_bubble_19.png
--------------------------------------------------------------------------------
/chatBubbe/qrc/chat_bubble_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatBubbe/qrc/chat_bubble_2.png
--------------------------------------------------------------------------------
/chatBubbe/qrc/chat_bubble_21.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatBubbe/qrc/chat_bubble_21.png
--------------------------------------------------------------------------------
/chatBubbe/qrc/chat_bubble_22.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatBubbe/qrc/chat_bubble_22.png
--------------------------------------------------------------------------------
/chatBubbe/qrc/chat_bubble_23.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatBubbe/qrc/chat_bubble_23.png
--------------------------------------------------------------------------------
/chatBubbe/qrc/chat_bubble_27.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatBubbe/qrc/chat_bubble_27.png
--------------------------------------------------------------------------------
/chatBubbe/qrc/chat_bubble_28.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatBubbe/qrc/chat_bubble_28.png
--------------------------------------------------------------------------------
/chatBubbe/qrc/chat_bubble_29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatBubbe/qrc/chat_bubble_29.png
--------------------------------------------------------------------------------
/chatBubbe/qrc/chat_bubble_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatBubbe/qrc/chat_bubble_3.png
--------------------------------------------------------------------------------
/chatBubbe/qrc/chat_bubble_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatBubbe/qrc/chat_bubble_4.png
--------------------------------------------------------------------------------
/chatBubbe/qrc/chat_bubble_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatBubbe/qrc/chat_bubble_5.png
--------------------------------------------------------------------------------
/chatBubbe/qrc/chat_bubble_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatBubbe/qrc/chat_bubble_6.png
--------------------------------------------------------------------------------
/chatMessageWidget/chatMessageBrowser.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatMessageWidget/chatMessageBrowser.cpp
--------------------------------------------------------------------------------
/chatMessageWidget/chatMessageBrowser.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatMessageWidget/chatMessageBrowser.h
--------------------------------------------------------------------------------
/chatMessageWidget/chatMessageItem.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatMessageWidget/chatMessageItem.cpp
--------------------------------------------------------------------------------
/chatMessageWidget/chatMessageItem.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatMessageWidget/chatMessageItem.h
--------------------------------------------------------------------------------
/chatMessageWidget/chatMessageWidget.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatMessageWidget/chatMessageWidget.cpp
--------------------------------------------------------------------------------
/chatMessageWidget/chatMessageWidget.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatMessageWidget/chatMessageWidget.h
--------------------------------------------------------------------------------
/chatMessageWidget/chatMessageWidget.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | image/1.jpg
4 | image/2.jpg
5 | image/3.jpg
6 | image/4.jpg
7 | image/5.jpg
8 | image/6.jpg
9 | image/7.jpg
10 | image/8.jpg
11 | image/9.jpg
12 | image/10.jpg
13 | image/11.jpg
14 | image/12.jpg
15 | image/bg.jpg
16 | image/ic_gb.png
17 | image/ic_zxh.png
18 | image/lt_ic_zdh.png
19 | image/ico_emoji.png
20 | image/ico_photo.png
21 |
22 |
23 |
--------------------------------------------------------------------------------
/chatMessageWidget/image/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatMessageWidget/image/1.jpg
--------------------------------------------------------------------------------
/chatMessageWidget/image/10.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatMessageWidget/image/10.jpg
--------------------------------------------------------------------------------
/chatMessageWidget/image/11.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatMessageWidget/image/11.jpg
--------------------------------------------------------------------------------
/chatMessageWidget/image/12.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatMessageWidget/image/12.jpg
--------------------------------------------------------------------------------
/chatMessageWidget/image/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatMessageWidget/image/2.jpg
--------------------------------------------------------------------------------
/chatMessageWidget/image/3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatMessageWidget/image/3.jpg
--------------------------------------------------------------------------------
/chatMessageWidget/image/4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatMessageWidget/image/4.jpg
--------------------------------------------------------------------------------
/chatMessageWidget/image/5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatMessageWidget/image/5.jpg
--------------------------------------------------------------------------------
/chatMessageWidget/image/6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatMessageWidget/image/6.jpg
--------------------------------------------------------------------------------
/chatMessageWidget/image/7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatMessageWidget/image/7.jpg
--------------------------------------------------------------------------------
/chatMessageWidget/image/8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatMessageWidget/image/8.jpg
--------------------------------------------------------------------------------
/chatMessageWidget/image/9.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatMessageWidget/image/9.jpg
--------------------------------------------------------------------------------
/chatMessageWidget/image/bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatMessageWidget/image/bg.jpg
--------------------------------------------------------------------------------
/chatMessageWidget/image/ic_gb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatMessageWidget/image/ic_gb.png
--------------------------------------------------------------------------------
/chatMessageWidget/image/ic_zxh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatMessageWidget/image/ic_zxh.png
--------------------------------------------------------------------------------
/chatMessageWidget/image/ico_emoji.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatMessageWidget/image/ico_emoji.png
--------------------------------------------------------------------------------
/chatMessageWidget/image/ico_photo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatMessageWidget/image/ico_photo.png
--------------------------------------------------------------------------------
/chatMessageWidget/image/lt_ic_zdh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatMessageWidget/image/lt_ic_zdh.png
--------------------------------------------------------------------------------
/chatMessageWidget/imageTool.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatMessageWidget/imageTool.cpp
--------------------------------------------------------------------------------
/chatMessageWidget/imageTool.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 |
5 | QPixmap getRoundRectPixmap(QPixmap srcPixMap, const QSize & size, int radius);
6 |
--------------------------------------------------------------------------------
/chatMessageWidget/logoItem.cpp:
--------------------------------------------------------------------------------
1 | #include "logoItem.h"
2 | #include "imageTool.h"
3 |
4 | LogoItem::LogoItem(QWidget *parent)
5 | :QWidget(parent)
6 | {
7 | ui.setupUi(this);
8 | }
9 |
10 | LogoItem::~LogoItem()
11 | {
12 | }
13 |
14 | void LogoItem::setLogo(const QString & path)
15 | {
16 | QPixmap logo(path);
17 | if (!logo.isNull()) {
18 | logo = getRoundRectPixmap(logo, QSize(ui.label_logo->size()), 25);
19 | ui.label_logo->setScaledContents(true);
20 | ui.label_logo->setPixmap(logo);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/chatMessageWidget/logoItem.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include "ui_logoItem.h"
5 |
6 | class LogoItem : public QWidget
7 | {
8 | Q_OBJECT
9 | public:
10 | LogoItem(QWidget *parent = Q_NULLPTR);
11 | ~LogoItem();
12 |
13 | void setLogo(const QString& path);
14 |
15 | private:
16 | Ui::logoitem ui;
17 | };
18 |
--------------------------------------------------------------------------------
/chatMessageWidget/logoItem.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | logoitem
4 |
5 |
6 |
7 | 0
8 | 0
9 | 123
10 | 97
11 |
12 |
13 |
14 | Form
15 |
16 |
17 |
18 | 0
19 |
20 |
21 | 0
22 |
23 |
24 | 0
25 |
26 |
27 | 0
28 |
29 |
30 | 0
31 |
32 | -
33 |
34 |
35 |
36 | 50
37 | 50
38 |
39 |
40 |
41 |
42 | 50
43 | 50
44 |
45 |
46 |
47 | PointingHandCursor
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/chatMessageWidget/main.cpp:
--------------------------------------------------------------------------------
1 | #include "testWidget.h"
2 | #include
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 | testWidget w;
8 | w.show();
9 | return a.exec();
10 | }
11 |
--------------------------------------------------------------------------------
/chatMessageWidget/testWidget.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/chatMessageWidget/testWidget.cpp
--------------------------------------------------------------------------------
/chatMessageWidget/testWidget.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 | #include "chatMessageWidget.h"
6 |
7 | class QPushButton;
8 |
9 | class testWidget : public QWidget
10 | {
11 | Q_OBJECT
12 | public:
13 | testWidget(QWidget *parent = Q_NULLPTR);
14 | ~testWidget();
15 |
16 | private:
17 | QHash m_userDataInfo;
18 | chatMessageWidget m_chat;
19 | int dataNum;
20 | QPushButton *m_test = nullptr;
21 |
22 | QWidget *m_widget = nullptr;
23 | };
24 |
--------------------------------------------------------------------------------
/clickedAnimation/WaterClicked.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/clickedAnimation/WaterClicked.cpp
--------------------------------------------------------------------------------
/clickedAnimation/WaterClicked.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/clickedAnimation/WaterClicked.h
--------------------------------------------------------------------------------
/clickedAnimation/clickedAnimation.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/clickedAnimation/clickedAnimation.cpp
--------------------------------------------------------------------------------
/clickedAnimation/clickedAnimation.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/clickedAnimation/clickedAnimation.h
--------------------------------------------------------------------------------
/clickedAnimation/clickedAnimation.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | qrc/icon_sz2.png
4 |
5 |
6 |
--------------------------------------------------------------------------------
/clickedAnimation/clickedAnimation.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | clickedAnimationClass
4 |
5 |
6 |
7 | 0
8 | 0
9 | 600
10 | 400
11 |
12 |
13 |
14 | clickedAnimation
15 |
16 |
17 | background-color: rgb(170, 170, 0);
18 |
19 |
20 |
21 |
22 | 480
23 | 160
24 | 60
25 | 60
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/clickedAnimation/imageLabel.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/clickedAnimation/imageLabel.cpp
--------------------------------------------------------------------------------
/clickedAnimation/imageLabel.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/clickedAnimation/imageLabel.h
--------------------------------------------------------------------------------
/clickedAnimation/main.cpp:
--------------------------------------------------------------------------------
1 | #include "clickedAnimation.h"
2 | #include
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 | clickedAnimation w;
8 | w.show();
9 | return a.exec();
10 | }
11 |
--------------------------------------------------------------------------------
/clickedAnimation/qrc/icon_sz2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/clickedAnimation/qrc/icon_sz2.png
--------------------------------------------------------------------------------
/floatingWin/floatingWin.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/floatingWin/floatingWin.cpp
--------------------------------------------------------------------------------
/floatingWin/floatingWin.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/floatingWin/floatingWin.h
--------------------------------------------------------------------------------
/floatingWin/floatingWin.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | qrc/bg.png
4 |
5 |
6 |
--------------------------------------------------------------------------------
/floatingWin/floatingWin.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hh;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | qrc;rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 | {99349809-55BA-4b9d-BF79-8FDBB0286EB3}
18 | ui
19 |
20 |
21 | {639EADAA-A684-42e4-A9AD-28FC9BCB8F7C}
22 | ts
23 |
24 |
25 |
26 |
27 | Resource Files
28 |
29 |
30 | Form Files
31 |
32 |
33 | Header Files
34 |
35 |
36 | Source Files
37 |
38 |
39 |
40 |
41 | Source Files
42 |
43 |
44 |
--------------------------------------------------------------------------------
/floatingWin/main.cpp:
--------------------------------------------------------------------------------
1 | #include "floatingWin.h"
2 | #include
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 | floatingWin w;
8 | w.show();
9 | return a.exec();
10 | }
11 |
--------------------------------------------------------------------------------
/floatingWin/qrc/bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/floatingWin/qrc/bg.png
--------------------------------------------------------------------------------
/frameLessScale/DragShadow.h:
--------------------------------------------------------------------------------
1 | #ifndef DRAGSHADOW_H
2 | #define DRAGSHADOW_H
3 | #include
4 | #include
5 |
6 | class DragShadow : public QWidget
7 | {
8 | Q_OBJECT
9 | private:
10 | QImage m_image;
11 | protected:
12 | bool getInvertColor(int x, int y, QColor &color);
13 | void paintEvent(QPaintEvent *);
14 | void showEvent(QShowEvent * event);
15 | public:
16 | explicit DragShadow(QWidget *parent = 0);
17 | void setSizePos(int x, int y, int w, int h);
18 | void setPos(int x, int y);
19 | void setPos(QPoint pos);
20 | };
21 | #endif // DRAGSHADOW_H
--------------------------------------------------------------------------------
/frameLessScale/frameLessScale.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/frameLessScale/frameLessScale.cpp
--------------------------------------------------------------------------------
/frameLessScale/frameLessScale.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/frameLessScale/frameLessScale.h
--------------------------------------------------------------------------------
/frameLessScale/frameLessScale.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/frameLessScale/frameless.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/frameLessScale/frameless.cpp
--------------------------------------------------------------------------------
/frameLessScale/frameless.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include "DragShadow.h"
12 |
13 | class FrameLess : public QObject
14 | {
15 | Q_OBJECT
16 |
17 | public:
18 | enum Edge {
19 | None = 0x0,
20 | Left = 0x1,
21 | Top = 0x2,
22 | Right = 0x4,
23 | Bottom = 0x8,
24 | TopLeft = 0x10,
25 | TopRight = 0x20,
26 | BottomLeft = 0x40,
27 | BottomRight = 0x80,
28 | };
29 | Q_ENUM(Edge);
30 | Q_DECLARE_FLAGS(Edges, Edge);
31 |
32 | FrameLess(QWidget *target);
33 | ~FrameLess();
34 | protected:
35 | bool eventFilter(QObject *o, QEvent *e) override;
36 | void mouseHover(QHoverEvent*);
37 | void mouseLeave(QEvent*);
38 | void mousePress(QMouseEvent*);
39 | void mouseRealese(QMouseEvent*);
40 | void mouseMove(QMouseEvent*);
41 | void updateCursorShape(const QPoint &);
42 | void calculateCursorPosition(const QPoint &, const QRect &, Edges &);
43 |
44 | private:
45 | QWidget *_target = nullptr;
46 | DragShadow *_rubberband = nullptr;
47 | bool _cursorchanged;
48 | bool _leftButtonPressed;
49 | Edges _mousePress = Edge::None;
50 | Edges _mouseMove = Edge::None;
51 | int _borderWidth;
52 | int maximizeWidth;
53 | QRect _originRect;
54 | };
55 |
56 | Q_DECLARE_OPERATORS_FOR_FLAGS(FrameLess::Edges);
--------------------------------------------------------------------------------
/frameLessScale/framelessdialog.h:
--------------------------------------------------------------------------------
1 | #ifndef FRAMELESSDIALOG_H
2 | #define FRAMELESSDIALOG_H
3 |
4 | #include
5 |
6 | class FramelessDialog : public QDialog
7 | {
8 | Q_OBJECT
9 | public:
10 | explicit FramelessDialog(QWidget *parent = 0);
11 |
12 | protected:
13 | //窗体显示的时候触发
14 | void showEvent(QShowEvent *event);
15 |
16 | //事件过滤器识别拖动拉伸等
17 | void doWindowStateChange(QEvent *event);
18 | void doResizeEvent(QEvent *event);
19 | bool eventFilter(QObject *watched, QEvent *event);
20 |
21 | //拦截系统事件用于修复系统休眠后唤醒程序的BUG
22 | #if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
23 | bool nativeEvent(const QByteArray &eventType, void *message, qintptr *result);
24 | #else
25 | bool nativeEvent(const QByteArray &eventType, void *message, long *result);
26 | #endif
27 |
28 | //Qt4的写法
29 | #if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
30 | #ifdef Q_OS_WIN
31 | bool winEvent(MSG *message, long *result);
32 | #endif
33 | #endif
34 |
35 | private:
36 | //边距+可移动+可拉伸
37 | int padding;
38 | bool moveEnable;
39 | bool resizeEnable;
40 |
41 | //标题栏控件
42 | QWidget *titleBar;
43 |
44 | //鼠标是否按下+按下坐标+按下时窗体区域
45 | bool mousePressed;
46 | QPoint mousePoint;
47 | QRect mouseRect;
48 |
49 | //鼠标是否按下某个区域+按下区域的大小
50 | //依次为 左侧+右侧+上侧+下侧+左上侧+右上侧+左下侧+右下侧
51 | QList pressedArea;
52 | QList pressedRect;
53 |
54 | //记录是否最小化
55 | bool isMin;
56 | //存储窗体默认的属性
57 | Qt::WindowFlags flags;
58 |
59 | public:
60 | //设置边距+可拖动+可拉伸
61 | void setPadding(int padding);
62 | void setMoveEnable(bool moveEnable);
63 | void setResizeEnable(bool resizeEnable);
64 |
65 | //设置标题栏控件
66 | void setTitleBar(QWidget *titleBar);
67 |
68 | signals:
69 | void titleDblClick();
70 | void windowStateChange(bool max);
71 | };
72 |
73 | #endif // FRAMELESSDIALOG_H
74 |
--------------------------------------------------------------------------------
/frameLessScale/framelessmainwindow.h:
--------------------------------------------------------------------------------
1 | #ifndef FRAMELESSMAINWINDOW_H
2 | #define FRAMELESSMAINWINDOW_H
3 |
4 | #include
5 |
6 | class FramelessMainWindow : public QMainWindow
7 | {
8 | Q_OBJECT
9 | public:
10 | explicit FramelessMainWindow(QWidget *parent = 0);
11 |
12 | protected:
13 | //窗体显示的时候触发
14 | void showEvent(QShowEvent *event);
15 |
16 | //事件过滤器识别拖动拉伸等
17 | void doWindowStateChange(QEvent *event);
18 | void doResizeEvent(QEvent *event);
19 | bool eventFilter(QObject *watched, QEvent *event);
20 |
21 | //拦截系统事件用于修复系统休眠后唤醒程序的BUG
22 | #if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
23 | bool nativeEvent(const QByteArray &eventType, void *message, qintptr *result);
24 | #else
25 | bool nativeEvent(const QByteArray &eventType, void *message, long *result);
26 | #endif
27 |
28 | //Qt4的写法
29 | #if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
30 | #ifdef Q_OS_WIN
31 | bool winEvent(MSG *message, long *result);
32 | #endif
33 | #endif
34 |
35 | private:
36 | //边距+可移动+可拉伸
37 | int padding;
38 | bool moveEnable;
39 | bool resizeEnable;
40 |
41 | //标题栏控件
42 | QWidget *titleBar;
43 |
44 | //鼠标是否按下+按下坐标+按下时窗体区域
45 | bool mousePressed;
46 | QPoint mousePoint;
47 | QRect mouseRect;
48 |
49 | //鼠标是否按下某个区域+按下区域的大小
50 | //依次为 左侧+右侧+上侧+下侧+左上侧+右上侧+左下侧+右下侧
51 | QList pressedArea;
52 | QList pressedRect;
53 |
54 | //记录是否最小化
55 | bool isMin;
56 | //存储窗体默认的属性
57 | Qt::WindowFlags flags;
58 |
59 | public:
60 | //设置边距+可拖动+可拉伸
61 | void setPadding(int padding);
62 | void setMoveEnable(bool moveEnable);
63 | void setResizeEnable(bool resizeEnable);
64 |
65 | //设置标题栏控件
66 | void setTitleBar(QWidget *titleBar);
67 |
68 | signals:
69 | void titleDblClick();
70 | void windowStateChange(bool max);
71 | };
72 |
73 | #endif // FRAMELESSMAINWINDOW_H
74 |
--------------------------------------------------------------------------------
/frameLessScale/framelesswidget.h:
--------------------------------------------------------------------------------
1 | #ifndef FRAMELESSWIDGET_H
2 | #define FRAMELESSWIDGET_H
3 |
4 | #include
5 |
6 | class FramelessWidget : public QWidget
7 | {
8 | Q_OBJECT
9 | public:
10 | explicit FramelessWidget(QWidget *parent = 0);
11 |
12 | protected:
13 | //窗体显示的时候触发
14 | void showEvent(QShowEvent *event);
15 |
16 | //事件过滤器识别拖动拉伸等
17 | void doWindowStateChange(QEvent *event);
18 | void doResizeEvent(QEvent *event);
19 | bool eventFilter(QObject *watched, QEvent *event);
20 |
21 | //拦截系统事件用于修复系统休眠后唤醒程序的BUG
22 | #if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
23 | bool nativeEvent(const QByteArray &eventType, void *message, qintptr *result);
24 | #else
25 | bool nativeEvent(const QByteArray &eventType, void *message, long *result);
26 | #endif
27 |
28 | //Qt4的写法
29 | #if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
30 | #ifdef Q_OS_WIN
31 | bool winEvent(MSG *message, long *result);
32 | #endif
33 | #endif
34 |
35 | private:
36 | //边距+可移动+可拉伸
37 | int padding;
38 | bool moveEnable;
39 | bool resizeEnable;
40 | //是否支持垂直拉伸
41 | bool m_topBottomEnable;
42 | //是否支持水平拉伸
43 | bool m_leftRightEnable;
44 |
45 | //标题栏控件
46 | QWidget *titleBar;
47 |
48 | //鼠标是否按下+按下坐标+按下时窗体区域
49 | bool mousePressed;
50 | QPoint mousePoint;
51 | QRect mouseRect;
52 |
53 | //鼠标是否按下某个区域+按下区域的大小
54 | //依次为 左侧+右侧+上侧+下侧+左上侧+右上侧+左下侧+右下侧
55 | QList pressedArea;
56 | QList pressedRect;
57 |
58 | //记录是否最小化
59 | bool isMin;
60 | //存储窗体默认的属性
61 | Qt::WindowFlags flags;
62 |
63 | public:
64 | //设置边距+可拖动+可拉伸
65 | void setPadding(int padding);
66 | void setMoveEnable(bool moveEnable);
67 | void setResizeEnable(bool resizeEnable);
68 | //设置支持垂直拉伸权限
69 | void setTopBottomEnable(bool enable);
70 | //设置支持水平拉伸权限
71 | void setLeftRightEnable(bool enable);
72 |
73 | //设置标题栏控件
74 | void setTitleBar(QWidget *titleBar);
75 |
76 | signals:
77 | void titleDblClick();
78 | void windowStateChange(bool max);
79 | };
80 |
81 | #endif // FRAMELESSWIDGET_H
82 |
--------------------------------------------------------------------------------
/frameLessScale/main.cpp:
--------------------------------------------------------------------------------
1 | #include "frameLessScale.h"
2 | #include
3 | #include "frameless.h"
4 |
5 | int main(int argc, char *argv[])
6 | {
7 | QApplication a(argc, argv);
8 | frameLessScale w;
9 | //FrameLess *frameLess = new FrameLess(&w);
10 | w.show();
11 | return a.exec();
12 | }
13 |
--------------------------------------------------------------------------------
/marqueeLabel/main.cpp:
--------------------------------------------------------------------------------
1 | #include "marqueeLabel.h"
2 | #include
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 | marqueeLabel w;
8 | w.show();
9 | return a.exec();
10 | }
11 |
--------------------------------------------------------------------------------
/marqueeLabel/marqueeLabel.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/marqueeLabel/marqueeLabel.cpp
--------------------------------------------------------------------------------
/marqueeLabel/marqueeLabel.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include "ui_marqueeLabel.h"
5 |
6 | class marqueeLabel : public QWidget
7 | {
8 | Q_OBJECT
9 |
10 | public:
11 | marqueeLabel(QWidget *parent = Q_NULLPTR);
12 |
13 | private:
14 | Ui::marqueeLabelClass ui;
15 | };
16 |
--------------------------------------------------------------------------------
/marqueeLabel/marqueeLabel.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/marqueeLabel/marqueeLabel.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hh;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | qrc;rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 | {99349809-55BA-4b9d-BF79-8FDBB0286EB3}
18 | ui
19 |
20 |
21 | {639EADAA-A684-42e4-A9AD-28FC9BCB8F7C}
22 | ts
23 |
24 |
25 |
26 |
27 | Resource Files
28 |
29 |
30 | Form Files
31 |
32 |
33 | Header Files
34 |
35 |
36 | Source Files
37 |
38 |
39 |
40 |
41 | Source Files
42 |
43 |
44 | Source Files
45 |
46 |
47 |
48 |
49 | Header Files
50 |
51 |
52 |
--------------------------------------------------------------------------------
/marqueeLabel/vmarqueelabel.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/marqueeLabel/vmarqueelabel.cpp
--------------------------------------------------------------------------------
/marqueeLabel/vmarqueelabel.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 |
6 | #define ORIGIN_X 5
7 |
8 | class VMarqueeLabel : public QLabel
9 | {
10 | Q_OBJECT
11 |
12 | public:
13 | VMarqueeLabel(QWidget *parent = Q_NULLPTR);
14 | ~VMarqueeLabel();
15 | void clear();
16 | void setText(const QString& text);
17 |
18 | protected:
19 | void paintEvent(QPaintEvent *event);
20 |
21 | private:
22 | QTimer m_Timer;
23 | int m_PosX = ORIGIN_X;
24 | };
25 |
--------------------------------------------------------------------------------
/moveWidget/main.cpp:
--------------------------------------------------------------------------------
1 | #include "moveWidgetTest.h"
2 | #include
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 | moveWidgetTest w;
8 | w.show();
9 | return a.exec();
10 | }
11 |
--------------------------------------------------------------------------------
/moveWidget/moveWidget.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/moveWidget/moveWidget.cpp
--------------------------------------------------------------------------------
/moveWidget/moveWidget.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef TXTMOVETEST_H
4 | #define TXTMOVETEST_H
5 |
6 | #include
7 | #include
8 | #include
9 | #include "ui_moveWidget.h"
10 |
11 | class MoveWidget : public QWidget
12 | {
13 | Q_OBJECT
14 |
15 | public:
16 | MoveWidget(QWidget *parent = Q_NULLPTR);
17 | ~MoveWidget();
18 |
19 | void toStartMoveTimer(bool, int x = 0, int y = 0);
20 |
21 | private:
22 | Ui::txtMoveTestWidget ui;
23 | QTimer m_MoveOut;
24 | QThread m_threadFloat;
25 | int m_posX = 0;
26 | int m_posY = 0;
27 | bool m_Direction = true;
28 | };
29 |
30 | #endif
--------------------------------------------------------------------------------
/moveWidget/moveWidget.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | qrc/Qt.png
4 |
5 |
6 |
--------------------------------------------------------------------------------
/moveWidget/moveWidgetTest.cpp:
--------------------------------------------------------------------------------
1 | #include "moveWidgetTest.h"
2 | #include "moveWidget.h"
3 |
4 | moveWidgetTest::moveWidgetTest(QWidget *parent)
5 | : QWidget(parent)
6 | {
7 | ui.setupUi(this);
8 |
9 | m_moveWidget = new MoveWidget(this);
10 | m_moveWidget->move(340, 140);
11 | m_moveWidget->hide();
12 |
13 | connect(ui.pushButton, &QPushButton::clicked, this, [=]() {
14 | m_moveWidget->toStartMoveTimer(false, 0, 100);
15 | m_moveWidget->show();
16 | });
17 |
18 | }
19 |
20 | moveWidgetTest::~moveWidgetTest()
21 | {
22 | }
23 |
--------------------------------------------------------------------------------
/moveWidget/moveWidgetTest.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include "ui_moveWidgetTest.h"
5 |
6 | class MoveWidget;
7 |
8 | class moveWidgetTest: public QWidget
9 | {
10 | Q_OBJECT
11 |
12 | public:
13 | moveWidgetTest(QWidget *parent = Q_NULLPTR);
14 | ~moveWidgetTest();
15 |
16 | private:
17 | Ui::moveWidgetClass ui;
18 | MoveWidget *m_moveWidget = nullptr;
19 | };
20 |
--------------------------------------------------------------------------------
/moveWidget/moveWidgetTest.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | moveWidgetClass
4 |
5 |
6 |
7 | 0
8 | 0
9 | 600
10 | 400
11 |
12 |
13 |
14 |
15 | 600
16 | 0
17 |
18 |
19 |
20 |
21 | 600
22 | 16777215
23 |
24 |
25 |
26 | moveWidget
27 |
28 |
29 |
30 |
31 | 230
32 | 300
33 | 91
34 | 51
35 |
36 |
37 |
38 | test
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/moveWidget/qrc/Qt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/moveWidget/qrc/Qt.png
--------------------------------------------------------------------------------
/notify/NotifyCountWidget.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/notify/NotifyCountWidget.cpp
--------------------------------------------------------------------------------
/notify/NotifyCountWidget.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "arrangedWidget.h"
4 | #include
5 | #include
6 | #include
7 | #include
8 |
9 | class NotifyCountWidget : public ArrangedWidget
10 | {
11 | Q_OBJECT
12 |
13 | public:
14 | NotifyCountWidget(NotifyManager* manager, QWidget *parent = nullptr);
15 | ~NotifyCountWidget();
16 | void setCount(int count);
17 |
18 | private:
19 | QLabel* iconLabel;
20 | QLabel* countLabel;
21 | QPropertyAnimation* flickerAnim;
22 | };
23 |
--------------------------------------------------------------------------------
/notify/NotifyCountWidget.ui:
--------------------------------------------------------------------------------
1 |
2 | NotifyCountWidgetClass
3 |
4 |
5 | NotifyCountWidgetClass
6 |
7 |
8 |
9 | 0
10 | 0
11 | 600
12 | 400
13 |
14 |
15 |
16 | NotifyCountWidget
17 | $centralwidget$
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/notify/arrangedWidget.h:
--------------------------------------------------------------------------------
1 | #ifndef ARRANGEWND_H
2 | #define ARRANGEWND_H
3 |
4 | #include
5 | #include
6 |
7 | class NotifyManager;
8 | class ArrangedWidget : public QWidget
9 | {
10 | Q_OBJECT
11 |
12 | public:
13 | explicit ArrangedWidget(NotifyManager *manager, QWidget *parent = 0);
14 | void mousePressEvent(QMouseEvent *event);
15 | void showArranged(int posIndex);
16 |
17 | signals:
18 | void clicked();
19 | void rclicked();
20 | void visibleChanged(bool visible);
21 |
22 | protected:
23 | NotifyManager *m_manager;
24 | int m_posIndex;
25 | };
26 |
27 | #endif // ARRANGEWND_H
28 |
--------------------------------------------------------------------------------
/notify/image/0.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/notify/image/0.jpg
--------------------------------------------------------------------------------
/notify/image/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/notify/image/1.jpg
--------------------------------------------------------------------------------
/notify/image/10.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/notify/image/10.jpg
--------------------------------------------------------------------------------
/notify/image/11.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/notify/image/11.jpg
--------------------------------------------------------------------------------
/notify/image/12.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/notify/image/12.jpg
--------------------------------------------------------------------------------
/notify/image/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/notify/image/2.jpg
--------------------------------------------------------------------------------
/notify/image/3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/notify/image/3.jpg
--------------------------------------------------------------------------------
/notify/image/4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/notify/image/4.jpg
--------------------------------------------------------------------------------
/notify/image/5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/notify/image/5.jpg
--------------------------------------------------------------------------------
/notify/image/6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/notify/image/6.jpg
--------------------------------------------------------------------------------
/notify/image/7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/notify/image/7.jpg
--------------------------------------------------------------------------------
/notify/image/8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/notify/image/8.jpg
--------------------------------------------------------------------------------
/notify/image/9.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/notify/image/9.jpg
--------------------------------------------------------------------------------
/notify/image/ico_yyf_14_gb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/notify/image/ico_yyf_14_gb.png
--------------------------------------------------------------------------------
/notify/image/message.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/notify/image/message.png
--------------------------------------------------------------------------------
/notify/imageTool.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/notify/imageTool.cpp
--------------------------------------------------------------------------------
/notify/imageTool.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 |
5 | QPixmap getRoundRectPixmap(QPixmap srcPixMap, const QSize & size, int radius);
6 |
--------------------------------------------------------------------------------
/notify/main.cpp:
--------------------------------------------------------------------------------
1 | #include "notifyTestWidget.h"
2 | #include
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 | notifyTestWidget w;
8 | w.show();
9 | return a.exec();
10 | }
11 |
--------------------------------------------------------------------------------
/notify/notify.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | image/1.jpg
4 | image/2.jpg
5 | image/3.jpg
6 | image/4.jpg
7 | image/5.jpg
8 | image/6.jpg
9 | image/7.jpg
10 | image/8.jpg
11 | image/9.jpg
12 | image/10.jpg
13 | image/11.jpg
14 | image/12.jpg
15 | image/message.png
16 | image/0.jpg
17 | image/ico_yyf_14_gb.png
18 |
19 |
20 |
--------------------------------------------------------------------------------
/notify/notifyTestWidget.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/notify/notifyTestWidget.cpp
--------------------------------------------------------------------------------
/notify/notifyTestWidget.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include "ui_notifyTestWidget.h"
5 |
6 | class NotifyManager;
7 | class notifyTestWidget : public QWidget
8 | {
9 | Q_OBJECT
10 |
11 | public:
12 | notifyTestWidget(QWidget *parent = nullptr);
13 | ~notifyTestWidget();
14 |
15 | private:
16 | Ui::notifyTestWidgetClass ui;
17 | NotifyManager* manager = nullptr;
18 | };
19 |
--------------------------------------------------------------------------------
/notify/notifyWidget.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/notify/notifyWidget.cpp
--------------------------------------------------------------------------------
/notify/notifyWidget.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "arrangedWidget.h"
4 | #include
5 | #include "ui_notifyWidget.h"
6 | #include
7 | #include
8 |
9 | class NotifyWidget : public ArrangedWidget
10 | {
11 | Q_OBJECT
12 |
13 | public:
14 | NotifyWidget(NotifyManager* manager, QWidget *parent = nullptr);
15 | ~NotifyWidget();
16 |
17 | QVariantMap data() const;
18 | void setData(const QVariantMap& data);
19 |
20 | private:
21 | QVariantMap m_data;
22 | //QFrame* background;
23 | //QPushButton* closeBtn;
24 |
25 | private:
26 | Ui::notifyClass ui;
27 | NotifyManager* m_manager;
28 | int m_posIndex;
29 | };
30 |
--------------------------------------------------------------------------------
/notify/notifymanager.h:
--------------------------------------------------------------------------------
1 | #ifndef NOTIFYMANAGER_H
2 | #define NOTIFYMANAGER_H
3 |
4 | #include
5 |
6 | class NotifyWidget;
7 | class NotifyCountWidget;
8 | class NotifyManager : public QObject
9 | {
10 | Q_OBJECT
11 |
12 | public:
13 | explicit NotifyManager( QObject *parent = 0);
14 |
15 | void notify(const QString &title, const QString &body, const QString& url, const QVariantMap &data = QVariantMap());
16 |
17 | void setMaxCount(int count);
18 |
19 | int displayTime() const;
20 | void setDisplayTime(int displayTime);
21 |
22 | int animateTime() const;
23 | void setAnimateTime(int animateTime);
24 |
25 | int spacing() const;
26 | void setSpacing(int spacing);
27 |
28 | QPoint cornerPos() const;
29 | void setCornerMargins(int right, int bottom);
30 |
31 | QSize notifyWndSize() const;
32 | void setNotifyWndSize(int width, int height);
33 |
34 | void setShowQueueCount(bool isShowQueueCount);
35 |
36 | signals:
37 | void notifyDetail(const QVariantMap &data);
38 |
39 | private:
40 | void showNext();
41 | void showQueueCount();
42 |
43 | QQueue m_dataQueue;
44 | QList m_notifyList;
45 | NotifyCountWidget* m_notifyCount;
46 |
47 | int m_maxCount;
48 | bool m_isShowQueueCount;
49 | int m_displayTime;
50 | int m_animateTime;
51 | int m_spacing;
52 | QPoint m_cornerPos;
53 | QSize m_notifyWndSize;
54 | };
55 |
56 | #endif // NOTIFYMANAGER_H
57 |
--------------------------------------------------------------------------------
/paintEvent/main.cpp:
--------------------------------------------------------------------------------
1 | #include "paintEvent.h"
2 | #include
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 | paintEvents w;
8 | w.show();
9 | return a.exec();
10 | }
11 |
--------------------------------------------------------------------------------
/paintEvent/paintEvent.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/paintEvent/paintEvent.cpp
--------------------------------------------------------------------------------
/paintEvent/paintEvent.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/paintEvent/paintEvent.h
--------------------------------------------------------------------------------
/paintEvent/paintEvent.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/paintEvent/paintEvent.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | paintEventClass
4 |
5 |
6 |
7 | 0
8 | 0
9 | 918
10 | 553
11 |
12 |
13 |
14 | paintEvent
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/paintEvent/paintEvent.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hh;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | qrc;rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 | {99349809-55BA-4b9d-BF79-8FDBB0286EB3}
18 | ui
19 |
20 |
21 | {639EADAA-A684-42e4-A9AD-28FC9BCB8F7C}
22 | ts
23 |
24 |
25 |
26 |
27 | Resource Files
28 |
29 |
30 | Form Files
31 |
32 |
33 | Header Files
34 |
35 |
36 | Source Files
37 |
38 |
39 |
40 |
41 | Source Files
42 |
43 |
44 |
--------------------------------------------------------------------------------
/pinyin/main.cpp:
--------------------------------------------------------------------------------
1 | #include "pinyinTest.h"
2 | #include
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 | pinyinTest w;
8 | w.show();
9 | return a.exec();
10 | }
11 |
--------------------------------------------------------------------------------
/pinyin/pinyin.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/pinyin/pinyin.cpp
--------------------------------------------------------------------------------
/pinyin/pinyin.h:
--------------------------------------------------------------------------------
1 | #ifndef PINYIN_H
2 | #define PINYIN_H
3 |
4 | #include
5 |
6 | QString getFirstPinYinLetter(const QString &text);
7 |
8 | QString getPinYinLetter(const QString &text);
9 |
10 | #endif // PINYIN_H
11 |
--------------------------------------------------------------------------------
/pinyin/pinyin.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hh;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | qrc;rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 | {99349809-55BA-4b9d-BF79-8FDBB0286EB3}
18 | ui
19 |
20 |
21 | {639EADAA-A684-42e4-A9AD-28FC9BCB8F7C}
22 | ts
23 |
24 |
25 |
26 |
27 | Resource Files
28 |
29 |
30 | Form Files
31 |
32 |
33 | Header Files
34 |
35 |
36 | Source Files
37 |
38 |
39 |
40 |
41 | Source Files
42 |
43 |
44 | Source Files
45 |
46 |
47 |
48 |
49 | Header Files
50 |
51 |
52 |
--------------------------------------------------------------------------------
/pinyin/pinyinTest.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/pinyin/pinyinTest.cpp
--------------------------------------------------------------------------------
/pinyin/pinyinTest.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include "ui_pinyinTest.h"
5 |
6 | class pinyinTest : public QWidget
7 | {
8 | Q_OBJECT
9 |
10 | public:
11 | pinyinTest(QWidget *parent = Q_NULLPTR);
12 | ~pinyinTest();
13 |
14 | private slots:
15 | void sltTextChanged(const QString& text);
16 |
17 | private:
18 | Ui::pinyinTestClass ui;
19 | };
20 |
--------------------------------------------------------------------------------
/pinyin/pinyinTest.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/progress/animationprocessbar.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 |
6 | class QPropertyAnimation;
7 |
8 | class AnimationProcessBar : public QProgressBar
9 | {
10 | Q_OBJECT
11 | public:
12 | explicit AnimationProcessBar(QWidget *parent = nullptr);
13 | ~AnimationProcessBar();
14 |
15 | private slots:
16 | void sltValueChanged(const QVariant &value);
17 |
18 | protected:
19 | void paintEvent(QPaintEvent *event);
20 |
21 | private:
22 | //透明度
23 | int m_nAlpha;
24 |
25 | //动画类
26 | QPropertyAnimation *m_pAnimation = Q_NULLPTR;
27 | };
28 |
--------------------------------------------------------------------------------
/progress/main.cpp:
--------------------------------------------------------------------------------
1 | #include "progressTest.h"
2 | #include
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 | progressTest w;
8 | w.show();
9 | return a.exec();
10 | }
11 |
--------------------------------------------------------------------------------
/progress/myprocessbar.h:
--------------------------------------------------------------------------------
1 | #ifndef MYPROCESSBAR_H
2 | #define MYPROCESSBAR_H
3 |
4 | #include
5 | #include
6 |
7 | class QTimer;
8 |
9 | class MyProcessBar : public QProgressBar
10 | {
11 | Q_OBJECT
12 | public:
13 | explicit MyProcessBar(QWidget *parent = nullptr);
14 | ~MyProcessBar();
15 |
16 | private slots:
17 | void sltTimerOut();
18 |
19 | protected:
20 | void paintEvent(QPaintEvent *event);
21 |
22 | private:
23 | int m_currvalue=0;
24 | QTimer *m_timer=nullptr;
25 | };
26 |
27 | #endif // MYPROCESSBAR_H
28 |
--------------------------------------------------------------------------------
/progress/progressTest.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include "ui_progressTest.h"
5 |
6 | class progressTest : public QWidget
7 | {
8 | Q_OBJECT
9 |
10 | public:
11 | progressTest(QWidget *parent = Q_NULLPTR);
12 | ~progressTest();
13 |
14 | private:
15 | Ui::progressTestClass ui;
16 | };
17 |
--------------------------------------------------------------------------------
/progress/progressTest.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/progress/vProgressBar.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/progress/vProgressBar.cpp
--------------------------------------------------------------------------------
/progress/vProgressBar.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 |
5 | class vProgressBar : public QProgressBar
6 | {
7 | Q_OBJECT
8 |
9 | public:
10 | vProgressBar(QWidget *parent = Q_NULLPTR);
11 | ~vProgressBar();
12 |
13 | protected:
14 | void paintEvent(QPaintEvent *event);
15 |
16 | };
17 |
--------------------------------------------------------------------------------
/progress/vProgressBars.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/progress/vProgressBars.cpp
--------------------------------------------------------------------------------
/progress/vProgressBars.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/progress/vProgressBars.h
--------------------------------------------------------------------------------
/progress/vWaterProgressBar.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/progress/vWaterProgressBar.cpp
--------------------------------------------------------------------------------
/progress/vWaterProgressBar.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/progress/vWaterProgressBar.h
--------------------------------------------------------------------------------
/progress/vpkProgressBar.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/progress/vpkProgressBar.cpp
--------------------------------------------------------------------------------
/progress/vpkProgressBar.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/progress/vpkProgressBar.h
--------------------------------------------------------------------------------
/rollingBox/QtWidgetsApplication.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/rollingBox/QtWidgetsApplication.cpp
--------------------------------------------------------------------------------
/rollingBox/QtWidgetsApplication.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/rollingBox/QtWidgetsApplication.h
--------------------------------------------------------------------------------
/rollingBox/QtWidgetsApplication.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/rollingBox/main.cpp:
--------------------------------------------------------------------------------
1 | #include "QtWidgetsApplication.h"
2 | #include
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 | QtWidgetsApplication w;
8 | w.show();
9 | return a.exec();
10 | }
11 |
--------------------------------------------------------------------------------
/rollingBox/rollingBox.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/rollingBox/rollingBox.cpp
--------------------------------------------------------------------------------
/rollingBox/rollingBox.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/rollingBox/rollingBox.h
--------------------------------------------------------------------------------
/slidepuzzlewidget/Resources/back1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/slidepuzzlewidget/Resources/back1.jpg
--------------------------------------------------------------------------------
/slidepuzzlewidget/Resources/back2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/slidepuzzlewidget/Resources/back2.jpg
--------------------------------------------------------------------------------
/slidepuzzlewidget/Resources/back3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/slidepuzzlewidget/Resources/back3.jpg
--------------------------------------------------------------------------------
/slidepuzzlewidget/Resources/back4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/slidepuzzlewidget/Resources/back4.jpg
--------------------------------------------------------------------------------
/slidepuzzlewidget/frmslidepuzzlewidget.cpp:
--------------------------------------------------------------------------------
1 | #include "frmslidepuzzlewidget.h"
2 |
3 | FrmSlidePuzzleWidget::FrmSlidePuzzleWidget(QWidget *parent)
4 | : QWidget(parent)
5 | {
6 | ui.setupUi(this);
7 | this->initForm();
8 | }
9 |
10 | FrmSlidePuzzleWidget::~FrmSlidePuzzleWidget()
11 | {
12 |
13 | }
14 |
15 | void FrmSlidePuzzleWidget::initForm()
16 | {
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/slidepuzzlewidget/frmslidepuzzlewidget.h:
--------------------------------------------------------------------------------
1 | #ifndef FRMSLIDEPUZZLEWIDGET_H
2 | #define FRMSLIDEPUZZLEWIDGET_H
3 |
4 | #include
5 | #include "ui_frmslidepuzzlewidget.h"
6 |
7 | class FrmSlidePuzzleWidget : public QWidget
8 | {
9 | Q_OBJECT
10 |
11 | public:
12 | FrmSlidePuzzleWidget(QWidget *parent = 0);
13 | ~FrmSlidePuzzleWidget();
14 |
15 | private:
16 | void initForm();
17 |
18 | private:
19 | Ui::FrmSlidePuzzleWidgetClass ui;
20 | };
21 |
22 | #endif // FRMSLIDEPUZZLEWIDGET_H
23 |
--------------------------------------------------------------------------------
/slidepuzzlewidget/frmslidepuzzlewidget.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | Resources/back1.jpg
4 | Resources/back2.jpg
5 | Resources/back3.jpg
6 | Resources/back4.jpg
7 |
8 |
9 |
--------------------------------------------------------------------------------
/slidepuzzlewidget/frmslidepuzzlewidget.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | FrmSlidePuzzleWidgetClass
4 |
5 |
6 |
7 | 0
8 | 0
9 | 600
10 | 400
11 |
12 |
13 |
14 | FrmSlidePuzzleWidget
15 |
16 |
17 |
18 | 20
19 |
20 |
21 | 20
22 |
23 |
24 | 20
25 |
26 |
27 | 20
28 |
29 |
30 | 20
31 |
32 | -
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 | SliderPuzzleWidget
41 | QWidget
42 |
43 | 1
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/slidepuzzlewidget/main.cpp:
--------------------------------------------------------------------------------
1 | #pragma execution_character_set("utf-8")
2 |
3 | #include "frmslidepuzzlewidget.h"
4 | #include
5 | #include
6 |
7 | int main(int argc, char *argv[])
8 | {
9 | QApplication a(argc, argv);
10 | a.setFont(QFont("Microsoft Yahei", 10));
11 |
12 | #if (QT_VERSION <= QT_VERSION_CHECK(5,0,0))
13 | #if _MSC_VER
14 | QTextCodec *codec = QTextCodec::codecForName("gbk");
15 | #else
16 | QTextCodec *codec = QTextCodec::codecForName("utf-8");
17 | #endif
18 | QTextCodec::setCodecForLocale(codec);
19 | QTextCodec::setCodecForCStrings(codec);
20 | QTextCodec::setCodecForTr(codec);
21 | #else
22 | QTextCodec *codec = QTextCodec::codecForName("utf-8");
23 | QTextCodec::setCodecForLocale(codec);
24 | #endif
25 |
26 | FrmSlidePuzzleWidget w;
27 | w.setWindowTitle("滑块图片验证码");
28 | w.show();
29 | return a.exec();
30 | }
31 |
--------------------------------------------------------------------------------
/slidepuzzlewidget/puzzlewidget.h:
--------------------------------------------------------------------------------
1 | #ifndef PUZZLEWIDGET_H
2 | #define PUZZLEWIDGET_H
3 |
4 | #include
5 |
6 | class PuzzleWidget : public QWidget
7 | {
8 | Q_OBJECT
9 | Q_PROPERTY(QString pixmap READ getPixmap WRITE setPixmap)
10 |
11 | public:
12 | PuzzleWidget(QWidget *parent);
13 | ~PuzzleWidget();
14 |
15 | public:
16 | QString getPixmap() const { return m_pixmap; };
17 | void setPixmap(const QString& pixmap);
18 |
19 | void setValue(int value);
20 | bool isOverlap();
21 |
22 | private slots:
23 | void onUpdatePixmap();
24 |
25 | protected:
26 | void paintEvent(QPaintEvent *event);
27 |
28 | private:
29 | int m_value;
30 | QString m_pixmap;
31 | QPoint m_offsetPoint;
32 | };
33 |
34 | #endif // PUZZLEWIDGET_H
35 |
--------------------------------------------------------------------------------
/slidepuzzlewidget/slidepuzzlewidget.pro:
--------------------------------------------------------------------------------
1 | QT += core gui
2 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
3 | greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat
4 |
5 | TEMPLATE = app
6 | TARGET = slidepuzzlewidget
7 | DESTDIR = $$PWD/../bin
8 | CONFIG += warn_off
9 |
10 | HEADERS += frmslidepuzzlewidget.h
11 | HEADERS += puzzlewidget.h
12 | HEADERS += sliderpuzzlewidget.h
13 |
14 | SOURCES += main.cpp
15 | SOURCES += frmslidepuzzlewidget.cpp
16 | SOURCES += puzzlewidget.cpp
17 | SOURCES += sliderpuzzlewidget.cpp
18 |
19 | FORMS += frmslidepuzzlewidget.ui
20 | FORMS += sliderpuzzlewidget.ui
21 | RESOURCES += frmslidepuzzlewidget.qrc
22 |
23 |
24 |
--------------------------------------------------------------------------------
/slidepuzzlewidget/sliderpuzzlewidget.cpp:
--------------------------------------------------------------------------------
1 | #pragma execution_character_set("utf-8")
2 | #include "sliderpuzzlewidget.h"
3 |
4 | #include
5 | #include
6 |
7 | SliderPuzzleWidget::SliderPuzzleWidget(QWidget *parent)
8 | : QWidget(parent)
9 | {
10 | ui.setupUi(this);
11 | this->initForm();
12 | }
13 |
14 | SliderPuzzleWidget::~SliderPuzzleWidget()
15 | {
16 |
17 | }
18 |
19 | void SliderPuzzleWidget::initForm()
20 | {
21 | QTimer::singleShot(10, this, SLOT(onUpdateWidget()));
22 | connect(ui.horizontalSlider, &QSlider::valueChanged, this, &SliderPuzzleWidget::onSliderValueChanged);
23 | connect(ui.horizontalSlider, &QSlider::sliderReleased, this, &SliderPuzzleWidget::onSliderReleased);
24 | ui.puzzlewidget->setPixmap(":/FrmSlidePuzzleWidget/Resources/back1.jpg");
25 | }
26 |
27 | void SliderPuzzleWidget::onUpdateWidget()
28 | {
29 | ui.horizontalSlider->setRange(0, this->width());
30 | }
31 |
32 | void SliderPuzzleWidget::onSliderValueChanged(int value)
33 | {
34 | ui.puzzlewidget->setValue(value);
35 | }
36 |
37 | void SliderPuzzleWidget::onSliderReleased()
38 | {
39 | QString content = ui.puzzlewidget->isOverlap() ? "验证成功!" : "验证失败!";
40 | QMessageBox msgBox;
41 | msgBox.setWindowTitle("滑块图片验证码");
42 | msgBox.setText(content);
43 | msgBox.exec();
44 |
45 | static int testIndex = 1;
46 | testIndex = testIndex + 1 > 4 ? 1 : testIndex + 1;
47 | ui.horizontalSlider->setValue(0);
48 | ui.puzzlewidget->setPixmap(QString(":/FrmSlidePuzzleWidget/Resources/back%1.jpg").arg(testIndex));
49 | }
--------------------------------------------------------------------------------
/slidepuzzlewidget/sliderpuzzlewidget.h:
--------------------------------------------------------------------------------
1 | #ifndef SLIDERPUZZLEWIDGET_H
2 | #define SLIDERPUZZLEWIDGET_H
3 |
4 | #include
5 | #include "ui_sliderpuzzlewidget.h"
6 |
7 | class SliderPuzzleWidget : public QWidget
8 | {
9 | Q_OBJECT
10 |
11 | public:
12 | SliderPuzzleWidget(QWidget *parent = 0);
13 | ~SliderPuzzleWidget();
14 |
15 | private:
16 | void initForm();
17 |
18 | private slots:
19 | void onUpdateWidget();
20 | void onSliderValueChanged(int value);
21 | void onSliderReleased();
22 |
23 | private:
24 | Ui::SliderPuzzleWidget ui;
25 | };
26 |
27 | #endif // SLIDERPUZZLEWIDGET_H
28 |
--------------------------------------------------------------------------------
/slidepuzzlewidget/sliderpuzzlewidget.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | SliderPuzzleWidget
4 |
5 |
6 |
7 | 0
8 | 0
9 | 717
10 | 320
11 |
12 |
13 |
14 | SliderPuzzleWidget
15 |
16 |
17 |
18 | 14
19 |
20 |
21 | 0
22 |
23 |
24 | 0
25 |
26 |
27 | 0
28 |
29 |
30 | 0
31 |
32 | -
33 |
34 |
35 | -
36 |
37 |
38 | Qt::Horizontal
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | PuzzleWidget
48 | QWidget
49 |
50 | 1
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/sqlite/vloginsqlite.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/sqlite/vloginsqlite.cpp
--------------------------------------------------------------------------------
/sqlite/vloginsqlite.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/sqlite/vloginsqlite.h
--------------------------------------------------------------------------------
/suspensionSlide/main.cpp:
--------------------------------------------------------------------------------
1 | #include "suspensionSlideTest.h"
2 | #include
3 |
4 | int main(int argc, char *argv[])
5 | {
6 | QApplication a(argc, argv);
7 | suspensionSlideTest w;
8 | w.show();
9 | return a.exec();
10 | }
11 |
--------------------------------------------------------------------------------
/suspensionSlide/qrc/image/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/suspensionSlide/qrc/image/1.jpg
--------------------------------------------------------------------------------
/suspensionSlide/suspensionScrollBar.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/suspensionSlide/suspensionScrollBar.cpp
--------------------------------------------------------------------------------
/suspensionSlide/suspensionScrollBar.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KikyoShaw/QtWidgetsApplication/84f04cc7f0bd95a1c4630cb91f0ea4369b0d6637/suspensionSlide/suspensionScrollBar.h
--------------------------------------------------------------------------------
/suspensionSlide/suspensionSlideTest.cpp:
--------------------------------------------------------------------------------
1 | #include "suspensionSlideTest.h"
2 |
3 | suspensionSlideTest::suspensionSlideTest(QWidget *parent)
4 | : QWidget(parent)
5 | {
6 | ui.setupUi(this);
7 | }
8 |
--------------------------------------------------------------------------------
/suspensionSlide/suspensionSlideTest.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include "ui_suspensionSlideTest.h"
5 |
6 | class suspensionSlideTest : public QWidget
7 | {
8 | Q_OBJECT
9 |
10 | public:
11 | suspensionSlideTest(QWidget *parent = Q_NULLPTR);
12 |
13 | private:
14 | Ui::suspensionSlideTestClass ui;
15 | };
16 |
--------------------------------------------------------------------------------
/suspensionSlide/suspensionSlideTest.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | qrc/qss/blackScrollbar.qss
4 | qrc/qss/whiteScrollbar.qss
5 |
6 |
7 | qrc/image/1.jpg
8 |
9 |
10 |
--------------------------------------------------------------------------------