Reorganization! Move all controllers into their own folders, move all RGBController wrappers into one folder, move i2c_smbus and serial_port dependencies into folders, and move main application/UI stuff into folders. Should help lead into creating a proper library

This commit is contained in:
Adam Honse 2019-08-22 18:43:17 -05:00
parent ef79de6c7c
commit 155ad165b1
61 changed files with 51 additions and 40 deletions

55
main.cpp Normal file
View file

@ -0,0 +1,55 @@
/******************************************************************************************\
* *
* main.cpp *
* *
* Main function for OpenAuraSDK GUI project *
* *
\******************************************************************************************/
#include "OpenAuraSDK.h"
#include "RGBController.h"
#include "i2c_smbus.h"
#include <vector>
#include <stdio.h>
#include <stdlib.h>
#ifdef WIN32
#include "OpenAuraSDKDialog.h"
#else /* WIN32 */
#include "OpenAuraSDKQtDialog.h"
#endif /* WIN32 */
extern std::vector<i2c_smbus_interface*> busses;
extern std::vector<RGBController*> rgb_controllers;
/******************************************************************************************\
* *
* main *
* *
* Main function. Detects busses and Aura controllers, then opens the main window *
* *
\******************************************************************************************/
int main(int argc, char* argv[])
{
DetectRGBControllers();
#if WIN32
OpenAuraSDKDialog dlg(busses, rgb_controllers);
dlg.DoModal();
return 0;
#else
QApplication a(argc, argv);
Ui::OpenAuraSDKQtDialog dlg(busses, rgb_controllers);
dlg.show();
return a.exec();
#endif
}