Misc: Remove unused files
This commit is contained in:
@ -6,7 +6,6 @@ add_library(common
|
||||
binary_reader_writer.h
|
||||
bitfield.h
|
||||
bitutils.h
|
||||
build_timestamp.h
|
||||
crash_handler.cpp
|
||||
crash_handler.h
|
||||
dimensional_array.h
|
||||
|
||||
@ -1,97 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* Created: 29.03.2018
|
||||
*
|
||||
* Authors:
|
||||
*
|
||||
* Assembled from the code released on Stackoverflow by:
|
||||
* Dennis (instructable.com/member/nqtronix) | https://stackoverflow.com/questions/23032002/c-c-how-to-get-integer-unix-timestamp-of-build-time-not-string
|
||||
* and
|
||||
* Alexis Wilke | https://stackoverflow.com/questions/10538444/do-you-know-of-a-c-macro-to-compute-unix-time-and-date
|
||||
*
|
||||
* Assembled by Jean Rabault
|
||||
*
|
||||
* BUILD_UNIX_TIMESTAMP gives the UNIX timestamp (unsigned long integer of seconds since 1st Jan 1970) of compilation from macros using the compiler defined __TIME__ macro.
|
||||
* This should include Gregorian calendar leap days, in particular the 29ths of February, 100 and 400 years modulo leaps.
|
||||
*
|
||||
* Careful: __TIME__ is the local time of the computer, NOT the UTC time in general!
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef COMPILE_TIME_H_
|
||||
#define COMPILE_TIME_H_
|
||||
|
||||
// Some definitions for calculation
|
||||
#define SEC_PER_MIN 60UL
|
||||
#define SEC_PER_HOUR 3600UL
|
||||
#define SEC_PER_DAY 86400UL
|
||||
#define SEC_PER_YEAR (SEC_PER_DAY*365)
|
||||
|
||||
// extracts 1..4 characters from a string and interprets it as a decimal value
|
||||
#define CONV_STR2DEC_1(str, i) (str[i]>'0'?str[i]-'0':0)
|
||||
#define CONV_STR2DEC_2(str, i) (CONV_STR2DEC_1(str, i)*10 + str[i+1]-'0')
|
||||
#define CONV_STR2DEC_3(str, i) (CONV_STR2DEC_2(str, i)*10 + str[i+2]-'0')
|
||||
#define CONV_STR2DEC_4(str, i) (CONV_STR2DEC_3(str, i)*10 + str[i+3]-'0')
|
||||
|
||||
// Custom "glue logic" to convert the month name to a usable number
|
||||
#define GET_MONTH(str, i) (str[i]=='J' && str[i+1]=='a' && str[i+2]=='n' ? 1 : \
|
||||
str[i]=='F' && str[i+1]=='e' && str[i+2]=='b' ? 2 : \
|
||||
str[i]=='M' && str[i+1]=='a' && str[i+2]=='r' ? 3 : \
|
||||
str[i]=='A' && str[i+1]=='p' && str[i+2]=='r' ? 4 : \
|
||||
str[i]=='M' && str[i+1]=='a' && str[i+2]=='y' ? 5 : \
|
||||
str[i]=='J' && str[i+1]=='u' && str[i+2]=='n' ? 6 : \
|
||||
str[i]=='J' && str[i+1]=='u' && str[i+2]=='l' ? 7 : \
|
||||
str[i]=='A' && str[i+1]=='u' && str[i+2]=='g' ? 8 : \
|
||||
str[i]=='S' && str[i+1]=='e' && str[i+2]=='p' ? 9 : \
|
||||
str[i]=='O' && str[i+1]=='c' && str[i+2]=='t' ? 10 : \
|
||||
str[i]=='N' && str[i+1]=='o' && str[i+2]=='v' ? 11 : \
|
||||
str[i]=='D' && str[i+1]=='e' && str[i+2]=='c' ? 12 : 0)
|
||||
|
||||
// extract the information from the time string given by __TIME__ and __DATE__
|
||||
#define __TIME_SECONDS__ CONV_STR2DEC_2(__TIME__, 6)
|
||||
#define __TIME_MINUTES__ CONV_STR2DEC_2(__TIME__, 3)
|
||||
#define __TIME_HOURS__ CONV_STR2DEC_2(__TIME__, 0)
|
||||
#define __TIME_DAYS__ CONV_STR2DEC_2(__DATE__, 4)
|
||||
#define __TIME_MONTH__ GET_MONTH(__DATE__, 0)
|
||||
#define __TIME_YEARS__ CONV_STR2DEC_4(__DATE__, 7)
|
||||
|
||||
// Days in February
|
||||
#define _UNIX_TIMESTAMP_FDAY(year) \
|
||||
(((year) % 400) == 0UL ? 29UL : \
|
||||
(((year) % 100) == 0UL ? 28UL : \
|
||||
(((year) % 4) == 0UL ? 29UL : \
|
||||
28UL)))
|
||||
|
||||
// Days in the year
|
||||
#define _UNIX_TIMESTAMP_YDAY(year, month, day) \
|
||||
( \
|
||||
/* January */ day \
|
||||
/* February */ + (month >= 2 ? 31UL : 0UL) \
|
||||
/* March */ + (month >= 3 ? _UNIX_TIMESTAMP_FDAY(year) : 0UL) \
|
||||
/* April */ + (month >= 4 ? 31UL : 0UL) \
|
||||
/* May */ + (month >= 5 ? 30UL : 0UL) \
|
||||
/* June */ + (month >= 6 ? 31UL : 0UL) \
|
||||
/* July */ + (month >= 7 ? 30UL : 0UL) \
|
||||
/* August */ + (month >= 8 ? 31UL : 0UL) \
|
||||
/* September */+ (month >= 9 ? 31UL : 0UL) \
|
||||
/* October */ + (month >= 10 ? 30UL : 0UL) \
|
||||
/* November */ + (month >= 11 ? 31UL : 0UL) \
|
||||
/* December */ + (month >= 12 ? 30UL : 0UL) \
|
||||
)
|
||||
|
||||
// get the UNIX timestamp from a digits representation
|
||||
#define _UNIX_TIMESTAMP(year, month, day, hour, minute, second) \
|
||||
( /* time */ second \
|
||||
+ minute * SEC_PER_MIN \
|
||||
+ hour * SEC_PER_HOUR \
|
||||
+ /* year day (month + day) */ (_UNIX_TIMESTAMP_YDAY(year, month, day) - 1) * SEC_PER_DAY \
|
||||
+ /* year */ (year - 1970UL) * SEC_PER_YEAR \
|
||||
+ ((year - 1969UL) / 4UL) * SEC_PER_DAY \
|
||||
- ((year - 1901UL) / 100UL) * SEC_PER_DAY \
|
||||
+ ((year - 1601UL) / 400UL) * SEC_PER_DAY \
|
||||
)
|
||||
|
||||
// the UNIX timestamp
|
||||
#define BUILD_UNIX_TIMESTAMP (_UNIX_TIMESTAMP(__TIME_YEARS__, __TIME_MONTH__, __TIME_DAYS__, __TIME_HOURS__, __TIME_MINUTES__, __TIME_SECONDS__))
|
||||
|
||||
#endif
|
||||
@ -6,7 +6,6 @@
|
||||
<ClInclude Include="assert.h" />
|
||||
<ClInclude Include="bitfield.h" />
|
||||
<ClInclude Include="bitutils.h" />
|
||||
<ClInclude Include="build_timestamp.h" />
|
||||
<ClInclude Include="crash_handler.h" />
|
||||
<ClInclude Include="dimensional_array.h" />
|
||||
<ClInclude Include="dynamic_library.h" />
|
||||
|
||||
@ -33,7 +33,6 @@
|
||||
<ClInclude Include="memory_settings_interface.h" />
|
||||
<ClInclude Include="threading.h" />
|
||||
<ClInclude Include="scoped_guard.h" />
|
||||
<ClInclude Include="build_timestamp.h" />
|
||||
<ClInclude Include="sha1_digest.h" />
|
||||
<ClInclude Include="fastjmp.h" />
|
||||
<ClInclude Include="memmap.h" />
|
||||
|
||||
@ -35,8 +35,6 @@ set(SRCS
|
||||
cheatmanagerwindow.cpp
|
||||
cheatmanagerwindow.h
|
||||
cheatmanagerwindow.ui
|
||||
collapsiblewidget.cpp
|
||||
collapsiblewidget.h
|
||||
colorpickerbutton.cpp
|
||||
colorpickerbutton.h
|
||||
consolesettingswidget.cpp
|
||||
|
||||
@ -1,57 +0,0 @@
|
||||
// https://stackoverflow.com/questions/32476006/how-to-make-an-expandable-collapsable-section-widget-in-qt
|
||||
#include <QtCore/QPropertyAnimation>
|
||||
|
||||
#include "collapsiblewidget.h"
|
||||
|
||||
CollapsibleWidget::CollapsibleWidget(const QString& title, const int animationDuration, QWidget* parent)
|
||||
: QWidget(parent), animationDuration(animationDuration)
|
||||
{
|
||||
toggleButton.setStyleSheet("QToolButton { border: none; }");
|
||||
toggleButton.setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
|
||||
toggleButton.setArrowType(Qt::ArrowType::RightArrow);
|
||||
toggleButton.setText(title);
|
||||
toggleButton.setCheckable(true);
|
||||
toggleButton.setChecked(false);
|
||||
|
||||
contentArea.setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||
|
||||
// start out collapsed
|
||||
contentArea.setMaximumHeight(0);
|
||||
contentArea.setMinimumHeight(0);
|
||||
|
||||
// let the entire widget grow and shrink with its content
|
||||
toggleAnimation.addAnimation(new QPropertyAnimation(this, "minimumHeight"));
|
||||
toggleAnimation.addAnimation(new QPropertyAnimation(this, "maximumHeight"));
|
||||
toggleAnimation.addAnimation(new QPropertyAnimation(&contentArea, "maximumHeight"));
|
||||
|
||||
// don't waste space
|
||||
mainLayout.setContentsMargins(0, 0, 0, 0);
|
||||
mainLayout.addWidget(&toggleButton);
|
||||
mainLayout.addWidget(&contentArea);
|
||||
setLayout(&mainLayout);
|
||||
QObject::connect(&toggleButton, &QToolButton::clicked, [this](const bool checked) {
|
||||
toggleButton.setArrowType(checked ? Qt::ArrowType::DownArrow : Qt::ArrowType::RightArrow);
|
||||
toggleAnimation.setDirection(checked ? QAbstractAnimation::Forward : QAbstractAnimation::Backward);
|
||||
toggleAnimation.start();
|
||||
});
|
||||
}
|
||||
|
||||
void CollapsibleWidget::setContentLayout(QLayout* contentLayout)
|
||||
{
|
||||
delete contentArea.layout();
|
||||
contentArea.setLayout(contentLayout);
|
||||
const auto collapsedHeight = sizeHint().height() - contentArea.maximumHeight();
|
||||
auto contentHeight = contentLayout->sizeHint().height();
|
||||
for (int i = 0; i < toggleAnimation.animationCount() - 1; ++i)
|
||||
{
|
||||
QPropertyAnimation* spoilerAnimation = static_cast<QPropertyAnimation*>(toggleAnimation.animationAt(i));
|
||||
spoilerAnimation->setDuration(animationDuration);
|
||||
spoilerAnimation->setStartValue(collapsedHeight);
|
||||
spoilerAnimation->setEndValue(collapsedHeight + contentHeight);
|
||||
}
|
||||
QPropertyAnimation* contentAnimation =
|
||||
static_cast<QPropertyAnimation*>(toggleAnimation.animationAt(toggleAnimation.animationCount() - 1));
|
||||
contentAnimation->setDuration(animationDuration);
|
||||
contentAnimation->setStartValue(0);
|
||||
contentAnimation->setEndValue(contentHeight);
|
||||
}
|
||||
@ -1,27 +0,0 @@
|
||||
// https://stackoverflow.com/questions/32476006/how-to-make-an-expandable-collapsable-section-widget-in-qt
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QParallelAnimationGroup>
|
||||
#include <QtWidgets/QScrollArea>
|
||||
#include <QtWidgets/QToolButton>
|
||||
#include <QtWidgets/QVBoxLayout>
|
||||
#include <QtWidgets/QWidget>
|
||||
|
||||
class CollapsibleWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
private:
|
||||
QVBoxLayout mainLayout;
|
||||
QToolButton toggleButton;
|
||||
QParallelAnimationGroup toggleAnimation;
|
||||
QScrollArea contentArea;
|
||||
int animationDuration{300};
|
||||
|
||||
public:
|
||||
explicit CollapsibleWidget(const QString& title = "", const int animationDuration = 300, QWidget* parent = 0);
|
||||
|
||||
QScrollArea* getScrollArea() { return &contentArea; }
|
||||
|
||||
void setContentLayout(QLayout* contentLayout);
|
||||
};
|
||||
@ -11,7 +11,6 @@
|
||||
<ClCompile Include="biossettingswidget.cpp" />
|
||||
<ClCompile Include="cheatmanagerwindow.cpp" />
|
||||
<ClCompile Include="cheatcodeeditordialog.cpp" />
|
||||
<ClCompile Include="collapsiblewidget.cpp" />
|
||||
<ClCompile Include="colorpickerbutton.cpp" />
|
||||
<ClCompile Include="consolesettingswidget.cpp" />
|
||||
<ClCompile Include="controllerbindingwidgets.cpp" />
|
||||
@ -77,7 +76,6 @@
|
||||
<QtMoc Include="debuggerwindow.h" />
|
||||
<QtMoc Include="achievementsettingswidget.h" />
|
||||
<QtMoc Include="achievementlogindialog.h" />
|
||||
<QtMoc Include="collapsiblewidget.h" />
|
||||
<QtMoc Include="controllerbindingwidgets.h" />
|
||||
<QtMoc Include="controllerglobalsettingswidget.h" />
|
||||
<QtMoc Include="controllersettingswindow.h" />
|
||||
@ -226,7 +224,6 @@
|
||||
<ClCompile Include="$(IntDir)moc_biossettingswidget.cpp" />
|
||||
<ClCompile Include="$(IntDir)moc_cheatmanagerwindow.cpp" />
|
||||
<ClCompile Include="$(IntDir)moc_cheatcodeeditordialog.cpp" />
|
||||
<ClCompile Include="$(IntDir)moc_collapsiblewidget.cpp" />
|
||||
<ClCompile Include="$(IntDir)moc_colorpickerbutton.cpp" />
|
||||
<ClCompile Include="$(IntDir)moc_consolesettingswidget.cpp" />
|
||||
<ClCompile Include="$(IntDir)moc_controllerbindingwidgets.cpp" />
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
<ClCompile Include="emulationsettingswidget.cpp" />
|
||||
<ClCompile Include="achievementsettingswidget.cpp" />
|
||||
<ClCompile Include="achievementlogindialog.cpp" />
|
||||
<ClCompile Include="collapsiblewidget.cpp" />
|
||||
<ClCompile Include="qtkeycodes.cpp" />
|
||||
<ClCompile Include="controllerglobalsettingswidget.cpp" />
|
||||
<ClCompile Include="controllersettingswindow.cpp" />
|
||||
@ -72,9 +71,6 @@
|
||||
<ClCompile Include="$(IntDir)moc_cheatmanagerwindow.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)moc_collapsiblewidget.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="$(IntDir)moc_colorpickerbutton.cpp">
|
||||
<Filter>moc</Filter>
|
||||
</ClCompile>
|
||||
@ -228,7 +224,6 @@
|
||||
<QtMoc Include="emulationsettingswidget.h" />
|
||||
<QtMoc Include="achievementsettingswidget.h" />
|
||||
<QtMoc Include="achievementlogindialog.h" />
|
||||
<QtMoc Include="collapsiblewidget.h" />
|
||||
<QtMoc Include="controllerbindingwidgets.h" />
|
||||
<QtMoc Include="controllerglobalsettingswidget.h" />
|
||||
<QtMoc Include="controllersettingswindow.h" />
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
fxc /T vs_4_0 /E main /O3 /Fh display_vs.hlsl.h /Vn "static s_display_vs_bytecode" display_vs.hlsl
|
||||
fxc /T ps_4_0 /E main /O3 /Fh display_ps.hlsl.h /Vn "static s_display_ps_bytecode" display_ps.hlsl
|
||||
fxc /T ps_4_0 /E main /O3 /D ALPHA=1 /Fh display_ps_alpha.hlsl.h /Vn "static s_display_ps_alpha_bytecode" display_ps.hlsl
|
||||
Reference in New Issue
Block a user