forked from feiyangqingyun/QWidgetDemo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
75d6a01
commit a36e06a
Showing
16 changed files
with
3,046 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#include "frmlunarcalendarwidget.h" | ||
#include "ui_frmlunarcalendarwidget.h" | ||
|
||
frmLunarCalendarWidget::frmLunarCalendarWidget(QWidget *parent) : QWidget(parent), ui(new Ui::frmLunarCalendarWidget) | ||
{ | ||
ui->setupUi(this); | ||
this->initForm(); | ||
} | ||
|
||
frmLunarCalendarWidget::~frmLunarCalendarWidget() | ||
{ | ||
delete ui; | ||
} | ||
|
||
void frmLunarCalendarWidget::initForm() | ||
{ | ||
ui->cboxWeekNameFormat->setCurrentIndex(2); | ||
} | ||
|
||
void frmLunarCalendarWidget::on_cboxCalendarStyle_currentIndexChanged(int index) | ||
{ | ||
ui->lunarCalendarWidget->setCalendarStyle((LunarCalendarWidget::CalendarStyle)index); | ||
} | ||
|
||
void frmLunarCalendarWidget::on_cboxSelectType_currentIndexChanged(int index) | ||
{ | ||
ui->lunarCalendarWidget->setSelectType((LunarCalendarWidget::SelectType)index); | ||
} | ||
|
||
void frmLunarCalendarWidget::on_cboxWeekNameFormat_currentIndexChanged(int index) | ||
{ | ||
ui->lunarCalendarWidget->setWeekNameFormat((LunarCalendarWidget::WeekNameFormat)index); | ||
} | ||
|
||
void frmLunarCalendarWidget::on_ckShowLunar_stateChanged(int arg1) | ||
{ | ||
ui->lunarCalendarWidget->setShowLunar(arg1 != 0); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#ifndef FRMLUNARCALENDARWIDGET_H | ||
#define FRMLUNARCALENDARWIDGET_H | ||
|
||
#include <QWidget> | ||
|
||
namespace Ui { | ||
class frmLunarCalendarWidget; | ||
} | ||
|
||
class frmLunarCalendarWidget : public QWidget | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
explicit frmLunarCalendarWidget(QWidget *parent = 0); | ||
~frmLunarCalendarWidget(); | ||
|
||
private: | ||
Ui::frmLunarCalendarWidget *ui; | ||
|
||
private slots: | ||
void initForm(); | ||
void on_cboxCalendarStyle_currentIndexChanged(int index); | ||
void on_cboxSelectType_currentIndexChanged(int index); | ||
void on_cboxWeekNameFormat_currentIndexChanged(int index); | ||
void on_ckShowLunar_stateChanged(int arg1); | ||
}; | ||
|
||
#endif // FRMLUNARCALENDARWIDGET_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>frmLunarCalendarWidget</class> | ||
<widget class="QWidget" name="frmLunarCalendarWidget"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>600</width> | ||
<height>500</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>Form</string> | ||
</property> | ||
<layout class="QVBoxLayout" name="verticalLayout"> | ||
<item> | ||
<widget class="LunarCalendarWidget" name="lunarCalendarWidget" native="true"> | ||
<property name="sizePolicy"> | ||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding"> | ||
<horstretch>0</horstretch> | ||
<verstretch>0</verstretch> | ||
</sizepolicy> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QWidget" name="widgetBottom" native="true"> | ||
<layout class="QHBoxLayout" name="horizontalLayout"> | ||
<property name="leftMargin"> | ||
<number>0</number> | ||
</property> | ||
<property name="topMargin"> | ||
<number>0</number> | ||
</property> | ||
<property name="rightMargin"> | ||
<number>0</number> | ||
</property> | ||
<property name="bottomMargin"> | ||
<number>0</number> | ||
</property> | ||
<item> | ||
<widget class="QLabel" name="labCalendarStyle"> | ||
<property name="text"> | ||
<string>整体样式</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QComboBox" name="cboxCalendarStyle"> | ||
<property name="minimumSize"> | ||
<size> | ||
<width>90</width> | ||
<height>0</height> | ||
</size> | ||
</property> | ||
<item> | ||
<property name="text"> | ||
<string>红色风格</string> | ||
</property> | ||
</item> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QLabel" name="labSelectType"> | ||
<property name="text"> | ||
<string>选中样式</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QComboBox" name="cboxSelectType"> | ||
<property name="minimumSize"> | ||
<size> | ||
<width>90</width> | ||
<height>0</height> | ||
</size> | ||
</property> | ||
<item> | ||
<property name="text"> | ||
<string>矩形背景</string> | ||
</property> | ||
</item> | ||
<item> | ||
<property name="text"> | ||
<string>圆形背景</string> | ||
</property> | ||
</item> | ||
<item> | ||
<property name="text"> | ||
<string>角标背景</string> | ||
</property> | ||
</item> | ||
<item> | ||
<property name="text"> | ||
<string>图片背景</string> | ||
</property> | ||
</item> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QLabel" name="labWeekNameFormat"> | ||
<property name="text"> | ||
<string>星期格式</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QComboBox" name="cboxWeekNameFormat"> | ||
<property name="minimumSize"> | ||
<size> | ||
<width>90</width> | ||
<height>0</height> | ||
</size> | ||
</property> | ||
<item> | ||
<property name="text"> | ||
<string>短名称</string> | ||
</property> | ||
</item> | ||
<item> | ||
<property name="text"> | ||
<string>普通名称</string> | ||
</property> | ||
</item> | ||
<item> | ||
<property name="text"> | ||
<string>长名称</string> | ||
</property> | ||
</item> | ||
<item> | ||
<property name="text"> | ||
<string>英文名称</string> | ||
</property> | ||
</item> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QCheckBox" name="ckShowLunar"> | ||
<property name="text"> | ||
<string>显示农历</string> | ||
</property> | ||
<property name="checked"> | ||
<bool>true</bool> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<spacer name="horizontalSpacer"> | ||
<property name="orientation"> | ||
<enum>Qt::Horizontal</enum> | ||
</property> | ||
<property name="sizeHint" stdset="0"> | ||
<size> | ||
<width>40</width> | ||
<height>20</height> | ||
</size> | ||
</property> | ||
</spacer> | ||
</item> | ||
</layout> | ||
</widget> | ||
</item> | ||
</layout> | ||
</widget> | ||
<customwidgets> | ||
<customwidget> | ||
<class>LunarCalendarWidget</class> | ||
<extends>QWidget</extends> | ||
<header>lunarcalendarwidget.h</header> | ||
<container>1</container> | ||
</customwidget> | ||
</customwidgets> | ||
<resources/> | ||
<connections/> | ||
</ui> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Oops, something went wrong.