diff --git a/README.md b/README.md index efafaad..889992f 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@ UMWP Autochanger is a little tool for [UltraMon](http://www.realtimesoft.com/ult * randomly and periodically change the wallpaper of all your monitors, * manage sets of wallpapers, allowing you to quickly change which images are used. -Version : 1.6 -Release date : 08/03/2014 +Version : 1.7 +Release date : 01/08/2014 Author : Damien "Mistic" Sorel Website : http://www.strangeplanet.fr/work/umwp-autochanger License : GNU General Public License Version 3 @@ -48,7 +48,7 @@ A: Yes. Double-click on it's name, you can set the name, the type and the style Q: How hotkeys work ? A: There are two kind of hotkeys: the ones defined in the "Options" dialog allow to show/hide the application window, refresh the wallpaper and start/pause the timer. The ones defined in the set edit dialog allow to change the current set. You can assign the same hotkey to multiple sets. -In both cases, click on the input box and press the desired keys combinination. You must at least use one modifier (Ctrl, Shift, Alt, Win) and some keys are not available (Esc, Tab, Backspace, ...). Press Esc or Backspace to clear the hotkey. +In both cases, click on the input box and press the desired keys combinination. You must at least use one modifier (Ctrl, Shift, Alt, Win) and some keys are not available (Esc, Tab, Backspace, ...). Q: Can I reorder sets ? A: Yes. Simply drag & drop them. @@ -60,7 +60,7 @@ You will need Qt 4.8.4 and libqxt 0.6.2 ## Changelog -* 1.7 +* [1.7 (01/08/2014)](http://www.strangeplanet.fr/work/umwp-autochanger/download.php?ver=1.7) * new: add "Fill" mode * new: create default.wallpaper file if not present * change: don't delete missing sets but highlight them diff --git a/installer/data/readme.txt b/installer/data/readme.txt index cafbe2c..e984698 100644 --- a/installer/data/readme.txt +++ b/installer/data/readme.txt @@ -1,7 +1,7 @@ UltraMon Wallpaper Autochanger -Version : 1.6 -Release date : 08/03/2014 +Version : 1.7 +Release date : 01/08/2014 Author : Damien "Mistic" Sorel Website : http://www.strangeplanet.fr License : GNU General Public License Version 3 @@ -24,18 +24,15 @@ Installation ============ 1. Install and configure UltraMon on your computer. - 2. Go to the wallpaper configuration of UltraMon and ensure that the profile "default" exists, - if not, create it. You don't need to configure anything else on this screen. - - 3. Launch "UMWP Autochanger.exe". + 2. Launch "UMWP Autochanger.exe". - 3.1. Depending on your configuration, you might be asked to locate "UltraMonDesktop.exe". + 2.1. Depending on your configuration, you might be asked to locate "UltraMonDesktop.exe". - 4. Click on the plus button to add a new set. A set is basically a directory + 3. Click on the plus button to add a new set. A set is basically a directory containing JPEG/PNG/BMP files. UMWP Autochanger will browse this directory recursively up to 3 levels searching for image files. - 5. Once you have added your sets, the wallpaper will randomly change + 4. Once you have added your sets, the wallpaper will randomly change every 60 seconds (default delay). @@ -68,7 +65,7 @@ Troubleshouting You can assign the same hotkey to multiple sets. In both cases, click on the input box and press the desired keys combinination. You must at least use one modifier (Ctrl, Shift, Alt, Win) and some keys are - not available (Esc, Tab, Backspace, ...). Press Esc or Backspace to clear the hotkey. + not available (Esc, Tab, Backspace, ...). Q: Can I reorder sets ? A: Yes. Simply drag & drop them. @@ -77,6 +74,11 @@ Troubleshouting Changelog ========= +--- 1.7 (01/08/2014) + - new: add "Fill" mode + - new: create default.wallpaper file if not present + - change: don't delete missing sets but highlight them + --- 1.6 (08/03/2014) - change: Alt-F4 effectively closes application without prompt - fixed: application closes when closing dialog window while main window is hidden diff --git a/installer/package.bat b/installer/package.bat new file mode 100644 index 0000000..a62744c --- /dev/null +++ b/installer/package.bat @@ -0,0 +1 @@ +"C:\Program Files\7-Zip\7z.exe" a UMWP_Autochanger_1.7.zip ./data/* -x!*.ico \ No newline at end of file diff --git a/installer/setup.iss b/installer/setup.iss index 117492e..7f27323 100644 --- a/installer/setup.iss +++ b/installer/setup.iss @@ -1,6 +1,6 @@ #define AppId "{401CCECB-FFCC-4AF3-846D-A535F59D0834}" #define AppName "UMWP Autochanger" -#define AppVersion "1.6" +#define AppVersion "1.7" #define AppPublisher "StrangePlanet" #define PublisherURL "http://www.strangeplanet.fr" #define ProjectURL "http://www.strangeplanet.fr/work/umwp-autochanger" @@ -116,22 +116,3 @@ begin Result := True; end end; - -// handle options -{* -function NextButtonClick(CurPageID: Integer): Boolean; -begin - Result := True; - if CurPageID = wpSelectTasks then - begin - if IsTaskSelected('autostart') then - begin - MsgBox('Task has been checked.', mbInformation, MB_OK); - end - else - begin - MsgBox('Ttask has NOT been checked.', mbInformation, MB_OK); - end - end; -end; -*} \ No newline at end of file diff --git a/src/UMWP_Autochanger.pro b/src/UMWP_Autochanger.pro index 06ff103..35be2e1 100644 --- a/src/UMWP_Autochanger.pro +++ b/src/UMWP_Autochanger.pro @@ -28,8 +28,7 @@ SOURCES += \ qlineedithotkey.cpp \ qtoolbarext.cpp \ previewdialog.cpp \ - sysreader.cpp \ - reader.cpp + sysreader.cpp HEADERS += \ lib/createshortcut.h \ @@ -53,7 +52,8 @@ HEADERS += \ constants.h \ widgetblinker.h \ sysreader.h \ - qscreen.h + qscreen.h \ + qhotkeywidget.h RESOURCES += \ UMWP_Autochanger.qrc @@ -69,4 +69,5 @@ FORMS += \ mainwidget.ui \ seteditdialog.ui \ configdialog.ui \ - previewdialog.ui + previewdialog.ui \ + qhotkeywidget.ui diff --git a/src/UMWP_Autochanger.qrc b/src/UMWP_Autochanger.qrc index 1001143..f83e6a5 100644 --- a/src/UMWP_Autochanger.qrc +++ b/src/UMWP_Autochanger.qrc @@ -26,6 +26,7 @@ images/icons/about.png images/icons/images.png images/icons/help_color.png + images/icons/bullet_cross.png images/buttons/button_activate.png diff --git a/src/configdialog.cpp b/src/configdialog.cpp index b4e2ba1..83e47ee 100644 --- a/src/configdialog.cpp +++ b/src/configdialog.cpp @@ -60,12 +60,12 @@ void ConfigDialog::done(int result) QString error; // validate hotkeys - QHash requestHotkeys; + QHash requestHotkeys; requestHotkeys.insert(tr("Refresh"), ui->hotkeyRefresh); requestHotkeys.insert(tr("Show/Hide"), ui->hotkeyShowHide); requestHotkeys.insert(tr("Start/Pause"), ui->hotkeyStartPause); - for (QHash::iterator it=requestHotkeys.begin(); it!=requestHotkeys.end(); ++it) + for (QHash::iterator it=requestHotkeys.begin(); it!=requestHotkeys.end(); ++it) { if (!it.value()->hotkey()) { @@ -73,7 +73,7 @@ void ConfigDialog::done(int result) } // check against other main hotkeys - for (QHash::iterator it2=requestHotkeys.begin(); it2!=it; ++it2) + for (QHash::iterator it2=requestHotkeys.begin(); it2!=it; ++it2) { if (!it2.value()->hotkey()) { diff --git a/src/configdialog.ui b/src/configdialog.ui index 48c8fb5..1e53a73 100644 --- a/src/configdialog.ui +++ b/src/configdialog.ui @@ -6,7 +6,7 @@ 0 0 - 420 + 430 188 @@ -14,6 +14,16 @@ Options + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + @@ -89,45 +99,42 @@ - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - Hotkeys - - + + 3 + + + - Show/Hide : + Refresh : Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - + + - Refresh : + Show/Hide : Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + Use hotkeys + + + @@ -138,18 +145,14 @@ - - + + - - + + - - - - Use hotkeys - - + + @@ -158,9 +161,10 @@ - QLineEditHotkey - QLineEdit -
qlineedithotkey.h
+ QHotKeyWidget + QWidget +
qhotkeywidget.h
+ 1
diff --git a/src/images/icons/bullet_cross.png b/src/images/icons/bullet_cross.png new file mode 100644 index 0000000..d3ca868 Binary files /dev/null and b/src/images/icons/bullet_cross.png differ diff --git a/src/lang/en_GB/main.ts b/src/lang/en_GB/main.ts index 2402908..14aba8b 100644 --- a/src/lang/en_GB/main.ts +++ b/src/lang/en_GB/main.ts @@ -9,37 +9,37 @@ - + Configuration - + Delay : - + Minimize on startup - + Check files periodically - + Check updates - + Start with Windows - + Show notifications @@ -49,22 +49,22 @@ - + Show/Hide : - + Refresh : - + Start/Pause : - + Use hotkeys @@ -349,6 +349,14 @@ + + QHotKeyWidget + + + Reset + + + SetEditDialog @@ -372,7 +380,7 @@ - + Style : diff --git a/src/lang/fr_FR/main.qm b/src/lang/fr_FR/main.qm index 07a6b84..67d055e 100644 Binary files a/src/lang/fr_FR/main.qm and b/src/lang/fr_FR/main.qm differ diff --git a/src/lang/fr_FR/main.ts b/src/lang/fr_FR/main.ts index 85a8ba4..a242684 100644 --- a/src/lang/fr_FR/main.ts +++ b/src/lang/fr_FR/main.ts @@ -9,37 +9,37 @@ Options - + Configuration Configuration - + Delay : Délai : - + Minimize on startup Réduire au démarrage - + Check files periodically Vérifier les fichier périodiquement - + Check updates Chercher les nouvelles versions - + Start with Windows Démarrer avec Windows - + Show notifications Afficher les notifications @@ -49,22 +49,22 @@ Raccourcis - + Show/Hide : Masquer/Afficher : - + Refresh : Rafraîchir : - + Start/Pause : Démarrer/Pause : - + Use hotkeys Utiliser les raccourcis @@ -349,6 +349,14 @@ Fichiers courant + + QHotKeyWidget + + + Reset + Réinitialiser + + SetEditDialog @@ -372,7 +380,7 @@ Type : - + Style : Style : diff --git a/src/mainwidget.h b/src/mainwidget.h index ad22572..1618317 100644 --- a/src/mainwidget.h +++ b/src/mainwidget.h @@ -32,6 +32,7 @@ public slots: void slotUpdateList(bool _resetSel); void slotMoveItem(const QModelIndex &, int _from, int, const QModelIndex &, int _to); +private slots: void on_buttonAdd_clicked(); void on_buttonActivate_clicked(); void on_buttonDeactivate_clicked(); diff --git a/src/qhotkeywidget.h b/src/qhotkeywidget.h new file mode 100644 index 0000000..22eb30a --- /dev/null +++ b/src/qhotkeywidget.h @@ -0,0 +1,59 @@ +#ifndef QHOTKEYWIDGET_H +#define QHOTKEYWIDGET_H + +#include + +#include "ui_qhotkeywidget.h" + +namespace Ui { + class QHotKeyWidget; +} + + +/** + * @brief Widget combining a QLineEditHotKey and a clear button + */ +class QHotKeyWidget : public QWidget +{ + Q_OBJECT + +private: + Ui::QHotKeyWidget* ui; + + int m_hotkey; + +public: + QHotKeyWidget(QWidget* _parent = 0) : QWidget(_parent), ui(new Ui::QHotKeyWidget) + { + ui->setupUi(this); + } + + ~QHotKeyWidget() + { + delete ui; + } + + const int hotkey() const + { + return m_hotkey; + } + + void setHotkey(const int _hotkey) + { + m_hotkey = _hotkey; + ui->key->setText(QKeySequence(m_hotkey).toString(QKeySequence::NativeText)); + } + +private slots: + void on_key_hotkeyChanged(const int _hotkey) + { + setHotkey(_hotkey); + } + + void on_pushButton_clicked() + { + setHotkey(0); + } +}; + +#endif // QHOTKEYWIDGET_H diff --git a/src/qhotkeywidget.ui b/src/qhotkeywidget.ui new file mode 100644 index 0000000..032dbd3 --- /dev/null +++ b/src/qhotkeywidget.ui @@ -0,0 +1,62 @@ + + + QHotKeyWidget + + + + 0 + 0 + 102 + 24 + + + + + 0 + + + 0 + + + + + + + + + 16 + 16 + + + + + 16 + 16 + + + + Reset + + + + :/icon/bullet_cross:/icon/bullet_cross + + + true + + + + + + + + QLineEditHotkey + QLineEdit +
qlineedithotkey.h
+
+
+ + + + +
diff --git a/src/qlineedithotkey.cpp b/src/qlineedithotkey.cpp index 449eea7..d4a8497 100644 --- a/src/qlineedithotkey.cpp +++ b/src/qlineedithotkey.cpp @@ -19,8 +19,7 @@ void QLineEditHotkey::keyPressEvent(QKeyEvent* _event) // erase content if escape of return pressed if (key == Qt::Key_Escape || key == Qt::Key_Backspace) { - m_hotkey = 0; - setText(NULL); + emit hotkeyChanged(0); return; } @@ -51,20 +50,5 @@ void QLineEditHotkey::keyPressEvent(QKeyEvent* _event) mod+= Qt::META; } - m_hotkey = key + mod; - - setText(QKeySequence(m_hotkey).toString(QKeySequence::NativeText)); - - emit textChanged(text()); -} - -/** - * @brief QLineEditHotkey::vSetHotkey - * @param int _hotkey - */ -void QLineEditHotkey::setHotkey(const int &_hotkey) -{ - m_hotkey = _hotkey; - - setText(QKeySequence(m_hotkey).toString(QKeySequence::NativeText)); + emit hotkeyChanged(key + mod); } diff --git a/src/qlineedithotkey.h b/src/qlineedithotkey.h index 4c6c235..81dc7ff 100644 --- a/src/qlineedithotkey.h +++ b/src/qlineedithotkey.h @@ -12,15 +12,11 @@ class QLineEditHotkey : public QLineEdit { Q_OBJECT -private: - int m_hotkey; - public: QLineEditHotkey(QWidget* _parent = 0); - const int hotkey() const { return m_hotkey; } - - void setHotkey(const int &_hotkey); +signals: + void hotkeyChanged(int); protected: void keyPressEvent(QKeyEvent* _event); diff --git a/src/seteditdialog.ui b/src/seteditdialog.ui index a095720..48082ef 100644 --- a/src/seteditdialog.ui +++ b/src/seteditdialog.ui @@ -73,9 +73,6 @@
- - - @@ -125,13 +122,17 @@ + + + - QLineEditHotkey - QLineEdit -
qlineedithotkey.h
+ QHotKeyWidget + QWidget +
qhotkeywidget.h
+ 1