Compare commits

...
Author SHA1 Message Date
Tannin f77b5daf9d incorrect use of "complete" file suffixes 2015-06-09 20:40:13 +02:00
Tannin 1dc5a32871 Merge 2015-05-09 21:46:40 +02:00
Tannin db0a791155 Merge in changes by Tom Tanner 2015-03-27 18:24:37 +01:00
Tom Tanner 65ce23f906 Fixed Scons build for existing bits.
Changed pynedit.pro to fetch from 'standard' install location
Changed saveas code to use organizer report rather than uibase - this way it's
not dependant on the vagaries of the include path, and works the same as the
rest of the organiser directory
2015-03-20 10:34:30 +00:00
Tom Tanner 4fddc311c5 Merge with branch1.2 2015-03-18 17:40:29 +00:00
Tom Tanner c863a94793 Refactoring and cleanup. 2015-03-18 14:16:04 +00:00
Tom Tanner 77f074f59e Every plugin now built 2015-03-17 16:31:15 +00:00
Tannin b72216ad8c extended the game-plugin interface 2015-01-29 19:26:42 +01:00
Tannin 0a8bcff070 Merge with branch1.2 2015-01-03 15:58:52 +01:00
Tannin b8118074c0 - archive library can now query for password during extraction (seems to be necessary for rars)
- process blacklist is now taken from a file if there is one, not hardcoded
- removed workaround for the papyrus compiler
- updated loot client to work with the actual api
- loot client now links with loot32.dll at runtime
- loot client now produces its output in a (json-)file which includes all plugin messages and dirty flags
- fomod installer now tries to parse the xml with several encodings
- fomod installer will now display a diagnostics warning if the jpg imageformat isn't supported
- base preview plugin now tries to be a bit smarter about resizing images to fit the screen
- bugfix: fomod installer no longer tries to open an image even after detecting its invalid
- bugfix: potential null-pointer dereferentiation in getprivateprofile... hooks
- bugfix: potential null-pointer dereferentiation in download manager
- bugfix: internal origin name showed up in one more place
- bugfix: ToString function produced strings that were one (zero-termination-)character too long
2014-11-05 23:48:06 +01:00
Tannin 344965df52 - re-enabled building of loot_cli and started developing against the new api
- extended set of default categories
- more tolerand bbcode parser
- added a few colors for the bbcode parser
- more fixes to qt5 compatibility
- started work on ability to unloading (and thus re-loading) of plugins
- names of plugins are no longer localizable (because those names are also used to store settings)
- added settings to disable individual diagnosis settings
- path of dependencies is now configured in a .pri file instead of environment variablees
- bugfix: if the modid-input is canceled, the id was saved as -1 and wasn't re-requested from the user
- bugfix: moving files with the SHFileOperation-Api didn't update the vfs correctly (still not perfect but better)
- bugfix: attempt to remove the deleter-file seems to have caused error messages for some users
- bugfix: fixed a couple of cases that might have caused the tutorial to hang
2014-09-08 20:37:23 +02:00
TheBloke ff3b241f6c .pro files - formatting/consistency fixes
Many small formatting changes to the majority of .pro files
 Consistent style for Qt version checking, using greaterThan(QT_MAJOR_VERSION, 4)
  This seems safest, as would continue to work for a future Qt 6 etc.
  Note that this makes redudundant the commit before this one, to organizer.pro
 Consistent indenting
 Moved some file configuration sections to be together with related sections
 Moved some installation-related sections (e.g. OUTDIR/DSTDIR) to be at the bottom,
  immediately before the related POST_LINK install lines.
 Similarly, in some cases separated out CONFIG(debug,.. checks into separate
  LIB/INCLUDE sections (high in file) and installation directory sections (low
   in file)
2014-07-07 23:32:18 +01:00
Tannin 070086d83e some fixes towards qt5 compatibility 2014-03-16 20:04:57 +01:00
4 changed files with 34 additions and 5 deletions
+11
View File
@@ -0,0 +1,11 @@
Import('qt_env')
env = qt_env.Clone()
env.AppendUnique(CPPDEFINES = [ 'PREVIEWBASE_LIBRARY' ])
lib = env.SharedLibrary('previewBase', env.Glob('*.cpp'))
env.InstallModule(lib)
res = env['QT_USED_MODULES']
Return('res')
+6
View File
@@ -10,6 +10,8 @@ TEMPLATE = lib
CONFIG += plugins
CONFIG += dll
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets gui
DEFINES += PREVIEWBASE_LIBRARY
SOURCES += previewbase.cpp
@@ -18,3 +20,7 @@ HEADERS += previewbase.h
include(../plugin_template.pri)
OTHER_FILES += \
previewbase.json\
SConscript
+16 -5
View File
@@ -25,6 +25,8 @@ along with Base Preview plugin. If not, see <http://www.gnu.org/licenses/>.
#include <QLabel>
#include <QTextEdit>
#include <QtPlugin>
#include <QApplication>
#include <QDesktopWidget>
using namespace MOBase;
@@ -51,7 +53,7 @@ bool PreviewBase::init(MOBase::IOrganizer*)
QString PreviewBase::name() const
{
return tr("Preview Base");
return "Preview Base";
}
QString PreviewBase::author() const
@@ -66,7 +68,7 @@ QString PreviewBase::description() const
MOBase::VersionInfo PreviewBase::version() const
{
return VersionInfo(0, 1, 0, VersionInfo::RELEASE_BETA);
return VersionInfo(1, 0, 0, VersionInfo::RELEASE_FINAL);
}
bool PreviewBase::isActive() const
@@ -82,7 +84,7 @@ QList<MOBase::PluginSetting> PreviewBase::settings() const
std::set<QString> PreviewBase::supportedExtensions() const
{
std::set<QString> extensions;
foreach (const auto &generator, m_PreviewGenerators) {
for (const auto &generator : m_PreviewGenerators) {
extensions.insert(generator.first);
}
@@ -91,7 +93,7 @@ std::set<QString> PreviewBase::supportedExtensions() const
QWidget *PreviewBase::genFilePreview(const QString &fileName, const QSize &maxSize) const
{
auto iter = m_PreviewGenerators.find(QFileInfo(fileName).completeSuffix().toLower());
auto iter = m_PreviewGenerators.find(QFileInfo(fileName).suffix().toLower());
if (iter != m_PreviewGenerators.end()) {
return iter->second(fileName, maxSize);
} else {
@@ -102,7 +104,16 @@ QWidget *PreviewBase::genFilePreview(const QString &fileName, const QSize &maxSi
QWidget *PreviewBase::genImagePreview(const QString &fileName, const QSize&) const
{
QLabel *label = new QLabel();
label->setPixmap(QPixmap(fileName));
QPixmap pic = QPixmap(fileName);
QSize screenSize = QApplication::desktop()->screenGeometry().size();
// ensure the output image is no more than 80% of the screen height.
// If the aspect ratio is higher than that of the screen this would still allow the image to extend
// beyond the screen but it ensures you can drag the window and close it
int maxHeight = static_cast<int>(screenSize.height() * 0.8f);
if (pic.size().height() > maxHeight) {
pic = pic.scaledToHeight(maxHeight, Qt::SmoothTransformation);
}
label->setPixmap(pic);
return label;
}
+1
View File
@@ -0,0 +1 @@
{}