Binary files /tmp/_O8ymsL2SO/chinese-calendar-0.7.6/KylinLunar.db and /tmp/N7ZlgAiTj_/chinese-calendar-0.7.8/KylinLunar.db differ diff -Nru chinese-calendar-0.7.6/Makefile chinese-calendar-0.7.8/Makefile --- chinese-calendar-0.7.6/Makefile 2013-03-13 02:08:45.000000000 +0000 +++ chinese-calendar-0.7.8/Makefile 1970-01-01 00:00:00.000000000 +0000 @@ -1,387 +0,0 @@ -############################################################################# -# Makefile for building: chinese-calendar -# Generated by qmake (2.01a) (Qt 4.8.1) on: Wed Mar 13 10:01:05 2013 -# Project: chinese-calendar.pro -# Template: app -# Command: /usr/bin/qmake-qt4 -spec /usr/share/qt4/mkspecs/linux-g++ -o Makefile chinese-calendar.pro -############################################################################# - -####### Compiler, tools and options - -CC = gcc -CXX = g++ -DEFINES = -DQT_WEBKIT -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_SQL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -CFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES) -CXXFLAGS = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES) -INCPATH = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtSql -I/usr/include/qt4/QtSvg -I/usr/include/qt4 -I. -I. -I. -LINK = g++ -LFLAGS = -Wl,-O1 -LIBS = $(SUBLIBS) -L/usr/lib/i386-linux-gnu -lQtSvg -lQtSql -lQtGui -lQtCore -lpthread -AR = ar cqs -RANLIB = -QMAKE = /usr/bin/qmake-qt4 -TAR = tar -cf -COMPRESS = gzip -9f -COPY = cp -f -SED = sed -COPY_FILE = $(COPY) -COPY_DIR = $(COPY) -r -STRIP = strip -INSTALL_FILE = install -m 644 -p -INSTALL_DIR = $(COPY_DIR) -INSTALL_PROGRAM = install -m 755 -p -DEL_FILE = rm -f -SYMLINK = ln -f -s -DEL_DIR = rmdir -MOVE = mv -f -CHK_DIR_EXISTS= test -d -MKDIR = mkdir -p - -####### Output directory - -OBJECTS_DIR = ./ - -####### Files - -SOURCES = main.cpp \ - dateitem.cpp \ - datemaskwidget.cpp \ - chinesecalendar.cpp \ - ccbo.cpp \ - cnote.cpp moc_dateitem.cpp \ - moc_datemaskwidget.cpp \ - moc_chinesecalendar.cpp \ - moc_cnote.cpp \ - qrc_chinese-calendar.cpp -OBJECTS = main.o \ - dateitem.o \ - datemaskwidget.o \ - chinesecalendar.o \ - ccbo.o \ - cnote.o \ - moc_dateitem.o \ - moc_datemaskwidget.o \ - moc_chinesecalendar.o \ - moc_cnote.o \ - qrc_chinese-calendar.o -DIST = /usr/share/qt4/mkspecs/common/unix.conf \ - /usr/share/qt4/mkspecs/common/linux.conf \ - /usr/share/qt4/mkspecs/common/gcc-base.conf \ - /usr/share/qt4/mkspecs/common/gcc-base-unix.conf \ - /usr/share/qt4/mkspecs/common/g++-base.conf \ - /usr/share/qt4/mkspecs/common/g++-unix.conf \ - /usr/share/qt4/mkspecs/qconfig.pri \ - /usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \ - /usr/share/qt4/mkspecs/features/qt_functions.prf \ - /usr/share/qt4/mkspecs/features/qt_config.prf \ - /usr/share/qt4/mkspecs/features/exclusive_builds.prf \ - /usr/share/qt4/mkspecs/features/default_pre.prf \ - /usr/share/qt4/mkspecs/features/release.prf \ - /usr/share/qt4/mkspecs/features/default_post.prf \ - /usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ - /usr/share/qt4/mkspecs/features/warn_on.prf \ - /usr/share/qt4/mkspecs/features/qt.prf \ - /usr/share/qt4/mkspecs/features/unix/thread.prf \ - /usr/share/qt4/mkspecs/features/moc.prf \ - /usr/share/qt4/mkspecs/features/resources.prf \ - /usr/share/qt4/mkspecs/features/uic.prf \ - /usr/share/qt4/mkspecs/features/yacc.prf \ - /usr/share/qt4/mkspecs/features/lex.prf \ - /usr/share/qt4/mkspecs/features/include_source_dir.prf \ - chinese-calendar.pro -QMAKE_TARGET = chinese-calendar -DESTDIR = -TARGET = chinese-calendar - -first: all -####### Implicit rules - -.SUFFIXES: .o .c .cpp .cc .cxx .C - -.cpp.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" - -.cc.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" - -.cxx.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" - -.C.o: - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" - -.c.o: - $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" - -####### Build rules - -all: Makefile $(TARGET) - -$(TARGET): ui_calendar.h ui_dateitem.h $(OBJECTS) - $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) - -Makefile: chinese-calendar.pro /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/share/qt4/mkspecs/common/unix.conf \ - /usr/share/qt4/mkspecs/common/linux.conf \ - /usr/share/qt4/mkspecs/common/gcc-base.conf \ - /usr/share/qt4/mkspecs/common/gcc-base-unix.conf \ - /usr/share/qt4/mkspecs/common/g++-base.conf \ - /usr/share/qt4/mkspecs/common/g++-unix.conf \ - /usr/share/qt4/mkspecs/qconfig.pri \ - /usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \ - /usr/share/qt4/mkspecs/features/qt_functions.prf \ - /usr/share/qt4/mkspecs/features/qt_config.prf \ - /usr/share/qt4/mkspecs/features/exclusive_builds.prf \ - /usr/share/qt4/mkspecs/features/default_pre.prf \ - /usr/share/qt4/mkspecs/features/release.prf \ - /usr/share/qt4/mkspecs/features/default_post.prf \ - /usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ - /usr/share/qt4/mkspecs/features/warn_on.prf \ - /usr/share/qt4/mkspecs/features/qt.prf \ - /usr/share/qt4/mkspecs/features/unix/thread.prf \ - /usr/share/qt4/mkspecs/features/moc.prf \ - /usr/share/qt4/mkspecs/features/resources.prf \ - /usr/share/qt4/mkspecs/features/uic.prf \ - /usr/share/qt4/mkspecs/features/yacc.prf \ - /usr/share/qt4/mkspecs/features/lex.prf \ - /usr/share/qt4/mkspecs/features/include_source_dir.prf \ - /usr/lib/i386-linux-gnu/libQtSvg.prl \ - /usr/lib/i386-linux-gnu/libQtSql.prl \ - /usr/lib/i386-linux-gnu/libQtGui.prl \ - /usr/lib/i386-linux-gnu/libQtCore.prl - $(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ -o Makefile chinese-calendar.pro -/usr/share/qt4/mkspecs/common/unix.conf: -/usr/share/qt4/mkspecs/common/linux.conf: -/usr/share/qt4/mkspecs/common/gcc-base.conf: -/usr/share/qt4/mkspecs/common/gcc-base-unix.conf: -/usr/share/qt4/mkspecs/common/g++-base.conf: -/usr/share/qt4/mkspecs/common/g++-unix.conf: -/usr/share/qt4/mkspecs/qconfig.pri: -/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri: -/usr/share/qt4/mkspecs/features/qt_functions.prf: -/usr/share/qt4/mkspecs/features/qt_config.prf: -/usr/share/qt4/mkspecs/features/exclusive_builds.prf: -/usr/share/qt4/mkspecs/features/default_pre.prf: -/usr/share/qt4/mkspecs/features/release.prf: -/usr/share/qt4/mkspecs/features/default_post.prf: -/usr/share/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: -/usr/share/qt4/mkspecs/features/warn_on.prf: -/usr/share/qt4/mkspecs/features/qt.prf: -/usr/share/qt4/mkspecs/features/unix/thread.prf: -/usr/share/qt4/mkspecs/features/moc.prf: -/usr/share/qt4/mkspecs/features/resources.prf: -/usr/share/qt4/mkspecs/features/uic.prf: -/usr/share/qt4/mkspecs/features/yacc.prf: -/usr/share/qt4/mkspecs/features/lex.prf: -/usr/share/qt4/mkspecs/features/include_source_dir.prf: -/usr/lib/i386-linux-gnu/libQtSvg.prl: -/usr/lib/i386-linux-gnu/libQtSql.prl: -/usr/lib/i386-linux-gnu/libQtGui.prl: -/usr/lib/i386-linux-gnu/libQtCore.prl: -qmake: FORCE - @$(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ -o Makefile chinese-calendar.pro - -dist: - @$(CHK_DIR_EXISTS) .tmp/chinese-calendar1.0.0 || $(MKDIR) .tmp/chinese-calendar1.0.0 - $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/chinese-calendar1.0.0/ && $(COPY_FILE) --parents dateitem.h datemaskwidget.h chinesecalendar.h ccbo.h cnote.h .tmp/chinese-calendar1.0.0/ && $(COPY_FILE) --parents chinese-calendar.qrc .tmp/chinese-calendar1.0.0/ && $(COPY_FILE) --parents main.cpp dateitem.cpp datemaskwidget.cpp chinesecalendar.cpp ccbo.cpp cnote.cpp .tmp/chinese-calendar1.0.0/ && $(COPY_FILE) --parents calendar.ui dateitem.ui .tmp/chinese-calendar1.0.0/ && $(COPY_FILE) --parents translate/i18_zh_CN.ts .tmp/chinese-calendar1.0.0/ && (cd `dirname .tmp/chinese-calendar1.0.0` && $(TAR) chinese-calendar1.0.0.tar chinese-calendar1.0.0 && $(COMPRESS) chinese-calendar1.0.0.tar) && $(MOVE) `dirname .tmp/chinese-calendar1.0.0`/chinese-calendar1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/chinese-calendar1.0.0 - - -clean:compiler_clean - -$(DEL_FILE) $(OBJECTS) - -$(DEL_FILE) *~ core *.core - - -####### Sub-libraries - -distclean: clean - -$(DEL_FILE) $(TARGET) - -$(DEL_FILE) Makefile - - -check: first - -mocclean: compiler_moc_header_clean compiler_moc_source_clean - -mocables: compiler_moc_header_make_all compiler_moc_source_make_all - -compiler_moc_header_make_all: moc_dateitem.cpp moc_datemaskwidget.cpp moc_chinesecalendar.cpp moc_cnote.cpp -compiler_moc_header_clean: - -$(DEL_FILE) moc_dateitem.cpp moc_datemaskwidget.cpp moc_chinesecalendar.cpp moc_cnote.cpp -moc_dateitem.cpp: datemaskwidget.h \ - cnote.h \ - ui_dateitem.h \ - dateitem.h - /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) dateitem.h -o moc_dateitem.cpp - -moc_datemaskwidget.cpp: cnote.h \ - datemaskwidget.h - /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) datemaskwidget.h -o moc_datemaskwidget.cpp - -moc_chinesecalendar.cpp: ui_calendar.h \ - ccbo.h \ - dateitem.h \ - datemaskwidget.h \ - cnote.h \ - ui_dateitem.h \ - chinesecalendar.h - /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) chinesecalendar.h -o moc_chinesecalendar.cpp - -moc_cnote.cpp: cnote.h - /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) cnote.h -o moc_cnote.cpp - -compiler_rcc_make_all: qrc_chinese-calendar.cpp -compiler_rcc_clean: - -$(DEL_FILE) qrc_chinese-calendar.cpp -qrc_chinese-calendar.cpp: chinese-calendar.qrc \ - img/note.png \ - img/chinesecalendar-64.png \ - img/ok.png \ - img/icon.png \ - img/chinesecalendar.svg \ - img/no.png \ - img/icon-64.png \ - img/chinesecalendarBGyellow.png \ - translate/i18_zh_CN.qm \ - translate/i18_zh_CN.ts - /usr/bin/rcc -name chinese-calendar chinese-calendar.qrc -o qrc_chinese-calendar.cpp - -compiler_image_collection_make_all: qmake_image_collection.cpp -compiler_image_collection_clean: - -$(DEL_FILE) qmake_image_collection.cpp -compiler_moc_source_make_all: -compiler_moc_source_clean: -compiler_uic_make_all: ui_calendar.h ui_dateitem.h -compiler_uic_clean: - -$(DEL_FILE) ui_calendar.h ui_dateitem.h -ui_calendar.h: calendar.ui - /usr/bin/uic-qt4 calendar.ui -o ui_calendar.h - -ui_dateitem.h: dateitem.ui \ - datemaskwidget.h \ - cnote.h - /usr/bin/uic-qt4 dateitem.ui -o ui_dateitem.h - -compiler_yacc_decl_make_all: -compiler_yacc_decl_clean: -compiler_yacc_impl_make_all: -compiler_yacc_impl_clean: -compiler_lex_make_all: -compiler_lex_clean: -compiler_clean: compiler_moc_header_clean compiler_rcc_clean compiler_uic_clean - -####### Compile - -main.o: main.cpp chinesecalendar.h \ - ui_calendar.h \ - ccbo.h \ - dateitem.h \ - datemaskwidget.h \ - cnote.h \ - ui_dateitem.h - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp - -dateitem.o: dateitem.cpp dateitem.h \ - datemaskwidget.h \ - cnote.h \ - ui_dateitem.h - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o dateitem.o dateitem.cpp - -datemaskwidget.o: datemaskwidget.cpp datemaskwidget.h \ - cnote.h \ - chinesecalendar.h \ - ui_calendar.h \ - ccbo.h \ - dateitem.h \ - ui_dateitem.h - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o datemaskwidget.o datemaskwidget.cpp - -chinesecalendar.o: chinesecalendar.cpp chinesecalendar.h \ - ui_calendar.h \ - ccbo.h \ - dateitem.h \ - datemaskwidget.h \ - cnote.h \ - ui_dateitem.h - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o chinesecalendar.o chinesecalendar.cpp - -ccbo.o: ccbo.cpp ccbo.h - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o ccbo.o ccbo.cpp - -cnote.o: cnote.cpp cnote.h \ - ccbo.h - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o cnote.o cnote.cpp - -moc_dateitem.o: moc_dateitem.cpp - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_dateitem.o moc_dateitem.cpp - -moc_datemaskwidget.o: moc_datemaskwidget.cpp - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_datemaskwidget.o moc_datemaskwidget.cpp - -moc_chinesecalendar.o: moc_chinesecalendar.cpp - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_chinesecalendar.o moc_chinesecalendar.cpp - -moc_cnote.o: moc_cnote.cpp - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_cnote.o moc_cnote.cpp - -qrc_chinese-calendar.o: qrc_chinese-calendar.cpp - $(CXX) -c $(CXXFLAGS) $(INCPATH) -o qrc_chinese-calendar.o qrc_chinese-calendar.cpp - -####### Install - -install_inst: first FORCE - @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/share/chinese-calendar/db/ || $(MKDIR) $(INSTALL_ROOT)/usr/share/chinese-calendar/db/ - -$(INSTALL_FILE) /home/kylin/chinese-calendar/KylinLunar.db $(INSTALL_ROOT)/usr/share/chinese-calendar/db/ - - -uninstall_inst: FORCE - -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/share/chinese-calendar/db/KylinLunar.db - -$(DEL_DIR) $(INSTALL_ROOT)/usr/share/chinese-calendar/db/ - - -install_inst1: first FORCE - @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/share/pixmaps/ || $(MKDIR) $(INSTALL_ROOT)/usr/share/pixmaps/ - -$(INSTALL_FILE) /home/kylin/chinese-calendar/img/chinesecalendar-64.png $(INSTALL_ROOT)/usr/share/pixmaps/ - - -uninstall_inst1: FORCE - -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/share/pixmaps/chinesecalendar-64.png - -$(DEL_DIR) $(INSTALL_ROOT)/usr/share/pixmaps/ - - -install_inst2: first FORCE - @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/share/applications/ || $(MKDIR) $(INSTALL_ROOT)/usr/share/applications/ - -$(INSTALL_PROGRAM) /home/kylin/chinese-calendar/chinese-calendar.desktop $(INSTALL_ROOT)/usr/share/applications/ - -strip $(INSTALL_ROOT)/usr/share/applications/chinese-calendar.desktop - - -uninstall_inst2: FORCE - -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/share/applications/chinese-calendar.desktop - -$(DEL_DIR) $(INSTALL_ROOT)/usr/share/applications/ - - -install_inst3: first FORCE - @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/etc/xdg/autostart/ || $(MKDIR) $(INSTALL_ROOT)/etc/xdg/autostart/ - -$(INSTALL_PROGRAM) /home/kylin/chinese-calendar/chinese-calendar.desktop $(INSTALL_ROOT)/etc/xdg/autostart/ - -strip $(INSTALL_ROOT)/etc/xdg/autostart/chinese-calendar.desktop - - -uninstall_inst3: FORCE - -$(DEL_FILE) -r $(INSTALL_ROOT)/etc/xdg/autostart/chinese-calendar.desktop - -$(DEL_DIR) $(INSTALL_ROOT)/etc/xdg/autostart/ - - -install_target: first FORCE - @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/bin/ || $(MKDIR) $(INSTALL_ROOT)/usr/bin/ - -$(INSTALL_PROGRAM) "$(QMAKE_TARGET)" "$(INSTALL_ROOT)/usr/bin/$(QMAKE_TARGET)" - -$(STRIP) "$(INSTALL_ROOT)/usr/bin/$(QMAKE_TARGET)" - -uninstall_target: FORCE - -$(DEL_FILE) "$(INSTALL_ROOT)/usr/bin/$(QMAKE_TARGET)" - -$(DEL_DIR) $(INSTALL_ROOT)/usr/bin/ - - -install: install_inst install_inst1 install_inst2 install_inst3 install_target FORCE - -uninstall: uninstall_inst uninstall_inst1 uninstall_inst2 uninstall_inst3 uninstall_target FORCE - -FORCE: - diff -Nru chinese-calendar-0.7.6/ccbo.cpp chinese-calendar-0.7.8/ccbo.cpp --- chinese-calendar-0.7.6/ccbo.cpp 2013-03-13 02:08:45.000000000 +0000 +++ chinese-calendar-0.7.8/ccbo.cpp 2013-07-31 15:43:32.000000000 +0000 @@ -258,9 +258,10 @@ return lunar_month; } -QString CCBO::ctcl_displaydata(int y, int m, int d,QString data) +QString CCBO::ctcl_displaydata(int y, int m, int d) { QString QueryStr; + QString data; QueryStr=QString("select note from cnote where y=%1 and m=%2 and d=%3").arg(y).arg(m).arg(d); data=ctcl_common_query("cnote",QueryStr); return data; @@ -274,7 +275,7 @@ QString note; QString insert; QueryStr=QString("select note from cnote where y=%1 and m=%2 and d=%3").arg(y).arg(m).arg(d); - note=ctcl_common_query("cnote",QueryStr); + note=ctcl_common_query("cnote",QueryStr); if(textedit.isEmpty()&¬e.isEmpty()) return 0; if(note.isEmpty()) @@ -410,13 +411,45 @@ ctc->choliday=ctcl_common_query("choliday",QueryStr); //logSqlError("choliday",QueryStr); } + if(ctc->month>0&&!(ctc->choliday.isEmpty())) + ctc->ischoliday=true; + else + ctc->ischoliday=false; return 1; } bool CCBO::InitConnection(QString Path) { + QString QueryStr; + QString systempath,systemdirectory; + QStringList env = QProcess::systemEnvironment().filter(QRegExp("^XDG_DATA_HOME=")); + if (env.length() == 0) { + systemdirectory = QDir::homePath() + "/.local/share"; + } else { + systemdirectory = env.at(0); + systemdirectory = systemdirectory.mid(systemdirectory.indexOf("=") + 1); + if (systemdirectory.isEmpty()) { + systemdirectory = QDir::homePath() + "/.local/share"; + } + } + + systemdirectory = QString("%1/chinese-calendar").arg(systemdirectory); + systempath = QString("%1/KylinLunar.db").arg(systemdirectory); + + if(!QFile::exists(systempath)) + { + QDir d; + if (d.mkpath(systemdirectory) == false) { + return false; + } + if (QFile::copy("/usr/share/chinese-calendar/db/KylinLunar.db", systempath) == false) { + return false; + } + } + QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE"); - db.setDatabaseName("/usr/share/chinese-calendar/db/KylinLunar.db"); + db.setDatabaseName(systempath); + if (!db.open()) { return false; } diff -Nru chinese-calendar-0.7.6/ccbo.h chinese-calendar-0.7.8/ccbo.h --- chinese-calendar-0.7.6/ccbo.h 2013-03-13 02:08:45.000000000 +0000 +++ chinese-calendar-0.7.8/ccbo.h 2013-07-31 15:43:32.000000000 +0000 @@ -65,6 +65,7 @@ QString holiday; QString choliday; bool laststerm; + bool ischoliday; QString yi; QString ji; QString note; @@ -78,7 +79,7 @@ int ctcl_solar_to_lunar(int y,int m,int d,struct CCalendar* ctc); bool InitConnection(QString Path); int ctcl_savenote(int y,int m, int d ,QString textedit); - QString ctcl_displaydata(int y,int m,int d,QString data); + QString ctcl_displaydata(int y,int m,int d); private: QByteArray lunarstr; int maxyear; diff -Nru chinese-calendar-0.7.6/chinese-calendar.desktop chinese-calendar-0.7.8/chinese-calendar.desktop --- chinese-calendar-0.7.6/chinese-calendar.desktop 2013-03-13 02:08:45.000000000 +0000 +++ chinese-calendar-0.7.8/chinese-calendar.desktop 2013-07-31 15:43:32.000000000 +0000 @@ -1,8 +1,9 @@ [Desktop Entry] Name=chinese-calendar +Name[zh_CN]=中国农历 Comment=Chinese lunar calendar Exec=/usr/bin/chinese-calendar -Icon=/usr/share/pixmaps/chinesecalendar-64.png +Icon=chinesecalendar-64.png StartupNotify=true Terminal=false Type=Application diff -Nru chinese-calendar-0.7.6/chinese-calendar.pro chinese-calendar-0.7.8/chinese-calendar.pro --- chinese-calendar-0.7.6/chinese-calendar.pro 2013-03-13 02:08:45.000000000 +0000 +++ chinese-calendar-0.7.8/chinese-calendar.pro 2013-07-31 15:43:32.000000000 +0000 @@ -11,12 +11,34 @@ inst2.path = /usr/share/applications inst3.files += chinese-calendar.desktop inst3.path = /etc/xdg/autostart +default_skin.files += skin/default/chinesecalendarBGyellow.png \ + skin/default/no.png \ + skin/default/note.png \ + skin/default/ok.png +default_skin.path = /usr/share/chinese-calendar/skin/default +black_skin.files += skin/black/chinesecalendar.png \ + skin/black/no.png \ + skin/black/no-hover.png \ + skin/black/ok.png \ + skin/black/ok-hover.png \ + skin/black/note.png \ + skin/black/arrow-left.png \ + skin/black/arrow-right.png \ + skin/black/arrow-down.png +black_skin.path = /usr/share/chinese-calendar/skin/black +qss.files += skin/default-skin.qss \ + skin/black-skin.qss +qss.path = /usr/share/chinese-calendar/skin + target.source += $$TARGET target.path = /usr/bin INSTALLS += inst \ inst1 \ inst2 \ inst3 \ + default_skin \ + black_skin \ + qss \ target diff -Nru chinese-calendar-0.7.6/chinese-calendar.qrc chinese-calendar-0.7.8/chinese-calendar.qrc --- chinese-calendar-0.7.6/chinese-calendar.qrc 2013-03-13 02:08:45.000000000 +0000 +++ chinese-calendar-0.7.8/chinese-calendar.qrc 2013-07-31 15:43:32.000000000 +0000 @@ -2,13 +2,9 @@ img/chinesecalendar.svg img/chinesecalendar-64.png - img/chinesecalendarBGyellow.png img/icon.png img/icon-64.png translate/i18_zh_CN.qm translate/i18_zh_CN.ts - img/no.png - img/note.png - img/ok.png diff -Nru chinese-calendar-0.7.6/chinesecalendar.cpp chinese-calendar-0.7.8/chinesecalendar.cpp --- chinese-calendar-0.7.6/chinesecalendar.cpp 2013-03-13 02:08:45.000000000 +0000 +++ chinese-calendar-0.7.8/chinesecalendar.cpp 2013-07-31 15:43:32.000000000 +0000 @@ -22,21 +22,12 @@ #include "chinesecalendar.h" -Cnote *note = 0; ChineseCalendar::ChineseCalendar(QWidget *parent) : QWidget(parent) { - setupUi(this); - - note = new Cnote; - QDesktopWidget desktop; - int width = desktop.screenGeometry().width(); - int height = desktop.screenGeometry().height(); - note->setGeometry(QRect(width-400,80,224,280)); - note->hide(); - - bg = new QPixmap(":/img/chinesecalendarBGyellow.png"); + setupUi(this); m_strFileList.clear(); +// bg = new QPixmap(":/img/chinesecalendarBGyellow.png"); icon = QIcon(":/img/icon.png"); icon64 = QIcon(":/img/chinesecalendar-64.png"); mycalendat=new CCBO; @@ -48,19 +39,16 @@ connect(monthCombo, SIGNAL(activated(int)), this, SLOT(setMonth(int))); connect(YearSelect, SIGNAL(currentIndexChanged(int)), this, SLOT(setYear(int))); connect(this->backtotoday, SIGNAL(clicked()), this, SLOT(backtoday())); - connect(note,SIGNAL(save(QString)),this,SLOT(savedata(QString))); - - - this->TbnextMonth->setStyleSheet("QPushButton{background-color:transparent;color:rgb(200,200,150);}QPushButton:hover{color:rgb(255,255,255);}"); - this->TbnextYear->setStyleSheet("QPushButton{background-color:transparent;color:rgb(200,200,150);}QPushButton:hover{color:rgb(255,255,255);}"); - this->TbpreviousMonth->setStyleSheet("QPushButton{background-color:transparent;color:rgb(200,200,150);}QPushButton:hover{color:rgb(255,255,255);}"); - this->TbpreviousYear->setStyleSheet("QPushButton{background-color:transparent;color:rgb(200,200,150);}QPushButton:hover{color:rgb(255,255,255);}"); - this->backtotoday->setStyleSheet("QPushButton{background-color:transparent;color:rgb(200,200,150);}QPushButton:hover{color:rgb(255,255,255);}"); - this->YearSelect->setStyleSheet("QComboBox{border: 2px solid lightgray;border-radius: 5px;font:12pt;}"); - this->monthCombo->setStyleSheet("QComboBox{border: 2px solid lightgray;border-radius: 5px;font:12pt;}"); - this->label->setStyleSheet("QLabel{font:12pt;}"); - this->label_2->setStyleSheet("QLabel{font:12pt;}"); +// this->TbnextMonth->setStyleSheet("QPushButton{background-color:transparent;color:rgb(200,200,150);}QPushButton:hover{color:rgb(255,255,255);}"); +// this->TbnextYear->setStyleSheet("QPushButton{background-color:transparent;color:rgb(200,200,150);}QPushButton:hover{color:rgb(255,255,255);}"); +// this->TbpreviousMonth->setStyleSheet("QPushButton{background-color:transparent;color:rgb(200,200,150);}QPushButton:hover{color:rgb(255,255,255);}"); +// this->TbpreviousYear->setStyleSheet("QPushButton{background-color:transparent;color:rgb(200,200,150);}QPushButton:hover{color:rgb(255,255,255);}"); +// this->backtotoday->setStyleSheet("QPushButton{background-color:transparent;color:rgb(200,200,150);}QPushButton:hover{color:rgb(255,255,255);}"); +// this->YearSelect->setStyleSheet("QComboBox{border: 2px solid lightgray;border-radius: 5px;font:12pt;}"); +// this->monthCombo->setStyleSheet("QComboBox{border: 2px solid lightgray;border-radius: 5px;font:12pt;}"); +// this->label->setStyleSheet("QLabel{font:12pt;}"); +// this->label_2->setStyleSheet("QLabel{font:12pt;}"); QDateTime dateTime; QString currentTime; @@ -149,17 +137,15 @@ ji = QString("").append(chinesejilist.at(0)).append("\n"); this->label_18->setText(ji); - QString cnote=mycalendat->ctcl_displaydata(day.year(),day.month(),day.day(),cnote); + QString cnote=mycalendat->ctcl_displaydata(day.year(),day.month(),day.day()); QString haveplan=QString("今日有行程安排"); QString noplan=QString("今日无行程安排"); - QStringList cnotelist=cnote.split(" "); - int count=cnotelist.count(); - QString space=QString(""); - while(count>0&&(cnotelist.at(count-1)==space)) + int num=cnote.count(); + while( num > 0 && cnote.at(num-1).isSpace()) { - count--; + num--; } - if(cnote.isEmpty()||count==0) + if(cnote.isEmpty() || num == 0) this->label_19->setText(noplan); else this->label_19->setText(haveplan); @@ -449,6 +435,15 @@ this->createTray(); + + + note = new Cnote; + QDesktopWidget desktop; + int width = desktop.screenGeometry().width(); + note->setGeometry(QRect(width-400,80,224,280)); + connect(note,SIGNAL(save(QString)),this,SLOT(savedata(QString))); + note->hide(); + } ChineseCalendar::~ChineseCalendar() @@ -464,9 +459,10 @@ int today = clickday; QString dateplan = QString("%1月%2日计划安排").arg(this->monthCombo->currentText()).arg(day); QString data; - data=mycalendat->ctcl_displaydata(year,month,today,data); + data=mycalendat->ctcl_displaydata(year,month,today); note->textedit->setText(data); note->datelabel->setText(dateplan); + note->exec(); } void ChineseCalendar::savedata(QString data) @@ -474,8 +470,8 @@ int year = this->YearSelect->currentText().toInt(); int month = this->monthCombo->currentText().toInt(); int day = clickday; - QString note = data; mycalendat->ctcl_savenote(year,month,day,data); + note->hide(); } @@ -498,6 +494,37 @@ this->actionStaysNormal->setChecked(true); connect(actionStaysNormal, SIGNAL(triggered()), this, SLOT(setMode())); + // default skin + this->actionDefault = new QAction(tr("Default"), this); + actionDefault->setCheckable(true); + actionDefault->setChecked(true); + connect(actionDefault, SIGNAL(triggered()), this, SLOT(slotChangeSkin())); + + // black skin + this->actionSkin = new QAction(tr("Black"), this); + actionSkin->setCheckable(true); + connect(actionSkin, SIGNAL(triggered()), this, SLOT(slotChangeSkin())); + + this->skinMenu = new QMenu(tr("换肤"), this); + this->skinMenu->addAction(actionDefault); + this->skinMenu->addAction(actionSkin); + + QActionGroup *actSkinGrp = new QActionGroup(this); + actSkinGrp->addAction(actionDefault); + actSkinGrp->addAction(actionSkin); + + // read user customizated skin files + readSkinFiles(); + + foreach (QString strSkin, m_strFileList) + { + QAction *actionNew = new QAction(strSkin, this); + actionNew->setCheckable(true); + actSkinGrp->addAction(actionNew); + this->skinMenu->addAction(actionNew); + connect(actionNew, SIGNAL(triggered()), this, SLOT(slotChangeSkin())); + } + this->ag = new QActionGroup(this); this->ag->addAction(actionStaysOnTop); this->ag->addAction(actionStaysOnBottom); @@ -513,6 +540,8 @@ this->trayMenu->addAction(actionStaysOnBottom); this->trayMenu->addAction(actionStaysNormal); this->trayMenu->addSeparator(); + this->trayMenu->addMenu(skinMenu); + this->trayMenu->addSeparator(); this->trayMenu->addAction(actionQuit); this->trayIcon = new QSystemTrayIcon(this); @@ -523,8 +552,11 @@ void ChineseCalendar::paintEvent(QPaintEvent *) { + QStyleOption opt; + opt.init(this); QPainter painter(this); - painter.drawPixmap(0,0,width(),height(),*bg); +// painter.drawPixmap(0,0,width(),height(),*bg); + style()->drawPrimitive(QStyle::PE_Widget, &opt, &painter, this); // painter.setPen(Qt::gray); painter.setPen(QColor(255,121,3,100)); @@ -784,15 +816,13 @@ QString cnote=QString(""); QString haveplan=QString("今日有行程安排"); QString noplan=QString("今日无行程安排"); - cnote=mycalendat->ctcl_displaydata(date.year(),date.month(),date.day(),cnote); - QStringList cnotelist=cnote.split(" "); - QString space=QString(""); - int count=cnotelist.count(); - while(count>0&&(cnotelist.at(count-1)==space)) + cnote=mycalendat->ctcl_displaydata(date.year(),date.month(),date.day()); + int num=cnote.count(); + while( num > 0 && cnote.at(num-1).isSpace()) { - count--; + num--; } - if(cnote.isEmpty()||count==0) + if(cnote.isEmpty() || num == 0) this->label_19->setText(noplan); else this->label_19->setText(haveplan); @@ -879,6 +909,8 @@ else mycday=c.sterm; } + if(c.ischoliday) + mycday=c.choliday; int day = date.day(); if (weekDay == 7) weekDay = 0; @@ -1173,3 +1205,61 @@ this->show(); } } + +void ChineseCalendar::slotChangeSkin() +{ + QAction *action = qobject_cast(sender()); + QString strSkin = action->text(); + + if (!strSkin.isEmpty()) + { + if (strSkin.toLower() == "default" || strSkin.toLower() == "black") + { + changeSkin(strSkin.toLower()); + } + else + { + changeSkin(strSkin, false); + } + } +} + +void ChineseCalendar::changeSkin(const QString &skin, bool bFlag) +{ + QString strFilename(""); + + if (bFlag) + { +#ifdef DEBUG + strFilename = QCoreApplication::applicationDirPath() + QString("/skin/%1-skin.qss").arg(skin); +#else + strFilename = QString("/usr/share/chinese-calendar/skin/%1-skin.qss").arg(skin); +#endif + } + else + { + strFilename = QDir::homePath() + QString("/.local/share/chinese-calendar/skins/%1.qss").arg(skin); + } + + QFile qss(strFilename); + if (qss.open(QFile::ReadOnly)) + { + qApp->setStyleSheet(qss.readAll()); + qss.close(); + } +} + +void ChineseCalendar::readSkinFiles() +{ + QString systemdirectory; + systemdirectory = QDir::homePath() + "/.local/share/chinese-calendar/skins/"; + + QDir dir(systemdirectory); + foreach(QFileInfo info, dir.entryInfoList()) + { + if (info.isFile() && info.suffix() == "qss") + { + m_strFileList << info.baseName(); + } + } +} diff -Nru chinese-calendar-0.7.6/chinesecalendar.h chinese-calendar-0.7.8/chinesecalendar.h --- chinese-calendar-0.7.6/chinesecalendar.h 2013-03-13 02:08:45.000000000 +0000 +++ chinese-calendar-0.7.8/chinesecalendar.h 2013-07-31 15:43:32.000000000 +0000 @@ -58,6 +58,7 @@ void setItemLayout(); void resetItemLayout(); CCalendar fixshengxiao(QDate); + Cnote *note; void paintEvent(QPaintEvent *); @@ -73,6 +74,9 @@ QMenu *trayMenu; QActionGroup *ag; QAction *actionShow, *actionStaysOnTop, *actionStaysOnBottom, *actionStaysNormal, *actionQuit; + QAction *actionDefault; + QAction *actionSkin; + QMenu *skinMenu; public slots: void setMonth(int month); @@ -96,6 +100,12 @@ void on_TbnextMonth_clicked(); void on_TbpreviousMonth_clicked(); void on_TbpreviousYear_clicked(); + void slotChangeSkin(); +private: + void changeSkin(const QString &, bool bFlag = true); + void readSkinFiles(); + + QStringList m_strFileList; }; #endif diff -Nru chinese-calendar-0.7.6/cnote.cpp chinese-calendar-0.7.8/cnote.cpp --- chinese-calendar-0.7.6/cnote.cpp 2013-03-13 02:08:45.000000000 +0000 +++ chinese-calendar-0.7.8/cnote.cpp 2013-07-31 15:43:32.000000000 +0000 @@ -3,17 +3,17 @@ #include Cnote::Cnote(QWidget *parent) : - QWidget(parent) + QDialog(parent) { setWindowFlags(Qt::FramelessWindowHint); setAttribute(Qt::WA_TranslucentBackground); - pix.load(":/img/note.png",0,Qt::AvoidDither|Qt::ThresholdDither|Qt::ThresholdAlphaDither); + //pix.load(":/img/note.png",0,Qt::AvoidDither|Qt::ThresholdDither|Qt::ThresholdAlphaDither); resize(224,280); - textedit = new QTextEdit(this); - ok = new QPushButton(this); - cancel = new QPushButton(this); - datelabel = new QLineEdit(this); - clearplan = new QPushButton(this); + textedit = new QTextEdit(this); textedit->setObjectName("textedit"); + ok = new QPushButton(this); ok->setObjectName("ok"); + cancel = new QPushButton(this);cancel->setObjectName("cancel"); + datelabel = new QLabel(this);datelabel->setObjectName("datelabel"); + clearplan = new QPushButton(this);clearplan->setObjectName("clearplan"); textedit->resize(155,140); textedit->move(30,60); ok->resize(30,30); @@ -25,15 +25,14 @@ clearplan->move(30,210); datelabel->resize(120,20); datelabel->move(50,40); - datelabel->setEnabled(false); - ok->setStyleSheet("QPushButton{background-color:transparent;}"); - cancel->setStyleSheet("QPushButton{background-color:transparent;border:0 solid}"); - datelabel->setStyleSheet("QLineEdit{background-color:transparent;border:0 solid;}"); - clearplan->setStyleSheet("QPushButton{background-color:transparent;}"); - ok->setIcon(QIcon(":/img/ok.png")); - cancel->setIcon(QIcon(":/img/no.png")); - textedit->setStyleSheet("QTextEdit{background-color:transparent;border:0 solid;}"); + //ok->setStyleSheet("QPushButton{background-color:transparent;}"); + //cancel->setStyleSheet("QPushButton{background-color:transparent;border:0 solid}"); + //datelabel->setStyleSheet("QLabel{background-color:transparent;border:0 solid;}"); + //clearplan->setStyleSheet("QPushButton{background-color:transparent;}"); + //ok->setIcon(QIcon(":/img/ok.png")); + //cancel->setIcon(QIcon(":/img/no.png")); + //textedit->setStyleSheet("QTextEdit{background-color:transparent;border:0 solid;}"); connect(this->ok,SIGNAL(clicked()),this,SLOT(savenote())); connect(this->cancel,SIGNAL(clicked()),this,SLOT(cancelnote())); connect(this->clearplan,SIGNAL(clicked()),this,SLOT(clean())); @@ -67,7 +66,10 @@ void Cnote::paintEvent(QPaintEvent *) { QPainter painter(this); - painter.drawPixmap(0,0,pix.scaled(this->size(),Qt::IgnoreAspectRatio,Qt::SmoothTransformation)); + //painter.drawPixmap(0,0,pix.scaled(this->size(),Qt::IgnoreAspectRatio,Qt::SmoothTransformation)); + QStyleOption opt; + opt.init(this); + style()->drawPrimitive(QStyle::PE_Widget, &opt, &painter, this); } void Cnote::mouseMoveEvent(QMouseEvent *event) diff -Nru chinese-calendar-0.7.6/cnote.h chinese-calendar-0.7.8/cnote.h --- chinese-calendar-0.7.6/cnote.h 2013-03-13 02:08:45.000000000 +0000 +++ chinese-calendar-0.7.8/cnote.h 2013-07-31 15:43:32.000000000 +0000 @@ -3,8 +3,9 @@ #include #include +#include -class Cnote : public QWidget +class Cnote : public QDialog { Q_OBJECT public: @@ -14,13 +15,12 @@ void paintEvent(QPaintEvent *); QPoint dragPos; QTextEdit *textedit; - QLineEdit *datelabel; + QLabel *datelabel; protected: void mouseMoveEvent(QMouseEvent *event); void mousePressEvent(QMouseEvent *event); void mouseReleaseEvent(QMouseEvent *event); private: -// QTextEdit *textedit; QPushButton *ok; QPushButton *cancel; QPushButton *clearplan; diff -Nru chinese-calendar-0.7.6/dateitem.cpp chinese-calendar-0.7.8/dateitem.cpp --- chinese-calendar-0.7.6/dateitem.cpp 2013-03-13 02:08:45.000000000 +0000 +++ chinese-calendar-0.7.8/dateitem.cpp 2013-07-31 15:43:32.000000000 +0000 @@ -21,7 +21,7 @@ */ #include "dateitem.h" -extern Cnote *note; +//extern Cnote *note; DateItem::DateItem(QWidget *parent) : QWidget(parent), @@ -131,7 +131,7 @@ if(!ui->label->text().isNull()) { emit day(ui->label->text()); - note->show(); +// note->show(); } } @@ -186,4 +186,10 @@ this->isFocus = true; } - +void DateItem::paintEvent(QPaintEvent *) +{ + QPainter painter(this); + QStyleOption opt; + opt.init(this); + style()->drawPrimitive(QStyle::PE_Widget, &opt, &painter, this); +} diff -Nru chinese-calendar-0.7.6/dateitem.h chinese-calendar-0.7.8/dateitem.h --- chinese-calendar-0.7.6/dateitem.h 2013-03-13 02:08:45.000000000 +0000 +++ chinese-calendar-0.7.8/dateitem.h 2013-07-31 15:43:32.000000000 +0000 @@ -52,6 +52,7 @@ void resizeItem(int x,int y); protected: + void paintEvent(QPaintEvent *); bool eventFilter(QObject *o, QEvent *ev); void enter(); void leave(); diff -Nru chinese-calendar-0.7.6/debian/bzr-builder.manifest chinese-calendar-0.7.8/debian/bzr-builder.manifest --- chinese-calendar-0.7.6/debian/bzr-builder.manifest 1970-01-01 00:00:00.000000000 +0000 +++ chinese-calendar-0.7.8/debian/bzr-builder.manifest 2013-07-31 15:43:32.000000000 +0000 @@ -0,0 +1,2 @@ +# bzr-builder format 0.3 deb-version {debupstream}-0~33 +lp:~mutse-young/chinese-calendar/trunk revid:yyhoo2.young@gmail.com-20130506144225-y4vlipruzrsvvkb8 diff -Nru chinese-calendar-0.7.6/debian/changelog chinese-calendar-0.7.8/debian/changelog --- chinese-calendar-0.7.6/debian/changelog 2013-03-26 14:53:29.000000000 +0000 +++ chinese-calendar-0.7.8/debian/changelog 2013-07-31 15:43:32.000000000 +0000 @@ -1,45 +1,13 @@ -chinese-calendar (0.7.6-0ubuntu4) raring; urgency=low +chinese-calendar (0.7.8-0~33~raring1) raring; urgency=low - * add 03-save-data-per-user.diff (LP: #1160149) - * remove debian/postinst, since db will be saved under - user's home. + * Auto build. - -- Zhengpeng Hou Tue, 26 Mar 2013 22:49:47 +0800 + -- mutse Wed, 31 Jul 2013 15:43:32 +0000 -chinese-calendar (0.7.6-0ubuntu3) raring; urgency=low +chinese-calendar (0.7.8-1) raring; urgency=low - * add 02-fix-write-permission.diff. (LP: #1159732) + * add skins changing function code + * add default and black skin qss files - -- Zhengpeng Hou Mon, 25 Mar 2013 20:12:01 +0800 + -- mutse Wed, 01 May 2013 19:11:07 +0800 -chinese-calendar (0.7.6-0ubuntu2) raring; urgency=low - - * Add 01-fix-crash.diff to fix the crash on startup. - - -- Zhengpeng Hou Thu, 14 Mar 2013 21:41:07 +0800 - -chinese-calendar (0.7.6-0ubuntu1) raring; urgency=high - - * Fix bug #1154063, bug #1154075, bug #1154079, bug #1154050. - * Modify note function. - - -- abelsaber (Yes,it's true) Wed, 13 Mar 2013 10:12:21 +0800 - -chinese-calendar (0.7.5) raring; urgency=high - - * Fix bug #1124849, bug #1124747, bug #1124831, bug #1131516, bug #1124825, bug #1129925. - * Add note function. - - -- abelsaber (Yes,it's true) Tue, 12 Mar 2013 14:25:51 +0800 - -chinese-calendar (0.7.4) raring; urgency=low - - * Optimize the display of dateitem, add systemtray. - - -- abelsaber (Yes,it's true) Tue, 29 Jan 2013 14:33:08 +0800 - -chinese-calendar (0.6.2-1) raring; urgency=low - - * Initial release. - - -- abelsaber (Yes,it's true) Tue, 22 Jan 2013 14:10:26 +0800 diff -Nru chinese-calendar-0.7.6/debian/patches/01-fix-crash.diff chinese-calendar-0.7.8/debian/patches/01-fix-crash.diff --- chinese-calendar-0.7.6/debian/patches/01-fix-crash.diff 2013-03-14 13:40:39.000000000 +0000 +++ chinese-calendar-0.7.8/debian/patches/01-fix-crash.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,55 +0,0 @@ -Index: chinese-calendar-0.7.6/chinesecalendar.cpp -=================================================================== ---- chinese-calendar-0.7.6.orig/chinesecalendar.cpp 2013-03-13 10:08:45.000000000 +0800 -+++ chinese-calendar-0.7.6/chinesecalendar.cpp 2013-03-14 21:40:34.444225307 +0800 -@@ -152,14 +152,12 @@ - QString cnote=mycalendat->ctcl_displaydata(day.year(),day.month(),day.day(),cnote); - QString haveplan=QString("今日有行程安排"); - QString noplan=QString("今日无行程安排"); -- QStringList cnotelist=cnote.split(" "); -- int count=cnotelist.count(); -- QString space=QString(""); -- while(count>0&&(cnotelist.at(count-1)==space)) -+ int num=cnote.count(); -+ while( num > 0 && cnote.at(num-1).isSpace()) - { -- count--; -+ num--; - } -- if(cnote.isEmpty()||count==0) -+ if(cnote.isEmpty() || num == 0) - this->label_19->setText(noplan); - else - this->label_19->setText(haveplan); -@@ -785,14 +783,12 @@ - QString haveplan=QString("今日有行程安排"); - QString noplan=QString("今日无行程安排"); - cnote=mycalendat->ctcl_displaydata(date.year(),date.month(),date.day(),cnote); -- QStringList cnotelist=cnote.split(" "); -- QString space=QString(""); -- int count=cnotelist.count(); -- while(count>0&&(cnotelist.at(count-1)==space)) -+ int num=cnote.count(); -+ while( num > 0 && cnote.at(num-1).isSpace()) - { -- count--; -+ num--; - } -- if(cnote.isEmpty()||count==0) -+ if(cnote.isEmpty() || num == 0) - this->label_19->setText(noplan); - else - this->label_19->setText(haveplan); -Index: chinese-calendar-0.7.6/cnote.cpp -=================================================================== ---- chinese-calendar-0.7.6.orig/cnote.cpp 2013-03-13 10:08:45.000000000 +0800 -+++ chinese-calendar-0.7.6/cnote.cpp 2013-03-14 21:40:34.444225307 +0800 -@@ -28,7 +28,7 @@ - datelabel->setEnabled(false); - - ok->setStyleSheet("QPushButton{background-color:transparent;}"); -- cancel->setStyleSheet("QPushButton{background-color:transparent;border:0 solid}"); -+ cancel->setStyleSheet("QPushButton{background-color:transparent;}"); - datelabel->setStyleSheet("QLineEdit{background-color:transparent;border:0 solid;}"); - clearplan->setStyleSheet("QPushButton{background-color:transparent;}"); - ok->setIcon(QIcon(":/img/ok.png")); diff -Nru chinese-calendar-0.7.6/debian/patches/02-fix-write-permission.diff chinese-calendar-0.7.8/debian/patches/02-fix-write-permission.diff --- chinese-calendar-0.7.6/debian/patches/02-fix-write-permission.diff 2013-03-25 12:05:09.000000000 +0000 +++ chinese-calendar-0.7.8/debian/patches/02-fix-write-permission.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,100 +0,0 @@ -Index: chinese-calendar-0.7.6/ccbo.cpp -=================================================================== ---- chinese-calendar-0.7.6.orig/ccbo.cpp 2013-03-13 10:08:45.000000000 +0800 -+++ chinese-calendar-0.7.6/ccbo.cpp 2013-03-25 20:04:26.529812299 +0800 -@@ -258,9 +258,10 @@ - - return lunar_month; - } --QString CCBO::ctcl_displaydata(int y, int m, int d,QString data) -+QString CCBO::ctcl_displaydata(int y, int m, int d) - { - QString QueryStr; -+ QString data; - QueryStr=QString("select note from cnote where y=%1 and m=%2 and d=%3").arg(y).arg(m).arg(d); - data=ctcl_common_query("cnote",QueryStr); - return data; -Index: chinese-calendar-0.7.6/ccbo.h -=================================================================== ---- chinese-calendar-0.7.6.orig/ccbo.h 2013-03-13 10:08:45.000000000 +0800 -+++ chinese-calendar-0.7.6/ccbo.h 2013-03-25 20:04:26.529812299 +0800 -@@ -78,7 +78,7 @@ - int ctcl_solar_to_lunar(int y,int m,int d,struct CCalendar* ctc); - bool InitConnection(QString Path); - int ctcl_savenote(int y,int m, int d ,QString textedit); -- QString ctcl_displaydata(int y,int m,int d,QString data); -+ QString ctcl_displaydata(int y,int m,int d); - private: - QByteArray lunarstr; - int maxyear; -Index: chinese-calendar-0.7.6/chinesecalendar.cpp -=================================================================== ---- chinese-calendar-0.7.6.orig/chinesecalendar.cpp 2013-03-25 19:33:02.000000000 +0800 -+++ chinese-calendar-0.7.6/chinesecalendar.cpp 2013-03-25 20:04:26.529812299 +0800 -@@ -149,7 +149,7 @@ - ji = QString("").append(chinesejilist.at(0)).append("\n"); - this->label_18->setText(ji); - -- QString cnote=mycalendat->ctcl_displaydata(day.year(),day.month(),day.day(),cnote); -+ QString cnote=mycalendat->ctcl_displaydata(day.year(),day.month(),day.day()); - QString haveplan=QString("今日有行程安排"); - QString noplan=QString("今日无行程安排"); - int num=cnote.count(); -@@ -462,7 +462,7 @@ - int today = clickday; - QString dateplan = QString("%1月%2日计划安排").arg(this->monthCombo->currentText()).arg(day); - QString data; -- data=mycalendat->ctcl_displaydata(year,month,today,data); -+ data=mycalendat->ctcl_displaydata(year,month,today); - note->textedit->setText(data); - note->datelabel->setText(dateplan); - } -@@ -782,7 +782,7 @@ - QString cnote=QString(""); - QString haveplan=QString("今日有行程安排"); - QString noplan=QString("今日无行程安排"); -- cnote=mycalendat->ctcl_displaydata(date.year(),date.month(),date.day(),cnote); -+ cnote=mycalendat->ctcl_displaydata(date.year(),date.month(),date.day()); - int num=cnote.count(); - while( num > 0 && cnote.at(num-1).isSpace()) - { -Index: chinese-calendar-0.7.6/cnote.cpp -=================================================================== ---- chinese-calendar-0.7.6.orig/cnote.cpp 2013-03-25 19:33:02.000000000 +0800 -+++ chinese-calendar-0.7.6/cnote.cpp 2013-03-25 20:04:26.529812299 +0800 -@@ -12,7 +12,7 @@ - textedit = new QTextEdit(this); - ok = new QPushButton(this); - cancel = new QPushButton(this); -- datelabel = new QLineEdit(this); -+ datelabel = new QLabel(this); - clearplan = new QPushButton(this); - textedit->resize(155,140); - textedit->move(30,60); -@@ -25,11 +25,10 @@ - clearplan->move(30,210); - datelabel->resize(120,20); - datelabel->move(50,40); -- datelabel->setEnabled(false); - - ok->setStyleSheet("QPushButton{background-color:transparent;}"); -- cancel->setStyleSheet("QPushButton{background-color:transparent;}"); -- datelabel->setStyleSheet("QLineEdit{background-color:transparent;border:0 solid;}"); -+ cancel->setStyleSheet("QPushButton{background-color:transparent;border:0 solid}"); -+ datelabel->setStyleSheet("QLabel{background-color:transparent;border:0 solid;}"); - clearplan->setStyleSheet("QPushButton{background-color:transparent;}"); - ok->setIcon(QIcon(":/img/ok.png")); - cancel->setIcon(QIcon(":/img/no.png")); -Index: chinese-calendar-0.7.6/cnote.h -=================================================================== ---- chinese-calendar-0.7.6.orig/cnote.h 2013-03-13 10:08:45.000000000 +0800 -+++ chinese-calendar-0.7.6/cnote.h 2013-03-25 20:04:26.533812299 +0800 -@@ -14,7 +14,7 @@ - void paintEvent(QPaintEvent *); - QPoint dragPos; - QTextEdit *textedit; -- QLineEdit *datelabel; -+ QLabel *datelabel; - protected: - void mouseMoveEvent(QMouseEvent *event); - void mousePressEvent(QMouseEvent *event); diff -Nru chinese-calendar-0.7.6/debian/patches/03-save-data-per-user.diff chinese-calendar-0.7.8/debian/patches/03-save-data-per-user.diff --- chinese-calendar-0.7.6/debian/patches/03-save-data-per-user.diff 2013-03-26 14:49:01.000000000 +0000 +++ chinese-calendar-0.7.8/debian/patches/03-save-data-per-user.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,44 +0,0 @@ -Index: chinese-calendar-0.7.6/ccbo.cpp -=================================================================== ---- chinese-calendar-0.7.6.orig/ccbo.cpp 2013-03-26 22:48:03.000000000 +0800 -+++ chinese-calendar-0.7.6/ccbo.cpp 2013-03-26 22:48:52.638389293 +0800 -@@ -275,7 +275,7 @@ - QString note; - QString insert; - QueryStr=QString("select note from cnote where y=%1 and m=%2 and d=%3").arg(y).arg(m).arg(d); -- note=ctcl_common_query("cnote",QueryStr); -+ note=ctcl_common_query("cnote",QueryStr); - if(textedit.isEmpty()&¬e.isEmpty()) - return 0; - if(note.isEmpty()) -@@ -416,8 +416,29 @@ - - bool CCBO::InitConnection(QString Path) - { -+ QString QueryStr; -+ QString systempath,systemdirectory; -+ QStringList environment = QProcess::systemEnvironment(); -+ QString systemuser =environment.filter("USER").at(0).split("=").at(1); -+ if (systemuser == "root") -+ { -+ systempath = QString("/%1/.chinese-calendar/KylinLunar.db").arg(systemuser); -+ systemdirectory = QString("/%1/.chinese-calendar").arg(systemuser); -+ } -+ else -+ { -+ systempath = QString("/home/%1/.chinese-calendar/KylinLunar.db").arg(systemuser); -+ systemdirectory = QString("/home/%1/.chinese-calendar").arg(systemuser); -+ } -+ if(!QFile::exists(systempath)) -+ { -+ QString cmd = QString("mkdir %1 && cp /usr/share/chinese-calendar/db/KylinLunar.db %2").arg(systemdirectory).arg(systemdirectory); -+ system(cmd.toAscii()); -+ } -+ - QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE"); -- db.setDatabaseName("/usr/share/chinese-calendar/db/KylinLunar.db"); -+ db.setDatabaseName(systempath); -+ - if (!db.open()) { - return false; - } diff -Nru chinese-calendar-0.7.6/debian/patches/series chinese-calendar-0.7.8/debian/patches/series --- chinese-calendar-0.7.6/debian/patches/series 2013-03-26 14:48:36.000000000 +0000 +++ chinese-calendar-0.7.8/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -01-fix-crash.diff -02-fix-write-permission.diff -03-save-data-per-user.diff diff -Nru chinese-calendar-0.7.6/debian/source/format chinese-calendar-0.7.8/debian/source/format --- chinese-calendar-0.7.6/debian/source/format 2013-07-31 15:47:15.086467108 +0000 +++ chinese-calendar-0.7.8/debian/source/format 2013-07-31 15:47:15.206467645 +0000 @@ -1 +1 @@ -3.0 (quilt) +3.0 (native) Binary files /tmp/_O8ymsL2SO/chinese-calendar-0.7.6/img/chinesecalendarBGyellow.png and /tmp/N7ZlgAiTj_/chinese-calendar-0.7.8/img/chinesecalendarBGyellow.png differ Binary files /tmp/_O8ymsL2SO/chinese-calendar-0.7.6/img/no.png and /tmp/N7ZlgAiTj_/chinese-calendar-0.7.8/img/no.png differ Binary files /tmp/_O8ymsL2SO/chinese-calendar-0.7.6/img/note.png and /tmp/N7ZlgAiTj_/chinese-calendar-0.7.8/img/note.png differ Binary files /tmp/_O8ymsL2SO/chinese-calendar-0.7.6/img/ok.png and /tmp/N7ZlgAiTj_/chinese-calendar-0.7.8/img/ok.png differ diff -Nru chinese-calendar-0.7.6/main.cpp chinese-calendar-0.7.8/main.cpp --- chinese-calendar-0.7.6/main.cpp 2013-03-13 02:08:45.000000000 +0000 +++ chinese-calendar-0.7.8/main.cpp 2013-07-31 15:43:32.000000000 +0000 @@ -26,7 +26,6 @@ #include #include #include "chinesecalendar.h" -#include "cnote.h" int main(int argc, char *argv[]) { @@ -38,6 +37,16 @@ translator.load(":/translate/i18_zh_CN.qm"); app.installTranslator(&translator); + // load default skin +#ifdef DEBUG + QFile file(QCoreApplication::applicationDirPath() + "/skin/default-skin.qss"); +#else + QFile file("/usr/share/chinese-calendar/skin/default-skin.qss"); +#endif + file.open(QFile::ReadOnly); + QString stylesheet = QObject::tr(file.readAll()); + app.setStyleSheet(stylesheet); + ChineseCalendar *window = new ChineseCalendar; app.setWindowIcon(window->icon64); window->setWindowFlags(Qt::FramelessWindowHint); @@ -45,6 +54,7 @@ QDesktopWidget desktop; int width = desktop.screenGeometry().width(); int height = desktop.screenGeometry().height(); + window->setGeometry(QRect(width-525,30,520,350)); window->hide(); return app.exec(); diff -Nru chinese-calendar-0.7.6/skin/README.md chinese-calendar-0.7.8/skin/README.md --- chinese-calendar-0.7.6/skin/README.md 1970-01-01 00:00:00.000000000 +0000 +++ chinese-calendar-0.7.8/skin/README.md 2013-07-31 15:43:32.000000000 +0000 @@ -0,0 +1,27 @@ +皮肤说明文档 +============ + +目录结构如下: + +skin/ + | + |-black/ + |-black-skin.qss + | + |-blue/ + |-blue.qss + | + |-default/ + |-default-skin.qss + +其中,black-skin.qss default-skin.qss为系统皮肤文件,blue.qss为用户自己定义皮肤文件。 + +### 用户自定义皮肤 + +若用户想制作自己的个性皮肤,可参考blue.qss。运行程序前,将自制皮肤文件复制到 ~/.local/share/chinese-calendar/skins 目录(若无此目录,请使用 mkdir -p ~/.local/share/chinese-calendar/skins 来新建)下即可换肤。 + +### 问题与反馈 + +mutse(墨汁) + + Binary files /tmp/_O8ymsL2SO/chinese-calendar-0.7.6/skin/black/bg.png and /tmp/N7ZlgAiTj_/chinese-calendar-0.7.8/skin/black/bg.png differ Binary files /tmp/_O8ymsL2SO/chinese-calendar-0.7.6/skin/black/chinesecalendar.png and /tmp/N7ZlgAiTj_/chinese-calendar-0.7.8/skin/black/chinesecalendar.png differ Binary files /tmp/_O8ymsL2SO/chinese-calendar-0.7.6/skin/black/no.png and /tmp/N7ZlgAiTj_/chinese-calendar-0.7.8/skin/black/no.png differ Binary files /tmp/_O8ymsL2SO/chinese-calendar-0.7.6/skin/black/note.png and /tmp/N7ZlgAiTj_/chinese-calendar-0.7.8/skin/black/note.png differ Binary files /tmp/_O8ymsL2SO/chinese-calendar-0.7.6/skin/black/ok.png and /tmp/N7ZlgAiTj_/chinese-calendar-0.7.8/skin/black/ok.png differ diff -Nru chinese-calendar-0.7.6/skin/black-skin.qss chinese-calendar-0.7.8/skin/black-skin.qss --- chinese-calendar-0.7.6/skin/black-skin.qss 1970-01-01 00:00:00.000000000 +0000 +++ chinese-calendar-0.7.8/skin/black-skin.qss 2013-07-31 15:43:32.000000000 +0000 @@ -0,0 +1,189 @@ +/* + * This file is part of the chinese-calendar project + * Copyright (C) 2013 Mutse & UbuntuKylin Members + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * This project is developed by "UbuntuKylin Members" team, + * see + * Author: Mutse + */ + +ChineseCalendar{ + background: url(/usr/share/chinese-calendar/skin/black/chinesecalendar.png); +} + +ChineseCalendar QPushButton#TbnextMonth{ + background-color:transparent; + image: url(/usr/share/chinese-calendar/skin/black/arrow-right.png); + color:rgb(200,200,150); +} + +ChineseCalendar QPushButton#TbnextMonth:hover{ + color:rgb(255,255,255); +} + +ChineseCalendar QPushButton#TbnextYear{ + background-color:transparent; + image: url(/usr/share/chinese-calendar/skin/black/arrow-right.png); + color:rgb(200,200,150); +} + +ChineseCalendar QPushButton#TbnextYear:hover{ + color:rgb(255,255,255); +} + +ChineseCalendar QPushButton#TbpreviousMonth{ + background-color:transparent; + image: url(/usr/share/chinese-calendar/skin/black/arrow-left.png); + color:rgb(200,200,150); +} + +ChineseCalendar QPushButton#TbpreviousMonth:hover{ + color:rgb(255,255,255); +} + +ChineseCalendar QPushButton#TbpreviousYear{ + background-color:transparent; + image: url(/usr/share/chinese-calendar/skin/black/arrow-left.png); + color:rgb(200,200,150); +} + +ChineseCalendar QPushButton#TbpreviousYear:hover{ + color:rgb(255,255,255); +} + +ChineseCalendar QPushButton#backtotoday{ + background-color:transparent; + color:rgb(200,200,150); +} + +ChineseCalendar QPushButton#backtotoday:hover{ + color:rgb(255,255,255); +} + +ChineseCalendar QComboBox#YearSelect{ + border: 2px solid lightgray; + border-radius: 5px; + font:12pt; +} + +ChineseCalendar QComboBox#monthCombo{ + border: 2px solid lightgray; + border-radius: 5px; + font:12pt; +} + +ChineseCalendar QComboBox::down-arrow { + image: url(/usr/share/chinese-calendar/skin/black/arrow-down.png); + background-color: transparent; +} + +ChineseCalendar QLabel#label{ + font:12pt; +} + +ChineseCalendar QLabel#label_2{ + font:12pt; +} + +ChineseCalendar QLabel#label_3, QLabel#label_9{ + color: rgb(112, 121, 138); +} + +ChineseCalendar QLabel#label_4, + QLabel#label_5, + QLabel#label_6, + QLabel#label_7, + QLabel#label_8{ + color: rgb(248,128,35); +} + +ChineseCalendar QLabel#label_10{ + color: rgb(248,128,35); +} + +ChineseCalendar QLabel#label_11{ + color: rgb(238,124,35); +} + +ChineseCalendar QLabel#label_12, + QLabel#label_13, QLabel#label_14, + QLabel#label_15, QLabel#label_17{ + color: rgb(112, 121, 138); +} + +ChineseCalendar QLabel#label_16{ + color: black; +} + +Cnote{ + background: url(/usr/share/chinese-calendar/skin/black/note.png); +} + +Cnote QPushButton#ok{ + image: url(/usr/share/chinese-calendar/skin/black/ok.png); + background-color:transparent; +} + +Cnote QPushButton#ok:hover{ + image: url(/usr/share/chinese-calendar/skin/black/ok-hover.png); +} + +Cnote QPushButton#cancel{ + image: url(/usr/share/chinese-calendar/skin/black/no.png); + background-color:transparent; + + border:0 solid; +} + +Cnote QPushButton#cancel:hover{ + image: url(/usr/share/chinese-calendar/skin/black/no-hover.png); +} + +Cnote QLabel#datelabel{ + background-color: transparent; + color: rgb(133,143,162); + border:0 solid; +} + +Cnote QPushButton#clearplan{ + background-color: transparent; + color: rgb(133,143,162); +} + +Cnote QTextEdit#textedit{ + background-color: transparent; + color: rgb(133,143,162); + border:0 solid; +} + +DateItem:focus{ + background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(238, 93, 0, 255), stop:1 rgba(255, 121, 2, 200)); +} + +DateItem QWidget:hover{ + background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(238, 93, 0, 155), stop:1 rgba(255, 121, 2, 100)); +} + +DateItem QLabel#label{ + color:rgb(112,121,138); +} + +DateItem QLabel#labe:pressed{ + color:rgb(255, 255, 0); +} + +DateItem QLabel#label_2{ + color:rgb(112, 121, 138); +} Binary files /tmp/_O8ymsL2SO/chinese-calendar-0.7.6/skin/default/chinesecalendarBGyellow.png and /tmp/N7ZlgAiTj_/chinese-calendar-0.7.8/skin/default/chinesecalendarBGyellow.png differ Binary files /tmp/_O8ymsL2SO/chinese-calendar-0.7.6/skin/default/no.png and /tmp/N7ZlgAiTj_/chinese-calendar-0.7.8/skin/default/no.png differ Binary files /tmp/_O8ymsL2SO/chinese-calendar-0.7.6/skin/default/note.png and /tmp/N7ZlgAiTj_/chinese-calendar-0.7.8/skin/default/note.png differ Binary files /tmp/_O8ymsL2SO/chinese-calendar-0.7.6/skin/default/ok.png and /tmp/N7ZlgAiTj_/chinese-calendar-0.7.8/skin/default/ok.png differ diff -Nru chinese-calendar-0.7.6/skin/default-skin.qss chinese-calendar-0.7.8/skin/default-skin.qss --- chinese-calendar-0.7.6/skin/default-skin.qss 1970-01-01 00:00:00.000000000 +0000 +++ chinese-calendar-0.7.8/skin/default-skin.qss 2013-07-31 15:43:32.000000000 +0000 @@ -0,0 +1,138 @@ +/* + * This file is part of the chinese-calendar project + * Copyright (C) 2013 Mutse & UbuntuKylin Members + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * This project is developed by "UbuntuKylin Members" team, + * see + * Author: Mutse + */ + +ChineseCalendar{ + background: url(/usr/share/chinese-calendar/skin/default/chinesecalendarBGyellow.png); +} + +ChineseCalendar QPushButton#TbnextMonth{ + background-color:transparent; + color:rgb(200,200,150); +} + +ChineseCalendar QPushButton#TbnextMonth:hover{ + color:rgb(255,255,255); +} + +ChineseCalendar QPushButton#TbnextYear{ + background-color:transparent; + color:rgb(200,200,150); +} + +ChineseCalendar QPushButton#TbnextYear:hover{ + color:rgb(255,255,255); +} + +ChineseCalendar QPushButton#TbpreviousMonth{ + background-color:transparent; + color:rgb(200,200,150); +} + +ChineseCalendar QPushButton#TbpreviousMonth:hover{ + color:rgb(255,255,255); +} + +ChineseCalendar QPushButton#TbpreviousYear{ + background-color:transparent; + color:rgb(200,200,150); +} + +ChineseCalendar QPushButton#TbpreviousYear:hover{ + color:rgb(255,255,255); +} + +ChineseCalendar QPushButton#backtotoday{ + background-color:transparent; + color:rgb(200,200,150); +} + +ChineseCalendar QPushButton#backtotoday:hover{ + color:rgb(255,255,255); +} + +ChineseCalendar QComboBox#YearSelect{ + border: 2px solid lightgray; + border-radius: 5px; + font:12pt; +} + +ChineseCalendar QComboBox#monthCombo{ + border: 2px solid lightgray; + border-radius: 5px; + font:12pt; +} + +ChineseCalendar QLabel#label{ + font:12pt; +} + +ChineseCalendar QLabel#label_2{ + font:12pt; +} + +Cnote{ + background: url(/usr/share/chinese-calendar/skin/default/note.png); +} + +Cnote QPushButton#ok{ + image: url(/usr/share/chinese-calendar/skin/default/ok.png); + background-color:transparent; +} + +Cnote QPushButton#cancel{ + image: url(/usr/share/chinese-calendar/skin/default/no.png); + background-color:transparent; + border:0 solid; +} + +Cnote QLabel#datelabel{ + background-color:transparent; + border:0 solid; +} + +Cnote QPushButton#clearplan{ + background-color:transparent; +} + +Cnote QTextEdit#textedit{ + background-color:transparent; + border:0 solid; +} + +DateItem:focus{ + background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(238, 93, 0, 255), stop:1 rgba(255, 121, 2, 200)); +} + +DateItem QWidget:hover{ + background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(238, 93, 0, 155), stop:1 rgba(255, 121, 2, 100)); +} + +DateItem QLabel#label{ + color:rgb(0,0,255); +} + +DateItem QLabel#labe:pressed{ + color:rgb(255,0,0); +} + +DateItem QLabel#label_2{ + color:rgb(0,0,0); +}