diff options
author | daniel-Jones <daniel@danieljon.es> | 2016-06-18 15:15:36 +0930 |
---|---|---|
committer | daniel-Jones <daniel@danieljon.es> | 2016-06-18 15:15:36 +0930 |
commit | 963bfd49550f8ec555174ce236f4f0bfa2d370f3 (patch) | |
tree | bda4eecc7d83131a376c7eb2c7cf56abcadb0a0b /qt/RGBController | |
parent | 3ebaa902b535773247105f3d0aa4e039ef7b55c6 (diff) | |
download | RGB-Controller-963bfd49550f8ec555174ce236f4f0bfa2d370f3.tar.gz RGB-Controller-963bfd49550f8ec555174ce236f4f0bfa2d370f3.zip |
Added ability to save presets to file. NOTE: this commit includes a hardcoded presets.txt file location for personal use, make sure to replace it with just presets.txt!
Diffstat (limited to 'qt/RGBController')
-rw-r--r-- | qt/RGBController/.controllerwindow.cpp.swo | bin | 16384 -> 0 bytes | |||
-rw-r--r-- | qt/RGBController/.controllerwindow.cpp.swp | bin | 24576 -> 0 bytes | |||
-rw-r--r-- | qt/RGBController/.controllerwindow.h.swo | bin | 12288 -> 0 bytes | |||
-rw-r--r-- | qt/RGBController/.controllerwindow.h.swp | bin | 12288 -> 0 bytes | |||
-rwxr-xr-x | qt/RGBController/RGBController.pro.user | 2 | ||||
-rwxr-xr-x | qt/RGBController/controllerwindow.cpp | 9 |
6 files changed, 8 insertions, 3 deletions
diff --git a/qt/RGBController/.controllerwindow.cpp.swo b/qt/RGBController/.controllerwindow.cpp.swo Binary files differdeleted file mode 100644 index 39ed63a..0000000 --- a/qt/RGBController/.controllerwindow.cpp.swo +++ /dev/null diff --git a/qt/RGBController/.controllerwindow.cpp.swp b/qt/RGBController/.controllerwindow.cpp.swp Binary files differdeleted file mode 100644 index e33becb..0000000 --- a/qt/RGBController/.controllerwindow.cpp.swp +++ /dev/null diff --git a/qt/RGBController/.controllerwindow.h.swo b/qt/RGBController/.controllerwindow.h.swo Binary files differdeleted file mode 100644 index b273e95..0000000 --- a/qt/RGBController/.controllerwindow.h.swo +++ /dev/null diff --git a/qt/RGBController/.controllerwindow.h.swp b/qt/RGBController/.controllerwindow.h.swp Binary files differdeleted file mode 100644 index 51c6912..0000000 --- a/qt/RGBController/.controllerwindow.h.swp +++ /dev/null diff --git a/qt/RGBController/RGBController.pro.user b/qt/RGBController/RGBController.pro.user index 92130ad..cd38fba 100755 --- a/qt/RGBController/RGBController.pro.user +++ b/qt/RGBController/RGBController.pro.user @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE QtCreatorProject> -<!-- Written by QtCreator 4.0.0, 2016-05-30T20:26:17. --> +<!-- Written by QtCreator 4.0.0, 2016-06-15T13:55:50. --> <qtcreator> <data> <variable>EnvironmentId</variable> diff --git a/qt/RGBController/controllerwindow.cpp b/qt/RGBController/controllerwindow.cpp index 250be58..ef0ab30 100755 --- a/qt/RGBController/controllerwindow.cpp +++ b/qt/RGBController/controllerwindow.cpp @@ -82,7 +82,11 @@ void controllerWindow::load_presets() * -> split line at delimeter * -> add [0] to dropdown (name), add [1] to an array that stores all the values */ - QFile inputFile("presets.txt"); + + /* PLEASE READ ME + * This is a hard coded directory for i3wm's sake, you have to fix this yourself. + */ + QFile inputFile("/home/daniel_j/documents/school/2016\ research\ project/RGBController/qt/build/degub/presets.txt"); if (inputFile.open(QIODevice::ReadOnly)) { QTextStream in(&inputFile); @@ -99,7 +103,7 @@ void controllerWindow::load_presets() info_log("Presets loaded"); } else { - show_msgbox("Unable to find the presets fle.\nThis file needs to be named 'presets.txt' and be located in the same directory as the binary."); + show_msgbox("Unable to find the presets file.\nThis file needs to be named 'presets.txt' and be located in the same directory as the binary."); info_log("Presets file not found."); } } @@ -306,4 +310,5 @@ void controllerWindow::on_preset_save_button_clicked() { save_preset(tempname); } + ui->preset_name_textbox->clear(); } |