Merge pull request #1244 from manongjohn/ot_patches_thru_20231012
OpenToonz Patches thru 10/12/2023
This commit is contained in:
commit
e46ad6f908
|
@ -520,7 +520,7 @@ elseif(BUILD_ENV_UNIXLIKE)
|
|||
find_package(LZO REQUIRED)
|
||||
message("LZO:" ${LZO_INCLUDE_DIR})
|
||||
|
||||
if(HAIKU)
|
||||
if(BUILD_TARGET_BSD OR HAIKU)
|
||||
find_library(EXECINFO_LIBRARY execinfo)
|
||||
endif()
|
||||
find_library(PTHREAD_LIBRARY pthread)
|
||||
|
|
|
@ -15,12 +15,12 @@
|
|||
#include <sys/param.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#ifndef FREEBSD
|
||||
#if !defined(FREEBSD) || __FreeBSD_version >= 1300040
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#ifndef HAIKU
|
||||
#if !defined(HAIKU) && (!defined(FREEBSD) || __FreeBSD_version < 1300040)
|
||||
#include <sys/dir.h>
|
||||
#endif
|
||||
#include <sys/param.h> // for getfsstat
|
||||
|
|
|
@ -162,6 +162,11 @@ void DVAPI addImagesToIcon(QIcon &icon, const QImage &baseImg,
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void DVAPI addSpecifiedSizedImageToIcon(QIcon &icon, const char *iconSVGName,
|
||||
QSize newSize = QSize());
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void DVAPI addPixmapToAllModesAndStates(QIcon &icon, const QPixmap &pixmap);
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
@ -1749,8 +1749,8 @@ StopMotionController::StopMotionController(QWidget *parent) : QWidget(parent) {
|
|||
}
|
||||
m_tabBarContainer->setLayout(hLayout);
|
||||
|
||||
mainLayout->addWidget(m_tabBarContainer, 0, 0);
|
||||
mainLayout->addWidget(m_stackedChooser, 1, 0);
|
||||
mainLayout->addWidget(m_tabBarContainer, 0);
|
||||
mainLayout->addWidget(m_stackedChooser, 1);
|
||||
mainLayout->addWidget(opacityFrame, 0);
|
||||
mainLayout->addWidget(controlButtonFrame, 0);
|
||||
setLayout(mainLayout);
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
|
||||
// Boost includes
|
||||
#include <boost/iterator/counting_iterator.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
//*******************************************************************************
|
||||
// Local namespace stuff
|
||||
|
@ -108,7 +107,7 @@ void getBoundaries(TVectorImage &vi, std::vector<int> &strokes) {
|
|||
std::copy_if(boost::make_counting_iterator(0u),
|
||||
boost::make_counting_iterator(vi.getStrokeCount()),
|
||||
std::back_inserter(strokes),
|
||||
boost::bind(locals::isBoundary, sData, _1));
|
||||
[&](UINT e) { return locals::isBoundary(sData, e); });
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -24,9 +24,6 @@
|
|||
// TnzCore includes
|
||||
#include "drawutil.h"
|
||||
|
||||
// boost includes
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
using namespace ToolUtils;
|
||||
using namespace DragSelectionTool;
|
||||
|
||||
|
@ -655,7 +652,7 @@ void DragSelectionTool::VectorDeformTool::transformWholeLevel() {
|
|||
// Remove unwanted fids
|
||||
fids.erase(std::remove_if(
|
||||
fids.begin(), fids.end(),
|
||||
boost::bind(::currentOrNotSelected, boost::cref(*tool), _1)),
|
||||
[tool](const TFrameId &fid) { return currentOrNotSelected(*tool, fid); }),
|
||||
fids.end());
|
||||
|
||||
TUndoManager::manager()->beginBlock();
|
||||
|
@ -704,9 +701,9 @@ void DragSelectionTool::VectorDeformTool::transformWholeLevel() {
|
|||
|
||||
// Finally, notify changed frames
|
||||
std::for_each(fids.begin(), fids.end(),
|
||||
boost::bind( // NOTE: current frame is not here - it should be,
|
||||
&TTool::notifyImageChanged, m_tool,
|
||||
_1)); // but it's currently unnecessary, in fact...
|
||||
// NOTE: current frame is not here - it should be,
|
||||
// but it's currently unnecessary, in fact...
|
||||
[this](const TFrameId &fid) { m_tool->notifyImageChanged(fid); });
|
||||
|
||||
// notifyImageChanged(fid) must be invoked OUTSIDE of the loop - since it
|
||||
// seems to imply notifyImageChanged()
|
||||
|
@ -976,12 +973,12 @@ void DragSelectionTool::VectorChangeThicknessTool::setStrokesThickness(
|
|||
const std::set<int> &selectedStrokeIdxs = strokeSelection->getSelection();
|
||||
|
||||
std::for_each(selectedStrokeIdxs.begin(), selectedStrokeIdxs.end(),
|
||||
boost::bind(locals::setThickness, boost::cref(data), _1));
|
||||
[&data](int s) { locals::setThickness(data, s); });
|
||||
} else {
|
||||
std::vector<int> strokeIdxs = getSelectedStrokes(vi, levelSelection);
|
||||
|
||||
std::for_each(strokeIdxs.begin(), strokeIdxs.end(),
|
||||
boost::bind(locals::setThickness, boost::cref(data), _1));
|
||||
[&data](int s) { locals::setThickness(data, s); });
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1030,12 +1027,12 @@ void DragSelectionTool::VectorChangeThicknessTool::changeImageThickness(
|
|||
const std::set<int> &selectedStrokeIdxs = strokeSelection->getSelection();
|
||||
|
||||
std::for_each(selectedStrokeIdxs.begin(), selectedStrokeIdxs.end(),
|
||||
boost::bind(locals::changeThickness, boost::ref(data), _1));
|
||||
[&data](int s) { locals::changeThickness(data, s); });
|
||||
} else {
|
||||
std::vector<int> strokeIdxs = getSelectedStrokes(vi, levelSelection);
|
||||
|
||||
std::for_each(strokeIdxs.begin(), strokeIdxs.end(),
|
||||
boost::bind(locals::changeThickness, boost::ref(data), _1));
|
||||
[&data](int s) { locals::changeThickness(data, s); });
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1061,8 +1058,7 @@ void DragSelectionTool::VectorChangeThicknessTool::addUndo() {
|
|||
|
||||
// Remove unwanted frames
|
||||
fids.erase(std::remove_if(fids.begin(), fids.end(),
|
||||
boost::bind(::currentOrNotSelected,
|
||||
boost::cref(*vtool), _1)),
|
||||
[vtool](const TFrameId &fid) { return currentOrNotSelected(*vtool, fid); }),
|
||||
fids.end());
|
||||
|
||||
TUndoManager::manager()->beginBlock();
|
||||
|
@ -1098,9 +1094,7 @@ void DragSelectionTool::VectorChangeThicknessTool::addUndo() {
|
|||
|
||||
// Finally, notify changed frames
|
||||
std::for_each(fids.begin(), fids.end(),
|
||||
boost::bind( // NOTE: current frame is not here - it was
|
||||
&TTool::notifyImageChanged, m_tool,
|
||||
_1)); // aldready notified
|
||||
[this](const TFrameId &fid) { m_tool->notifyImageChanged(fid); });
|
||||
} else
|
||||
TUndoManager::manager()->add(m_undo.release()); // Outside any undo block
|
||||
}
|
||||
|
@ -1286,7 +1280,7 @@ void VectorSelectionTool::setNewFreeDeformer() {
|
|||
|
||||
fids.erase(std::remove_if(
|
||||
fids.begin(), fids.end(),
|
||||
boost::bind(::currentOrNotSelected, boost::cref(*this), _1)),
|
||||
[this](const TFrameId &fid) { return currentOrNotSelected(*this, fid); }),
|
||||
fids.end());
|
||||
|
||||
std::vector<TFrameId>::iterator ft, fEnd = fids.end();
|
||||
|
|
|
@ -44,7 +44,7 @@ class BatchServersViewer final : public QFrame {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
BatchServersViewer(QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
||||
BatchServersViewer(QWidget *parent = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
~BatchServersViewer();
|
||||
|
||||
void updateSelected();
|
||||
|
|
|
@ -78,7 +78,7 @@ class CastBrowser final : public QSplitter, public DvItemListModel {
|
|||
std::unique_ptr<CastItems> m_castItems;
|
||||
|
||||
public:
|
||||
CastBrowser(QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
||||
CastBrowser(QWidget *parent = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
~CastBrowser();
|
||||
|
||||
CastItems const &getCastItems() const { return *m_castItems; }
|
||||
|
|
|
@ -1453,7 +1453,9 @@ public:
|
|||
TXshColumn *column = xsh->getColumn(i);
|
||||
if (!column) continue;
|
||||
/*- Skip if target is in selected column mode and not selected -*/
|
||||
bool isSelected = selection && selection->isColumnSelected(i);
|
||||
bool isSelected = selection && !selection->isEmpty()
|
||||
? selection->isColumnSelected(i)
|
||||
: cc == i;
|
||||
if (m_target == TARGET_SELECTED && !isSelected) continue;
|
||||
|
||||
/*-
|
||||
|
|
|
@ -21,7 +21,7 @@ class ComboViewerPanel final : public BaseViewerPanel {
|
|||
Ruler *m_hRuler;
|
||||
|
||||
public:
|
||||
ComboViewerPanel(QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
||||
ComboViewerPanel(QWidget *parent = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
~ComboViewerPanel() {}
|
||||
|
||||
ToolOptions *getToolOptions() { return m_toolOptions; }
|
||||
|
|
|
@ -29,7 +29,7 @@ protected:
|
|||
QString m_barId;
|
||||
|
||||
public:
|
||||
CommandBar(QWidget *parent = 0, Qt::WindowFlags flags = 0,
|
||||
CommandBar(QWidget *parent = 0, Qt::WindowFlags flags = Qt::WindowFlags(),
|
||||
bool isCollapsible = false, bool isQuickToolbar = false);
|
||||
|
||||
QString getBarId() { return m_barId; }
|
||||
|
|
|
@ -90,7 +90,7 @@ class ExportPanel final : public TPanel {
|
|||
QCheckBox *m_useMarker;
|
||||
|
||||
public:
|
||||
ExportPanel(QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
||||
ExportPanel(QWidget *parent = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
~ExportPanel();
|
||||
void loadExportSettings();
|
||||
void saveExportSettings();
|
||||
|
|
|
@ -80,7 +80,6 @@
|
|||
#include "tcg/boost/permuted_range.h"
|
||||
|
||||
// boost includes
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/iterator/counting_iterator.hpp>
|
||||
#include <boost/range/adaptor/filtered.hpp>
|
||||
#include <boost/range/adaptor/transformed.hpp>
|
||||
|
@ -435,7 +434,7 @@ void FileBrowser::sortByDataModel(DataType dataType, bool isDiscendent) {
|
|||
|
||||
std::stable_sort(
|
||||
new2OldIdx.begin(), new2OldIdx.end(),
|
||||
boost::bind(locals::itemLess, _1, _2, boost::ref(*this), dataType));
|
||||
[this, dataType](int x, int y) { return locals::itemLess(x, y, *this, dataType); });
|
||||
|
||||
// Use the renumbering table to permutate elements
|
||||
std::vector<Item>(
|
||||
|
@ -453,15 +452,13 @@ void FileBrowser::sortByDataModel(DataType dataType, bool isDiscendent) {
|
|||
boost::make_counting_iterator(int(m_items.size())));
|
||||
|
||||
std::sort(old2NewIdx.begin(), old2NewIdx.end(),
|
||||
boost::bind(locals::indexLess, _1, _2, boost::ref(new2OldIdx)));
|
||||
[&new2OldIdx](int aIdx, int bIdx){ return locals::indexLess(aIdx, bIdx, new2OldIdx); });
|
||||
|
||||
std::vector<int> newSelectedIndices;
|
||||
tcg::substitute(
|
||||
newSelectedIndices,
|
||||
tcg::permuted_range(old2NewIdx, fs->getSelectedIndices() |
|
||||
ba::filtered(boost::bind(
|
||||
std::less<int>(), _1,
|
||||
int(old2NewIdx.size())))));
|
||||
ba::filtered([&old2NewIdx](int x){ return x < old2NewIdx.size(); })));
|
||||
|
||||
fs->select(!newSelectedIndices.empty() ? &newSelectedIndices.front() : 0,
|
||||
int(newSelectedIndices.size()));
|
||||
|
@ -486,8 +483,8 @@ void FileBrowser::sortByDataModel(DataType dataType, bool isDiscendent) {
|
|||
tcg::substitute(
|
||||
newSelectedIndices,
|
||||
fs->getSelectedIndices() |
|
||||
ba::filtered(boost::bind(std::less<int>(), _1, iCount)) |
|
||||
ba::transformed(boost::bind(locals::complement, _1, lastIdx)));
|
||||
ba::filtered([iCount](int x){ return x < iCount; }) |
|
||||
ba::transformed([lastIdx](int x){ return locals::complement(x, lastIdx); }));
|
||||
|
||||
fs->select(!newSelectedIndices.empty() ? &newSelectedIndices.front() : 0,
|
||||
int(newSelectedIndices.size()));
|
||||
|
|
|
@ -60,7 +60,7 @@ class FileBrowser final : public QFrame, public DvItemListModel {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FileBrowser(QWidget *parent, Qt::WindowFlags flags = 0,
|
||||
FileBrowser(QWidget *parent, Qt::WindowFlags flags = Qt::WindowFlags(),
|
||||
bool noContextMenu = false, bool multiSelectionEnabled = false);
|
||||
~FileBrowser();
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ FileBrowserPopup::FileBrowserPopup(const QString &title, Options options,
|
|||
setWindowTitle(title);
|
||||
setModal(false);
|
||||
|
||||
m_browser = new FileBrowser(this, 0, false, m_multiSelectionEnabled);
|
||||
m_browser = new FileBrowser(this, Qt::WindowFlags(), false, m_multiSelectionEnabled);
|
||||
m_nameFieldLabel = new QLabel(tr("File name:"));
|
||||
m_nameField = new DVGui::LineEdit(this);
|
||||
m_okButton = new QPushButton(tr("OK"), this);
|
||||
|
|
|
@ -236,7 +236,7 @@ class Filmstrip final : public QWidget, public SaveLoadQSettings {
|
|||
bool m_showComboBox = true;
|
||||
|
||||
public:
|
||||
Filmstrip(QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
||||
Filmstrip(QWidget *parent = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
~Filmstrip();
|
||||
|
||||
// SaveLoadQSettings
|
||||
|
|
|
@ -33,7 +33,7 @@ class HistoryPane final : public QWidget {
|
|||
QScrollArea *m_frameArea;
|
||||
|
||||
public:
|
||||
HistoryPane(QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
||||
HistoryPane(QWidget *parent = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
~HistoryPane(){};
|
||||
|
||||
protected:
|
||||
|
|
|
@ -276,20 +276,20 @@ InsertFxPopup::InsertFxPopup()
|
|||
addWidget(m_fxTree);
|
||||
|
||||
QPushButton *insertBtn = new QPushButton(tr("Insert"), this);
|
||||
insertBtn->setFixedSize(65, 25);
|
||||
insertBtn->setMinimumSize(65, 25);
|
||||
insertBtn->setObjectName("PushButton_NoPadding");
|
||||
connect(insertBtn, SIGNAL(clicked()), this, SLOT(onInsert()));
|
||||
insertBtn->setDefault(true);
|
||||
m_buttonLayout->addWidget(insertBtn);
|
||||
|
||||
QPushButton *addBtn = new QPushButton(tr("Add"), this);
|
||||
addBtn->setFixedSize(65, 25);
|
||||
addBtn->setMinimumSize(65, 25);
|
||||
addBtn->setObjectName("PushButton_NoPadding");
|
||||
connect(addBtn, SIGNAL(clicked()), this, SLOT(onAdd()));
|
||||
m_buttonLayout->addWidget(addBtn);
|
||||
|
||||
QPushButton *replaceBtn = new QPushButton(tr("Replace"), this);
|
||||
replaceBtn->setFixedHeight(25);
|
||||
replaceBtn->setMinimumSize(65, 25);
|
||||
replaceBtn->setObjectName("PushButton_NoPadding");
|
||||
connect(replaceBtn, SIGNAL(clicked()), this, SLOT(onReplace()));
|
||||
m_buttonLayout->addWidget(replaceBtn);
|
||||
|
|
|
@ -34,7 +34,7 @@ private:
|
|||
|
||||
public:
|
||||
LayerFooterPanel(XsheetViewer *viewer, QWidget *parent = 0,
|
||||
Qt::WindowFlags flags = 0);
|
||||
Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
~LayerFooterPanel();
|
||||
|
||||
void showOrHide(const Orientation *o);
|
||||
|
|
|
@ -35,8 +35,6 @@
|
|||
#include <boost/operators.hpp>
|
||||
#include <boost/range.hpp>
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#include <boost/iterator/transform_iterator.hpp>
|
||||
|
||||
#include <boost/range/algorithm/for_each.hpp>
|
||||
|
@ -239,9 +237,7 @@ struct buildResources_locals {
|
|||
const MergeData *mdt,
|
||||
*mdEnd = mergeTable + boost::size(mergeTable) - 1; // Last item is fake
|
||||
|
||||
mdt = std::find_if(mergeTable, mdEnd,
|
||||
boost::bind(exactMatch<MergeData>, _1,
|
||||
boost::cref(rt->first.first.m_relFp)));
|
||||
mdt = std::find_if(mergeTable, mdEnd, [&rt](const MergeData& mergeData){ return exactMatch(mergeData, rt->first.first.m_relFp); });
|
||||
|
||||
if (mdt != mdEnd) {
|
||||
// Lookup every possible resource component to merge
|
||||
|
@ -306,8 +302,7 @@ void buildResources(std::vector<Resource> &resources, const TFilePath &rootPath,
|
|||
const FormatData *fdt,
|
||||
*fdEnd = l_formatDatas + boost::size(l_formatDatas);
|
||||
fdt = std::find_if(
|
||||
l_formatDatas, fdEnd,
|
||||
boost::bind(exactMatch<FormatData>, _1, boost::cref(relPath)));
|
||||
l_formatDatas, fdEnd, [&relPath](const FormatData &formatData){ return exactMatch(formatData, relPath); });
|
||||
|
||||
if (fdt != fdEnd) {
|
||||
relPath = fdt->m_resourcePathFunc(relPath);
|
||||
|
@ -402,8 +397,7 @@ struct import_Locals {
|
|||
|
||||
// Perform resource copy
|
||||
std::for_each(rsrc.m_components.begin(), rsrc.m_components.end(),
|
||||
boost::bind(copy, boost::cref(srcDir), boost::cref(dstDir),
|
||||
_1, overwrite));
|
||||
[&srcDir, &dstDir, &overwrite](const Resource::Component &comp){ copy(srcDir, dstDir, comp, overwrite); });
|
||||
} catch (const TException &e) {
|
||||
DVGui::error(QString::fromStdWString(e.getMessage()));
|
||||
} catch (...) {
|
||||
|
@ -492,7 +486,7 @@ QString OverwriteDialog::acceptResolution(void *obj_, int resolution,
|
|||
|
||||
static bool existsResource(const TFilePath &dstDir, const Resource &rsrc) {
|
||||
return std::any_of(rsrc.m_components.begin(), rsrc.m_components.end(),
|
||||
boost::bind(existsComponent, boost::cref(dstDir), _1));
|
||||
[&dstDir](const Resource::Component &comp){ return existsComponent(dstDir, comp); });
|
||||
}
|
||||
}; // locals
|
||||
|
||||
|
@ -547,7 +541,7 @@ int IoCmd::loadResourceFolders(LoadResourceArguments &args,
|
|||
{
|
||||
if (std::any_of(
|
||||
args.resourceDatas.begin(), args.resourceDatas.end(),
|
||||
boost::bind(locals::isExternPath, boost::cref(*scene), _1))) {
|
||||
[scene](const LRArgs::ResourceData &rd){ return locals::isExternPath(*scene, rd); })) {
|
||||
// Ask for data import in this case
|
||||
int resolutionButton = DVGui::MsgBox(
|
||||
QObject::tr("Selected folders don't belong to the current project.\n"
|
||||
|
@ -570,11 +564,8 @@ int IoCmd::loadResourceFolders(LoadResourceArguments &args,
|
|||
// Select resources to be loaded
|
||||
std::vector<Resource> resources;
|
||||
|
||||
boost::for_each(
|
||||
args.resourceDatas |
|
||||
boost::adaptors::transformed(boost::bind<const TFilePath &>(
|
||||
&LRArgs::ResourceData::m_path, _1)),
|
||||
boost::bind(::buildResources, boost::ref(resources), _1, TFilePath()));
|
||||
boost::for_each(args.resourceDatas,
|
||||
[&resources](const LRArgs::ResourceData &resourceData){ buildResources(resources, resourceData.m_path, TFilePath()); });
|
||||
|
||||
// Import them if required
|
||||
if (import) ::import(*scene, resources, *sb);
|
||||
|
|
|
@ -54,7 +54,7 @@ class LogPanel final : public TPanel, public TLogger::Listener {
|
|||
int m_poolIndex;
|
||||
|
||||
public:
|
||||
LogPanel(QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
||||
LogPanel(QWidget *parent = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
~LogPanel();
|
||||
|
||||
void onLogChanged() override;
|
||||
|
|
|
@ -1082,7 +1082,7 @@ void PreviewFxInstance::doOnRenderRasterCompleted(
|
|||
|
||||
/*-- 16bpc縺ァ險育ョ励&繧後◆蝣エ蜷医∫オ先棡繧奪ithering縺吶k --*/
|
||||
// dither the 16bpc image IF the "30bit display" preference option is OFF
|
||||
if ((rasA->getPixelSize() == 8 || rasA->getPixelSize() == 16) &&
|
||||
if (rasA->getPixelSize() == 8 &&
|
||||
!Preferences::instance()->is30bitDisplayEnabled()) // render in 64 bits
|
||||
{
|
||||
TRaster32P auxA(rasA->getLx(), rasA->getLy());
|
||||
|
|
|
@ -31,7 +31,7 @@ class QuickToolbar final : public CommandBar {
|
|||
XsheetViewer *m_viewer;
|
||||
|
||||
public:
|
||||
QuickToolbar(XsheetViewer *parent = 0, Qt::WindowFlags flags = 0,
|
||||
QuickToolbar(XsheetViewer *parent = 0, Qt::WindowFlags flags = Qt::WindowFlags(),
|
||||
bool isCollapsible = false);
|
||||
static void toggleQuickToolbar();
|
||||
void showToolbar(bool show);
|
||||
|
|
|
@ -81,7 +81,6 @@
|
|||
#include "tcg/boost/permuted_range.h"
|
||||
|
||||
// boost includes
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/iterator/counting_iterator.hpp>
|
||||
#include <boost/range/adaptor/filtered.hpp>
|
||||
#include <boost/range/adaptor/transformed.hpp>
|
||||
|
@ -419,7 +418,7 @@ void SceneBrowser::sortByDataModel(DataType dataType, bool isDiscendent) {
|
|||
|
||||
std::stable_sort(
|
||||
new2OldIdx.begin(), new2OldIdx.end(),
|
||||
boost::bind(locals::itemLess, _1, _2, boost::ref(*this), dataType));
|
||||
[this, dataType](int x, int y){ return locals::itemLess(x, y, *this, dataType); });
|
||||
|
||||
// Use the renumbering table to permutate elements
|
||||
std::vector<Item>(
|
||||
|
@ -437,15 +436,13 @@ void SceneBrowser::sortByDataModel(DataType dataType, bool isDiscendent) {
|
|||
boost::make_counting_iterator(int(m_items.size())));
|
||||
|
||||
std::sort(old2NewIdx.begin(), old2NewIdx.end(),
|
||||
boost::bind(locals::indexLess, _1, _2, boost::ref(new2OldIdx)));
|
||||
[&new2OldIdx](int x, int y){ return locals::indexLess(x, y, new2OldIdx); });
|
||||
|
||||
std::vector<int> newSelectedIndices;
|
||||
tcg::substitute(
|
||||
newSelectedIndices,
|
||||
tcg::permuted_range(old2NewIdx, fs->getSelectedIndices() |
|
||||
ba::filtered(boost::bind(
|
||||
std::less<int>(), _1,
|
||||
int(old2NewIdx.size())))));
|
||||
ba::filtered([&old2NewIdx](int x){ return x < old2NewIdx.size(); })));
|
||||
|
||||
fs->select(!newSelectedIndices.empty() ? &newSelectedIndices.front() : 0,
|
||||
int(newSelectedIndices.size()));
|
||||
|
@ -470,8 +467,8 @@ void SceneBrowser::sortByDataModel(DataType dataType, bool isDiscendent) {
|
|||
tcg::substitute(
|
||||
newSelectedIndices,
|
||||
fs->getSelectedIndices() |
|
||||
ba::filtered(boost::bind(std::less<int>(), _1, iCount)) |
|
||||
ba::transformed(boost::bind(locals::complement, _1, lastIdx)));
|
||||
ba::filtered([iCount](int x){ return x < iCount; }) |
|
||||
ba::transformed([lastIdx](int x){ return locals::complement(x, lastIdx); }));
|
||||
|
||||
fs->select(!newSelectedIndices.empty() ? &newSelectedIndices.front() : 0,
|
||||
int(newSelectedIndices.size()));
|
||||
|
|
|
@ -43,7 +43,7 @@ class SceneBrowser final : public QFrame, public DvItemListModel {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SceneBrowser(QWidget *parent, Qt::WindowFlags flags = 0,
|
||||
SceneBrowser(QWidget *parent, Qt::WindowFlags flags = Qt::WindowFlags(),
|
||||
bool noContextMenu = false, bool multiSelectionEnabled = false);
|
||||
~SceneBrowser();
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
#include "menubarcommandids.h"
|
||||
#include "onionskinmaskgui.h"
|
||||
#include "ruler.h"
|
||||
#include "comboviewerpane.h"
|
||||
#include "locatorpopup.h"
|
||||
#include "cellselection.h"
|
||||
#include "styleshortcutswitchablepanel.h"
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include "tcg/boost/range_utility.h"
|
||||
|
||||
// Boost includes
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/range/counting_range.hpp>
|
||||
#include <boost/range/adaptor/transformed.hpp>
|
||||
|
||||
|
@ -63,8 +62,7 @@ void getSelectedFrames<TXshSimpleLevel>(
|
|||
if (!sl) continue;
|
||||
|
||||
tcg::substitute(frames[sl], boost::counting_range(0, sl->getFrameCount()) |
|
||||
boost::adaptors::transformed(boost::bind(
|
||||
&TXshSimpleLevel::getFrameId, sl, _1)));
|
||||
boost::adaptors::transformed([&sl](int index){ return sl->getFrameId(index); }));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -173,7 +173,7 @@ public:
|
|||
TaskTreeView *m_treeView;
|
||||
QTimer *m_timer;
|
||||
|
||||
TasksViewer(QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
||||
TasksViewer(QWidget *parent = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
~TasksViewer();
|
||||
|
||||
void update() override;
|
||||
|
|
|
@ -13,7 +13,7 @@ class TestPanel final : public TPanel {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
TestPanel(QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
||||
TestPanel(QWidget *parent = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
~TestPanel();
|
||||
|
||||
public slots:
|
||||
|
|
|
@ -1033,7 +1033,7 @@ public:
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
CommandBarPanel::CommandBarPanel(QWidget *parent)
|
||||
: TPanel(parent, 0, TDockWidget::horizontal) {
|
||||
: TPanel(parent, Qt::WindowFlags(), TDockWidget::horizontal) {
|
||||
CommandBar *xsheetToolbar = new CommandBar(this);
|
||||
setWidget(xsheetToolbar);
|
||||
setIsMaximizable(false);
|
||||
|
@ -1064,7 +1064,7 @@ OpenFloatingPanel openCommandBarCommand(MI_OpenCommandToolbar, "CommandBar",
|
|||
//---------------------------------------------------------
|
||||
|
||||
ToolOptionPanel::ToolOptionPanel(QWidget *parent)
|
||||
: TPanel(parent, 0, TDockWidget::horizontal) {
|
||||
: TPanel(parent, Qt::WindowFlags(), TDockWidget::horizontal) {
|
||||
TApp *app = TApp::instance();
|
||||
m_toolOption = new ToolOptions;
|
||||
|
||||
|
@ -1221,7 +1221,7 @@ class BrowserFactory final : public TPanelFactory {
|
|||
public:
|
||||
BrowserFactory() : TPanelFactory("Browser") {}
|
||||
void initialize(TPanel *panel) override {
|
||||
FileBrowser *browser = new FileBrowser(panel, 0, false, true);
|
||||
FileBrowser *browser = new FileBrowser(panel, Qt::WindowFlags(), false, true);
|
||||
panel->setWidget(browser);
|
||||
panel->setWindowTitle(QObject::tr("File Browser"));
|
||||
panel->getTitleBar()->showTitleBar(TApp::instance()->getShowTitleBars());
|
||||
|
@ -1241,7 +1241,7 @@ class PreproductionBoardFactory final : public TPanelFactory {
|
|||
public:
|
||||
PreproductionBoardFactory() : TPanelFactory("PreproductionBoard") {}
|
||||
void initialize(TPanel *panel) override {
|
||||
SceneBrowser *browser = new SceneBrowser(panel, 0, false, true);
|
||||
SceneBrowser *browser = new SceneBrowser(panel, Qt::WindowFlags(), false, true);
|
||||
panel->setWidget(browser);
|
||||
panel->setWindowTitle(QObject::tr("Preproduction Board"));
|
||||
TFilePath scenesFolder =
|
||||
|
|
|
@ -26,7 +26,7 @@ class VectorGuidedDrawingPane final : public QFrame {
|
|||
*m_FlipNextDirectionBtn, *m_FlipPrevDirectionBtn;
|
||||
|
||||
public:
|
||||
VectorGuidedDrawingPane(QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
||||
VectorGuidedDrawingPane(QWidget *parent = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
~VectorGuidedDrawingPane(){};
|
||||
|
||||
void updateStatus();
|
||||
|
|
|
@ -67,7 +67,7 @@ protected:
|
|||
bool m_isActive = false;
|
||||
|
||||
public:
|
||||
BaseViewerPanel(QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
||||
BaseViewerPanel(QWidget *parent = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
~BaseViewerPanel() {}
|
||||
|
||||
virtual void updateShowHide();
|
||||
|
|
|
@ -3748,7 +3748,7 @@ void CellArea::mouseMoveEvent(QMouseEvent *event) {
|
|||
//-----------------------------------------------------------------------------
|
||||
|
||||
void CellArea::mouseReleaseEvent(QMouseEvent *event) {
|
||||
m_viewer->setQtModifiers(0);
|
||||
m_viewer->setQtModifiers(Qt::KeyboardModifiers());
|
||||
m_isMousePressed = false;
|
||||
m_viewer->stopAutoPan();
|
||||
m_isPanning = false;
|
||||
|
|
|
@ -2861,7 +2861,7 @@ void ColumnArea::mouseReleaseEvent(QMouseEvent *event) {
|
|||
|
||||
if (m_transparencyPopupTimer) m_transparencyPopupTimer->stop();
|
||||
|
||||
m_viewer->setQtModifiers(0);
|
||||
m_viewer->setQtModifiers(Qt::KeyboardModifiers());
|
||||
m_viewer->dragToolRelease(event);
|
||||
m_isPanning = false;
|
||||
m_viewer->stopAutoPan();
|
||||
|
|
|
@ -50,7 +50,7 @@ class MotionPathMenu final : public QWidget {
|
|||
QPoint m_pos;
|
||||
|
||||
public:
|
||||
MotionPathMenu(QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
||||
MotionPathMenu(QWidget *parent = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
~MotionPathMenu();
|
||||
|
||||
protected:
|
||||
|
|
|
@ -72,8 +72,6 @@
|
|||
#include "tcg/boost/range_utility.h"
|
||||
|
||||
// boost includes
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/bind/make_adaptable.hpp>
|
||||
#include <boost/range/adaptor/filtered.hpp>
|
||||
#include <boost/range/adaptor/transformed.hpp>
|
||||
|
||||
|
@ -506,8 +504,7 @@ public:
|
|||
: GlobalKeyframeUndo(frame) {
|
||||
tcg::substitute(
|
||||
m_columns,
|
||||
columns | ba::filtered(std::not1(boost::make_adaptable<bool, int>(
|
||||
boost::bind(isKeyframe, frame, _1)))));
|
||||
columns | ba::filtered([frame](int c){ return !isKeyframe(frame, c); }));
|
||||
}
|
||||
|
||||
void redo() const override {
|
||||
|
@ -581,11 +578,10 @@ public:
|
|||
}; // locals
|
||||
|
||||
tcg::substitute(m_columns,
|
||||
columns | ba::filtered(boost::bind(isKeyframe, frame, _1)));
|
||||
columns | ba::filtered([frame](int c){ return isKeyframe(frame, c); }));
|
||||
|
||||
tcg::substitute(m_keyframes,
|
||||
m_columns | ba::transformed(boost::bind(locals::getKeyframe,
|
||||
frame, _1)));
|
||||
m_columns | ba::transformed([frame](int c){ return locals::getKeyframe(frame, c); }));
|
||||
}
|
||||
|
||||
void redo() const override {
|
||||
|
|
|
@ -231,7 +231,7 @@ XsheetViewer::XsheetViewer(QWidget *parent, Qt::WindowFlags flags)
|
|||
, m_isCurrentColumnSwitched(false)
|
||||
, m_isComputingSize(false)
|
||||
, m_currentNoteIndex(0)
|
||||
, m_qtModifiers(0)
|
||||
, m_qtModifiers(Qt::KeyboardModifiers())
|
||||
, m_frameDisplayStyle(to_enum(FrameDisplayStyleInXsheetRowArea))
|
||||
, m_orientation(nullptr)
|
||||
, m_xsheetLayout("Classic")
|
||||
|
@ -252,7 +252,7 @@ XsheetViewer::XsheetViewer(QWidget *parent, Qt::WindowFlags flags)
|
|||
m_toolbarScrollArea = new XsheetScrollArea(this);
|
||||
m_toolbarScrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
m_toolbarScrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
m_toolbar = new XsheetGUI::QuickToolbar(this, 0, true);
|
||||
m_toolbar = new XsheetGUI::QuickToolbar(this, Qt::WindowFlags(), true);
|
||||
m_toolbarScrollArea->setWidget(m_toolbar);
|
||||
|
||||
m_noteArea = new XsheetGUI::NoteArea(this);
|
||||
|
@ -704,7 +704,7 @@ void XsheetViewer::timerEvent(QTimerEvent *) {
|
|||
scroll(m_autoPanSpeed);
|
||||
if (!m_dragTool) return;
|
||||
QMouseEvent mouseEvent(QEvent::MouseMove, m_lastAutoPanPos - m_autoPanSpeed,
|
||||
Qt::NoButton, 0, m_qtModifiers);
|
||||
Qt::NoButton, Qt::MouseButtons(), m_qtModifiers);
|
||||
m_dragTool->onDrag(&mouseEvent);
|
||||
m_lastAutoPanPos += m_autoPanSpeed;
|
||||
}
|
||||
|
|
|
@ -163,7 +163,7 @@ class XsheetScrollArea final : public QScrollArea {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
XsheetScrollArea(QWidget *parent = 0, Qt::WindowFlags flags = 0)
|
||||
XsheetScrollArea(QWidget *parent = 0, Qt::WindowFlags flags = Qt::WindowFlags())
|
||||
: QScrollArea(parent) {
|
||||
setObjectName("xsheetScrollArea");
|
||||
setFrameStyle(QFrame::StyledPanel);
|
||||
|
@ -640,7 +640,7 @@ private:
|
|||
}
|
||||
|
||||
public:
|
||||
XsheetViewer(QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
||||
XsheetViewer(QWidget *parent = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
~XsheetViewer();
|
||||
|
||||
TColumnSelection *getColumnSelection() const { return m_columnSelection; }
|
||||
|
|
|
@ -137,7 +137,7 @@ class NoteArea final : public QFrame {
|
|||
QLayout *m_currentLayout;
|
||||
|
||||
public:
|
||||
NoteArea(XsheetViewer *parent = 0, Qt::WindowFlags flags = 0);
|
||||
NoteArea(XsheetViewer *parent = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
|
||||
void updateButtons();
|
||||
|
||||
|
@ -172,7 +172,7 @@ class FooterNoteArea final : public QFrame {
|
|||
|
||||
public:
|
||||
FooterNoteArea(QWidget *parent = 0, XsheetViewer *viewer = 0,
|
||||
Qt::WindowFlags flags = 0);
|
||||
Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
|
||||
void updateButtons();
|
||||
|
||||
|
|
|
@ -1338,7 +1338,7 @@ void RowArea::mouseMoveEvent(QMouseEvent *event) {
|
|||
//-----------------------------------------------------------------------------
|
||||
|
||||
void RowArea::mouseReleaseEvent(QMouseEvent *event) {
|
||||
m_viewer->setQtModifiers(0);
|
||||
m_viewer->setQtModifiers(Qt::KeyboardModifiers());
|
||||
m_viewer->stopAutoPan();
|
||||
m_isPanning = false;
|
||||
m_viewer->dragToolRelease(event);
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#include "tcg/boost/range_utility.h"
|
||||
|
||||
// boost includes
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/range/counting_range.hpp>
|
||||
#include <boost/range/adaptor/transformed.hpp>
|
||||
#include <boost/range/adaptor/filtered.hpp>
|
||||
|
@ -585,8 +584,7 @@ void PaletteCmd::eraseStyles(const std::set<TXshSimpleLevel *> &levels,
|
|||
tcg::substitute(
|
||||
levelImages.second,
|
||||
boost::counting_range(0, levelImages.first->getFrameCount()) |
|
||||
boost::adaptors::transformed(boost::bind(
|
||||
cloneImage, boost::cref(*levelImages.first), _1)));
|
||||
boost::adaptors::transformed([&levelImages](int f){ return cloneImage(*levelImages.first, f); }));
|
||||
}
|
||||
|
||||
static void restoreImage(const TXshSimpleLevelP &level, int f,
|
||||
|
|
|
@ -28,9 +28,6 @@
|
|||
#include <QTextStream>
|
||||
#include <QStandardPaths>
|
||||
|
||||
// boost includes
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
//**********************************************************************************
|
||||
// Local namespace stuff
|
||||
//**********************************************************************************
|
||||
|
@ -1130,7 +1127,7 @@ int Preferences::levelFormatsCount() const {
|
|||
int Preferences::matchLevelFormat(const TFilePath &fp) const {
|
||||
LevelFormatVector::const_iterator lft =
|
||||
std::find_if(m_levelFormats.begin(), m_levelFormats.end(),
|
||||
boost::bind(&LevelFormat::matches, _1, boost::cref(fp)));
|
||||
[&fp](const LevelFormat &format) { return format.matches(fp); });
|
||||
|
||||
return (lft != m_levelFormats.end()) ? lft - m_levelFormats.begin() : -1;
|
||||
}
|
||||
|
|
|
@ -508,6 +508,27 @@ void addImagesToIcon(QIcon &icon, const QImage &baseImg, const QImage &overImg,
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void addSpecifiedSizedImageToIcon(QIcon &icon, const char *iconSVGName,
|
||||
QSize newSize) {
|
||||
static int devPixRatio = getHighestDevicePixelRatio();
|
||||
newSize *= devPixRatio;
|
||||
|
||||
// Construct icon filenames
|
||||
QString iconName = QString::fromUtf8(iconSVGName);
|
||||
QString overIconName = iconName + "_over";
|
||||
QString onIconName = iconName + "_on";
|
||||
|
||||
// Generate icon images
|
||||
QImage baseImg = generateIconImage(iconName, 1.0, newSize);
|
||||
QImage overImg = generateIconImage(overIconName, 1.0, newSize);
|
||||
QImage onImg = generateIconImage(onIconName, 1.0, newSize);
|
||||
|
||||
// Add newly sized images to the icon
|
||||
addImagesToIcon(icon, baseImg, overImg, onImg);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Add the same pixmap to all modes and states of a QIcon
|
||||
void addPixmapToAllModesAndStates(QIcon &icon, const QPixmap &pixmap) {
|
||||
QIcon::Mode modes[] = {QIcon::Normal, QIcon::Disabled, QIcon::Selected};
|
||||
|
|
|
@ -413,7 +413,7 @@ void CommandManager::enlargeIcon(CommandId id, const QSize dstSize) {
|
|||
if (!action) return;
|
||||
|
||||
const char *iconSVGName = getIconSVGName(id);
|
||||
if (iconSVGName == "") return;
|
||||
if (strcmp(iconSVGName, "") == 0) return;
|
||||
|
||||
QIcon icon = action->icon();
|
||||
|
||||
|
@ -424,7 +424,7 @@ void CommandManager::enlargeIcon(CommandId id, const QSize dstSize) {
|
|||
return;
|
||||
}
|
||||
|
||||
icon = createQIcon(iconSVGName, false, false, dstSize);
|
||||
addSpecifiedSizedImageToIcon(icon, iconSVGName, dstSize);
|
||||
|
||||
action->setIcon(icon);
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ class DVAPI TMainWindow : public QWidget {
|
|||
QWidget *m_menu;
|
||||
|
||||
public:
|
||||
TMainWindow(QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
||||
TMainWindow(QWidget *parent = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
virtual ~TMainWindow();
|
||||
|
||||
void addDockWidget(TDockWidget *item);
|
||||
|
@ -85,8 +85,8 @@ class DVAPI TDockWidget : public DockWidget {
|
|||
|
||||
public:
|
||||
TDockWidget(const QString &title, QWidget *parent = 0,
|
||||
Qt::WindowFlags flags = 0);
|
||||
TDockWidget(QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
||||
Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
TDockWidget(QWidget *parent = 0, Qt::WindowFlags flags = Qt::WindowFlags());
|
||||
~TDockWidget() {}
|
||||
|
||||
void setTitleBarWidget(QWidget *titlebar);
|
||||
|
|
Loading…
Reference in a new issue