Compare commits

..

1 Commits

Author SHA1 Message Date
a29302e2e6 Added additional poll method without timeout 2020-07-16 12:03:27 +03:00
109 changed files with 1046 additions and 1142 deletions

View File

@@ -77,6 +77,7 @@ endif()
set(CMAKE_CXX_STANDARD 11)
set(PIP_LIBRARY pip)
set(PIP_FOLDERS "." "core" "containers" "thread" "system" "io_devices" "io_utils" "console" "math" "code" "geo" "resources" "opencl" "crypt" "introspection" "concurrent" "cloud")
set(PIP_INCLUDES)
if(LIB)
@@ -100,6 +101,9 @@ else()
message(STATUS "Install ${PROJECT_NAME} to local \"bin\", \"lib\" and \"include\"")
endif()
foreach(F ${PIP_FOLDERS})
list(APPEND PIP_INCLUDES "${CMAKE_CURRENT_SOURCE_DIR}/pip/lib/main/${F}")
endforeach(F)
#message(${PIP_INCLUDES})
if(CMAKE_CROSSCOMPILING OR (DEFINED ANDROID_PLATFORM))
set(PIP_CMG "pip_cmg")
@@ -146,9 +150,6 @@ else()
endif()
add_subdirectory(pip)
foreach(F ${PIP_MAIN_FOLDERS})
list(APPEND PIP_INCLUDES "${F}")
endforeach(F)
set(_DIRS)
if (SomeQtFound)
message(STATUS "Building Qt-derived targets for ${QtVersions}")
@@ -179,7 +180,7 @@ else()
endif()
if(WIN32)
foreach(PIP_LT ${PIP_MODULES})
foreach(PIP_LT ${PIP_LIBS_TARGETS})
if (SomeQtFound)
qt_install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pip/lib${PIP_LT}.dll" DESTINATION QtBin)
endif()

View File

@@ -356,9 +356,9 @@ int CDSection::sectionsCount() const {
PIStringList CDSection::index_names() const {
PIStringList ret;
auto i = cd.makeIterator();
while (i.next())
ret << i.value().name();
PIMap<int, CDType>::const_iterator i;
for (i = cd.begin(); i != cd.end(); ++i)
ret << i->second.name();
return ret;
}
@@ -387,14 +387,15 @@ CDType & CDSection::getByName(const PIString & name_) {
int dv = 0;
if (isd) dv = np[i].toInt();
ns = 0;
auto it = cs->s.makeIterator();
while (it.next()) {
PIMap<int, CDSection>::iterator it;
//piCout << np[i] << isd << dv;
for (it = cs->s.begin(); it != cs->s.end(); ++it) {
bool f = false;
if (isd) f = (dv == it.key());
else f = (np[i] == it.value().alias);
//piCout << "s..." << it.key() << it.value().alias << f;
if (f) {
ns = &(it.valueRef());
ns = &(it.value());
break;
}
}
@@ -402,13 +403,13 @@ CDType & CDSection::getByName(const PIString & name_) {
if (!ns) return null;
cs = ns;
}
PIMap<int, CDType>::iterator it;
if (np.back().isEmpty()) return null;
bool isd = np.back()[0].isDigit() || (np.back()[0] == '-');
int dv = 0;
if (isd) dv = np.back().toInt();
//piCout << np.back() << isd << dv;
auto it = cs->cd.makeIterator();
while (it.next()) {
for (it = cs->cd.begin(); it != cs->cd.end(); ++it) {
bool f = false;
if (isd) f = (dv == it.key());
else f = (np.back() == it.value().name());
@@ -445,9 +446,9 @@ void CDSection::write(PIIODevice * d, const PIString & prefix) {
d->write(l.toUTF8());
l = "alias = " + alias + " \n";
d->write(l.toUTF8());
auto i = cd.makeIterator();
while (i.next()) {
const CDType & ck(i.value());
PIMap<int, CDType>::iterator i;
for (i = cd.begin(); i != cd.end(); ++i) {
CDType & ck(i.value());
if (ck.cd_type() != cd_type_) continue;
switch (cd_type_) {
case CDType::cdNull: break;
@@ -486,9 +487,9 @@ void CDSection::write(PIIODevice * d, const PIString & prefix) {
if (!s.isEmpty()) {
if (prefix.isEmpty()) l = "s";
else l = prefix + ".s";
auto j = s.makeIterator();
while (j.next()) {
j.valueRef().write(d, l + "." + PIString::fromNumber(j.key()));
PIMap<int, CDSection>::iterator j;
for (j = s.begin(); j != s.end(); ++j) {
j.value().write(d, l + "." + PIString::fromNumber(j.key()));
}
}
if (prefix.isEmpty()) {

View File

@@ -3,14 +3,9 @@ FROM ${DOCKER_PREFIX}android
ARG LIBS_BUILD_NUMBER=9999
ARG JOBS_COUNT=4
ENV PATH=/opt/cmake/bin:$PATH
ENV ANDROID_HOME=/usr/lib/android-sdk
ENV ANDROID_NDK_HOME=${ANDROID_HOME}/ndk-bundle
ENV ANDROID_TOOLCHAIN=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake
ENV NDK_PLATFORM="android-21"
WORKDIR /soft
RUN git clone -b release --single-branch --depth 1 --recursive https://git.shs.tools/SHS/libs.git
RUN git clone -b release --depth 1 --recursive https://git.shs.tools/SHS/libs.git
WORKDIR /soft/libs_build_host
RUN cmake -DICU=0 -DCROSSTOOLS=1 -DBUILD_NUMBER=${LIBS_BUILD_NUMBER} ../libs \

View File

@@ -3,10 +3,9 @@ FROM ${DOCKER_PREFIX}debian
ARG LIBS_BUILD_NUMBER=9999
ARG JOBS_COUNT=4
ENV PATH=/opt/cmake/bin:$PATH
WORKDIR /soft
RUN git clone -b release --single-branch --depth 1 --recursive https://git.shs.tools/SHS/libs.git
RUN git clone -b release --depth 1 --recursive https://git.shs.tools/SHS/libs.git
WORKDIR /soft/libs_build_debian
RUN cmake -DICU=0 -DLIB=1 -DQGLENGINE=1 -DQGLVIEW=1 -DBUILD_NUMBER=${LIBS_BUILD_NUMBER} ../libs \

View File

@@ -3,10 +3,9 @@ FROM ${DOCKER_PREFIX}osx
ARG LIBS_BUILD_NUMBER=9999
ARG JOBS_COUNT=4
ENV PATH=/soft/osxcross/target/bin:/opt/cmake/bin:$PATH
WORKDIR /soft
RUN git clone -b release --single-branch --depth 1 --recursive https://git.shs.tools/SHS/libs.git
RUN git clone -b release --depth 1 --recursive https://git.shs.tools/SHS/libs.git
WORKDIR /soft/libs_build_host
RUN cmake -DICU=0 -DCROSSTOOLS=1 -DBUILD_NUMBER=${LIBS_BUILD_NUMBER} ../libs \

View File

@@ -3,10 +3,9 @@ FROM ${DOCKER_PREFIX}pi
ARG LIBS_BUILD_NUMBER=9999
ARG JOBS_COUNT=4
ENV PATH=/opt/cmake/bin:$PATH
WORKDIR /soft
RUN git clone -b release --single-branch --depth 1 --recursive https://git.shs.tools/SHS/libs.git
RUN git clone -b release --depth 1 --recursive https://git.shs.tools/SHS/libs.git
WORKDIR /soft/libs_build_host
RUN cmake -DICU=0 -DCROSSTOOLS=1 -DBUILD_NUMBER=${LIBS_BUILD_NUMBER} ../libs \

View File

@@ -3,10 +3,9 @@ FROM ${DOCKER_PREFIX}windows
ARG LIBS_BUILD_NUMBER=9999
ARG JOBS_COUNT=4
ENV PATH=/opt/cmake/bin:$PATH
WORKDIR /soft
RUN git clone -b release --single-branch --depth 1 --recursive https://git.shs.tools/SHS/libs.git
RUN git clone -b release --depth 1 --recursive https://git.shs.tools/SHS/libs.git
WORKDIR /soft/libs_build_host
RUN cmake -DICU=0 -DCROSSTOOLS=1 -DBUILD_NUMBER=${LIBS_BUILD_NUMBER} ../libs \

2
pip

Submodule pip updated: e76a07a3f3...5df43a45f2

View File

@@ -106,7 +106,7 @@ const QAD::IODevice PI2QADIODevice(const PIVariantTypes::IODevice & v) {
const QAD::File PI2QADFile(const PIVariantTypes::File & v) {
return QAD::File(PI2QString(v.file), PI2QString(v.filter), v.is_abs, v.is_save);
return QAD::File(PI2QString(v.file), PI2QString(v.filter), v.is_abs);
}
@@ -116,7 +116,7 @@ const QAD::Dir PI2QADDir(const PIVariantTypes::Dir & v) {
const PIVariantTypes::File QAD2PIFile(const QAD::File & v) {
return PIVariantTypes::File(Q2PIString(v.file), Q2PIString(v.filter), v.is_abs, v.is_save);
return PIVariantTypes::File(Q2PIString(v.file), Q2PIString(v.filter), v.is_abs);
}

View File

@@ -74,7 +74,7 @@ void FilterItem::rename() {
piForeachC (PICodeInfo::EnumeratorInfo & i, ei->members)
if (i.value == mode()) {
ms = PI2QString(i.name);
break;
piBreak;
}
}
text_mode->setText(ms);

View File

@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.0)
cmake_policy(SET CMP0017 NEW) # need include() with .cmake
project(qad)
set(_QAD_MAJOR 1)
set(_QAD_MINOR 6)
set(_QAD_MINOR 5)
set(_QAD_REVISION 0)
set(_QAD_SUFFIX )
set(_QAD_COMPANY SHS)

View File

@@ -496,12 +496,7 @@ void BlockBusItem::testPoint(QPointF pos, int * sel_point, int * sel_segment) {
void BlockBusItem::hoverEnterEvent(QGraphicsSceneHoverEvent * e) {
tt = bus_name + (bus_name.isEmpty() ? "" : "\n\n")
+ tr("Add point: Ctrl + LeftClick\n"
"Remove point\\segment: Ctrl + RightClick\n"
"Remove connection: Shift + RightClick\n"
"Move point\\segment: Shift + LeftPress\n"
"Change trace mode: press Shift, when mouse move");
tt = bus_name + (bus_name.isEmpty() ? "" : "\n\n") + tr("Add point: Ctrl + LeftClick\nRemove point\\segment: Ctrl + RightClick\nNew branch: Shift + LeftClick\nRemove connection: Shift + RightClick");
}
@@ -568,12 +563,12 @@ void BlockBusItem::mousePressEvent(QGraphicsSceneMouseEvent * e) {
QMetaObject::invokeMethod(scene()->views().back(), "newBranchCancel");
}
new_segment = false;
if ((selPoint < 0 || selPoint > pol.size() - 1) && (selSegment < 0) && e->modifiers().testFlag(Qt::ShiftModifier)) {
if ((selPoint < 0 || selPoint > pol.size() - 1) && (selSegment < 0)) {
QGraphicsObject::mousePressEvent(e);
return;
}
int btncnt = 0;
if (endpoints().contains(selPoint) && (e->button() == Qt::LeftButton) && e->modifiers().testFlag(Qt::ShiftModifier))
if (endpoints().contains(selPoint) && e->button() == Qt::LeftButton)
QMetaObject::invokeMethod(scene()->views().back(), "startBusPointMove", Q_ARG(int, busType()));
if (e->buttons().testFlag(Qt::LeftButton)) btncnt++;
if (e->buttons().testFlag(Qt::RightButton)) btncnt++;
@@ -596,7 +591,8 @@ void BlockBusItem::mousePressEvent(QGraphicsSceneMouseEvent * e) {
prepareGeometryChange();
return;
}
if (e->buttons().testFlag(Qt::LeftButton) && e->modifiers().testFlag(Qt::NoModifier)) {
if (e->modifiers().testFlag(Qt::ShiftModifier)) {
if (e->buttons().testFlag(Qt::LeftButton)) {
if (selSegment >= 0)
press_pos = quantize(nearestPointOnLine(pol[segments[selSegment].first], pol[segments[selSegment].second], e->scenePos()), grid_step);
else {
@@ -614,9 +610,10 @@ void BlockBusItem::mousePressEvent(QGraphicsSceneMouseEvent * e) {
new_segment = true;
return;
}
if (e->buttons().testFlag(Qt::RightButton) && e->modifiers().testFlag(Qt::ShiftModifier)) {
if (e->buttons().testFlag(Qt::RightButton)) {
deleteLater();
}
}
if (e->modifiers().testFlag(Qt::ControlModifier)) {
if (e->buttons().testFlag(Qt::RightButton)) {
if (selPoint >= 0 && selPoint <= pol.size() - 1) {
@@ -638,22 +635,24 @@ void BlockBusItem::mousePressEvent(QGraphicsSceneMouseEvent * e) {
return;
}
}
if (e->modifiers().testFlag(Qt::ShiftModifier)) {
if (e->buttons().testFlag(Qt::RightButton)) {
if (deleted) return;
deleted = true;
}
}
}
void BlockBusItem::mouseMoveEvent(QGraphicsSceneMouseEvent * e) {
if (temp_ || mm_cancel) return;
if (((selPoint < 0 || selPoint > pol.size() - 1) && (selSegment < 0)) && !new_segment && mm_mods.testFlag(Qt::ShiftModifier)) {
if (((selPoint < 0 || selPoint > pol.size() - 1) && (selSegment < 0)) && !new_segment) {
QGraphicsObject::mouseMoveEvent(e);
return;
}
qp = quantize(e->scenePos(), grid_step);
lp = qp - lp;
if (e->buttons().testFlag(Qt::LeftButton) && mm_mods.testFlag(Qt::NoModifier) && new_segment) {
if (e->buttons().testFlag(Qt::LeftButton) && mm_mods.testFlag(Qt::ShiftModifier) && new_segment) {
QMetaObject::invokeMethod(scene()->views().back(), "newBranchTrace", Q_ARG(BlockBusItem * , this), Q_ARG(QPointF, e->scenePos()));
return;
}
@@ -721,16 +720,9 @@ void BlockBusItem::paint(QPainter * p, const QStyleOptionGraphicsItem * o, QWidg
//if (mark_in) {p->setPen(pa); p->setBrush(ba);}
//if (mark_out) {p->setPen(pr); p->setBrush(br);}
if (im_bus.isNull()) {
QPen _pen(p->pen());
for (int i = 0; i < segments.size(); ++i) {
_pen.setWidthF(pen_width);
p->setPen(_pen);
p->drawLine(pol[segments[i].first], pol[segments[i].second]);
if (pointSegmentsCount(segments[i].first) > 2) {
p->drawEllipse(pol[segments[i].first], pen_width*0.7, pen_width*0.7);
}
}
p->setPen(_pen);
} else {
QBrush br;
br.setTextureImage(im_bus);

View File

@@ -1277,7 +1277,7 @@ void BlockView::trace(QPointF scene_pos_from, QPointF scene_pos_to, BlockBusItem
for (int j = 0; j < steps; ++j) {
QPoint tp = quantize(cp, grid_step).toPoint() / grid_step + dp;
if (tp != qpt)
wavetrace.fill(tp, BlockViewWavetrace::Jump);
wavetrace.fill(tp, BlockViewWavetrace::Blocked);
//qDebug() << " set" << cp;
cp += QPointF(sx, sy);
}

View File

@@ -5,7 +5,7 @@
BlockViewWavetrace::BlockViewWavetrace(int width, int height) {
max_steps = 512;
resize(width, height);
setPreferredDirection(Horizontal);
setPreferredDirection(BlockViewWavetrace::Horizontal);
}
@@ -40,10 +40,6 @@ void BlockViewWavetrace::fill(const QRect & rect, short val) {
field[i][j] = val;
}
void BlockViewWavetrace::fill(int px, int py, short val) {
field[px][py] = val;
}
bool BlockViewWavetrace::trace(const QPoint & start, const QPoint & finish) {
st = start;
@@ -52,24 +48,12 @@ bool BlockViewWavetrace::trace(const QPoint & start, const QPoint & finish) {
//qDebug() << "trace" << start << finish;
//return true;
int cx, cy;
short cl = 0;
short cl = 0, empty = (short)BlockViewWavetrace::Empty;
QRect frect(0, 0, wid - 1, hei - 1);
QVector<QPoint> cpnts, npnts;
fill(st, cl);
jumps.clear();
cpnts.append(st);
auto checkAndFill = [this, &npnts, &frect](int x, int y, short c) {
if (!frect.contains(x, y)) return;
short p = field[x][y];
if (p == (short)Empty || p == (short)Jump) {
npnts.append(QPoint(x, y));
fill(x, y, c);
}
if (p == (short)Jump) {
jumps.append(QPoint(x, y));
}
};
if (field[fn.x()][fn.y()] < (short)Empty)
cpnts.push_back(st);
if (field[fn.x()][fn.y()] == (short)BlockViewWavetrace::Blocked)
return false;
while (cpnts.size() > 0) {
npnts.clear();
@@ -81,14 +65,34 @@ bool BlockViewWavetrace::trace(const QPoint & start, const QPoint & finish) {
}
cx = cpnts[i].x() - 1;
cy = cpnts[i].y();
checkAndFill(cx, cy, cl);
if (frect.contains(cx, cy)) {
if (field[cx][cy] == empty) {
npnts.push_back(QPoint(cx, cy));
fill(cx, cy, cl);
}
}
cx = cpnts[i].x() + 1;
checkAndFill(cx, cy, cl);
if (frect.contains(cx, cy)) {
if (field[cx][cy] == empty) {
npnts.push_back(QPoint(cx, cy));
fill(cx, cy, cl);
}
}
cx = cpnts[i].x();
cy = cpnts[i].y() - 1;
checkAndFill(cx, cy, cl);
if (frect.contains(cx, cy)) {
if (field[cx][cy] == empty) {
npnts.push_back(QPoint(cx, cy));
fill(cx, cy, cl);
}
}
cy = cpnts[i].y() + 1;
checkAndFill(cx, cy, cl);
if (frect.contains(cx, cy)) {
if (field[cx][cy] == empty) {
npnts.push_back(QPoint(cx, cy));
fill(cx, cy, cl);
}
}
}
cpnts = npnts;
//qDebug() << cl << ": " << cpnts.size();
@@ -104,48 +108,68 @@ void BlockViewWavetrace::gatherPath() {
path_.push_front(st);
return;
}
int cx, cy;
int pa = -1, ca = -1;
bool first = true;
short cl = field[fn.x()][fn.y()];
QRect frect(0, 0, wid, hei);
QPoint cpnt = fn;
//cout << "start from " << cl << endl;
auto checkAndStep = [this, &cpnt, &first, &frect] (int & dir, short c, int & ca_, int pa_)->bool {
int cx = cpnt.x() + dps[dir].x();
int cy = cpnt.y() + dps[dir].y();
dir++;
if (frect.contains(cx, cy)) {
if (field[cx][cy] == c) {
if (jumps.contains(QPoint(cx, cy))) {
int jx = cx - 1;
int jy = cy;
if (jumps.contains(QPoint(jx, jy))) fill(jx, jy, (short)Jump);
jx = cx + 1;
if (jumps.contains(QPoint(jx, jy))) fill(jx, jy, (short)Jump);
jx = cx;
jy = cy - 1;
if (jumps.contains(QPoint(jx, jy))) fill(jx, jy, (short)Jump);
jy = cy + 1;
if (jumps.contains(QPoint(jx, jy))) fill(jx, jy, (short)Jump);
}
ca_ = QLineF(QPointF(cx, cy), cpnt).angle();
if (ca_ != pa_ && !first)
path_.push_front(cpnt);
cpnt = QPoint(cx, cy);
first = false;
return true;
}
}
return false;
};
while (cl > 0) {
cl--;
pa = ca;
int dir = 0;
if (checkAndStep(dir, cl, ca, pa)) continue;
if (checkAndStep(dir, cl, ca, pa)) continue;
if (checkAndStep(dir, cl, ca, pa)) continue;
if (checkAndStep(dir, cl, ca, pa)) continue;
cx = cpnt.x() + dps[dir].x();
cy = cpnt.y() + dps[dir].y();
dir++;
if (frect.contains(cx, cy)) {
if (field[cx][cy] == cl) {
ca = QLineF(QPointF(cx, cy), cpnt).angle();
if (ca != pa && !first)
path_.push_front(cpnt);
cpnt = QPoint(cx, cy);
first = false;
continue;
}
}
cx = cpnt.x() + dps[dir].x();
cy = cpnt.y() + dps[dir].y();
dir++;
if (frect.contains(cx, cy)) {
if (field[cx][cy] == cl) {
ca = QLineF(QPointF(cx, cy), cpnt).angle();
if (ca != pa && !first)
path_.push_front(cpnt);
cpnt = QPoint(cx, cy);
first = false;
continue;
}
}
cx = cpnt.x() + dps[dir].x();
cy = cpnt.y() + dps[dir].y();
dir++;
if (frect.contains(cx, cy)) {
if (field[cx][cy] == cl) {
ca = QLineF(QPointF(cx, cy), cpnt).angle();
if (ca != pa && !first)
path_.push_front(cpnt);
cpnt = QPoint(cx, cy);
first = false;
continue;
}
}
cx = cpnt.x() + dps[dir].x();
cy = cpnt.y() + dps[dir].y();
if (frect.contains(cx, cy)) {
if (field[cx][cy] == cl) {
ca = QLineF(QPointF(cx, cy), cpnt).angle();
if (ca != pa && !first)
path_.push_front(cpnt);
cpnt = QPoint(cx, cy);
first = false;
continue;
}
}
}
path_.push_front(st);
//cout << path_.size() << endl;
@@ -154,13 +178,13 @@ void BlockViewWavetrace::gatherPath() {
void BlockViewWavetrace::setPreferredDirection(BlockViewWavetrace::Direction dir) {
dir_ = dir;
if (dir == Horizontal) {
if (dir == BlockViewWavetrace::Horizontal) {
dps[0] = QPoint(0, -1);
dps[1] = QPoint(0, 1);
dps[2] = QPoint(-1, 0);
dps[3] = QPoint(1, 0);
}
if (dir == Vertical) {
if (dir == BlockViewWavetrace::Vertical) {
dps[2] = QPoint(0, -1);
dps[3] = QPoint(0, 1);
dps[0] = QPoint(-1, 0);

View File

@@ -27,7 +27,7 @@ class QAD_EXPORT BlockViewWavetrace {
public:
BlockViewWavetrace(int width = 1, int height = 1);
enum CellState {Empty = -1, Blocked = -2, Jump = -3};
enum CellState {Empty = -1, Blocked = -2};
enum Direction {NoTrace, Horizontal, Vertical};
int width() const {return wid;}
@@ -37,7 +37,7 @@ public:
void fill(short val = -1);
void fill(const QRect & rect, short val = -1);
void fill(const QPoint & point, short val = -1) {field[point.x()][point.y()] = val;}
void fill(int px, int py, short val);
void fill(int px, int py, short val = -1) {field[px][py] = val;}
void fill(BlockViewWavetrace::CellState val = Empty) {fill((short)val);}
void fill(const QRect & rect, BlockViewWavetrace::CellState val = Empty) {fill(rect, (short)val);}
void fill(const QPoint & point, BlockViewWavetrace::CellState val = Empty) {fill(point, (short)val);}
@@ -56,7 +56,6 @@ private:
Direction dir_;
QVector<QVector<short> > field;
QVector<QPoint> path_;
QVector<QPoint> jumps;
QPoint dps[4], st, fn;
};

View File

@@ -4,12 +4,11 @@
<context>
<name>BlockBusItem</name>
<message>
<location filename="../blockbusitem.cpp" line="500"/>
<location filename="../blockbusitem.cpp" line="499"/>
<source>Add point: Ctrl + LeftClick
Remove point\segment: Ctrl + RightClick
Remove connection: Shift + RightClick
Move point\segment: Shift + LeftPress
Change trace mode: press Shift, when mouse move</source>
New branch: Shift + LeftClick
Remove connection: Shift + RightClick</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -348,7 +347,7 @@ Image</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../drawtools.cpp" line="837"/>
<location filename="../drawtools.cpp" line="824"/>
<source>Select image</source>
<translation type="unfinished"></translation>
</message>

View File

@@ -4,39 +4,16 @@
<context>
<name>BlockBusItem</name>
<message>
<location filename="../blockbusitem.cpp" line="499"/>
<source>Add point: Ctrl + LeftClick
Remove point\segment: Ctrl + RightClick
New branch: Shift + LeftClick
Remove connection: Shift + RightClick</source>
<translation type="vanished">Добавить точку: Ctrl + LeftClick
<translation>Добавить точку: Ctrl + LeftClick
Удалить точку\сегмент: Ctrl + RightClick
Новая ветка: Shift + LeftClick
Удалить шину: Shift + RightClick</translation>
</message>
<message>
<source>Add point: Ctrl + LeftClick
Remove point\segment: Ctrl + RightClick
Remove connection: Shift + RightClick
Move point\segment: Shift + mouse move
Change trace mode: press Shift, when mouse move</source>
<translation type="obsolete">Добавить точку: Ctrl + LeftClick
Удалить точку\сегмент: Ctrl + RightClick
Удалить шину: Shift + RightClick
Переместить точку\сегмент: Shift + двига</translation>
</message>
<message>
<location filename="../blockbusitem.cpp" line="500"/>
<source>Add point: Ctrl + LeftClick
Remove point\segment: Ctrl + RightClick
Remove connection: Shift + RightClick
Move point\segment: Shift + LeftPress
Change trace mode: press Shift, when mouse move</source>
<translation>Добавить точку: Ctrl + LeftClick
Удалить точку\сегмент: Ctrl + RightClick
Удалить шину: Shift + RightClick
Переместить точку\сегмент: Shift + LeftPress
Поменять режим трассировки: нажать Shift, во время перемещения мыши</translation>
</message>
</context>
<context>
<name>BlockEditor</name>
@@ -386,7 +363,7 @@ Image</source>
картинку</translation>
</message>
<message>
<location filename="../drawtools.cpp" line="837"/>
<location filename="../drawtools.cpp" line="824"/>
<source>Select image</source>
<translation>Выбрать картинку</translation>
</message>

View File

@@ -96,20 +96,6 @@ foreach(_Q ${_QAD_LIBS})
#message(STATUS "Library qad_${_Q}5 (${_QU}) -> ${QAD5_${_QU}_LIBRARY} found in ${_SEARCH_DIR}")
list(APPEND QT_MULTILIB_LIST qad_${_Q})
endforeach()
set(_PIQT_LIBS piqt piqt_utils)
foreach(_Q ${_PIQT_LIBS})
foreach(_v ${_QT_VERSIONS_})
set(MULTILIB_${_Q}_SUFFIX_Qt${_v} ${_v})
if(hasParent)
set(MULTILIB_${_Q}_SUFFIX_Qt${_v} ${_v} PARENT_SCOPE)
endif()
#message(STATUS "MULTILIB_${_Q}_SUFFIX_Qt${_v} = ${_v}")
endforeach()
#message(STATUS "Library ${_Q}5 (${_QU}) -> ${QAD5_${_QU}_LIBRARY} found in ${_SEARCH_DIR}")
list(APPEND QT_MULTILIB_LIST ${_Q})
endforeach()
foreach(_Q ${_QAD_LIBS})
string(TOUPPER ${_Q} _QU)
set(_target QAD::${_ITN_${_Q}})

View File

@@ -51,7 +51,6 @@ void TouchButtFrame::setButtons(const QStringList & captions) {
addButton(QString(captions.at(i)).replace("\\n", "\n"));
if (button(cur) != 0) button(cur)->setChecked(true);
else if (!captions.isEmpty()) button(0)->setChecked(true);
resetColors();
}

View File

@@ -3,7 +3,6 @@
#include <QDirIterator>
#include <QTranslator>
#include <QApplication>
#include <QDebug>
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
# include <QStandardPaths>
#else

View File

@@ -21,12 +21,12 @@
#define QAD_LOCATIONS_H
#include "qad_export.h"
#include <QString>
#include <QDebug>
namespace QAD {
enum LocationType {
enum QAD_EXPORT LocationType {
ltConfig,
ltCache,
};

View File

@@ -45,6 +45,7 @@ namespace QAD {
struct QAD_EXPORT Enum {
Enum(const QString & n = QString()): enum_name(n) {}
Enum(const QMetaEnum & meta, int selected = 0);
QString toString() const {return selected;} // obsolete, use selectedName()
int selectedValue() const;
QString selectedName() const {return selected;}
bool selectValue(int v);
@@ -63,18 +64,15 @@ namespace QAD {
};
struct QAD_EXPORT File {
File(const QString & p = QString(), const QString & f = QString(), bool abs = false, bool save_mode = false):
file(p), filter(f), is_abs(abs), is_save(save_mode) {}
File(const QString & p = QString(), const QString & f = QString(), bool abs = false): file(p), filter(f), is_abs(abs) {}
QString toString() const {return file;}
QString file;
QString filter;
bool is_abs;
bool is_save;
};
struct QAD_EXPORT Dir {
Dir(const QString & d = QString(), bool abs = false):
dir(d), is_abs(abs) {}
Dir(const QString & d = QString(), bool abs = false): dir(d), is_abs(abs) {}
QString toString() const {return dir;}
QString dir;
bool is_abs;
@@ -115,8 +113,8 @@ inline QDataStream & operator >>(QDataStream & s, QAD::Enum & v) {s >> v.enum_na
inline QDebug operator <<(QDebug s, const QAD::Enum & v) {s.nospace() << v.selected; return s.space();}
Q_DECLARE_METATYPE(QAD::File)
inline QDataStream & operator <<(QDataStream & s, const QAD::File & v) {s << v.file << v.filter << uchar((v.is_abs ? 1 : 0) + (v.is_save ? 2 : 0)); return s;}
inline QDataStream & operator >>(QDataStream & s, QAD::File & v) {uchar f(0); s >> v.file >> v.filter >> f; v.is_abs = ((f & 1) == 1); v.is_save = ((f & 2) == 2); return s;}
inline QDataStream & operator <<(QDataStream & s, const QAD::File & v) {s << v.file << v.filter << v.is_abs; return s;}
inline QDataStream & operator >>(QDataStream & s, QAD::File & v) {s >> v.file >> v.filter >> v.is_abs; return s;}
inline QDebug operator <<(QDebug s, const QAD::File & v) {s.nospace() << v.file; return s.space();}
Q_DECLARE_METATYPE(QAD::Dir)

View File

@@ -101,7 +101,7 @@ void StringListEdit::editItem() {
PathEdit::PathEdit(QWidget * parent): QWidget(parent), lay(QBoxLayout::LeftToRight, this) {
is_dir = is_abs = is_save = false;
is_dir = is_abs = false;
filter = tr("All files(*)");
line = new CLineEdit(this);
//line->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
@@ -134,24 +134,10 @@ void PathEdit::resizeEvent(QResizeEvent *) {
}
void PathEdit::setValue(const QString & v) {
line->setText(v);
if (!is_dir && is_save)
butt_select->setIcon(QIcon(":/icons/document-save.png"));
else
butt_select->setIcon(QIcon(":/icons/document-open.png"));
}
void PathEdit::select() {
QString ret;
if (is_dir) ret = QFileDialog::getExistingDirectory(this, tr("Select directory"), value());
else {
if (is_save)
ret = QFileDialog::getSaveFileName(this, tr("Select file"), value(), filter);
else
ret = QFileDialog::getOpenFileName(this, tr("Select file"), value(), filter);
}
else ret = QFileDialog::getOpenFileName(this, tr("Select file"), value(), filter);
if (ret.isEmpty()) return;
if (!is_abs)
ret = QDir::current().relativeFilePath(ret);
@@ -383,7 +369,6 @@ QVariant QVariantEdit::value() const {
ret.file = _path->value();
ret.filter = _path->filter;
ret.is_abs = _path->is_abs;
ret.is_save = _path->is_save;
return QVariant::fromValue<QAD::File>(ret);
}
}
@@ -480,18 +465,16 @@ void QVariantEdit::_setEnum(const QAD::Enum & v) {
void QVariantEdit::_setFile(const QAD::File & v) {
_path->is_dir = false;
_path->setValue(v.file);
_path->filter = v.filter;
_path->is_abs = v.is_abs;
_path->is_save = v.is_save;
_path->setValue(v.file);
}
void QVariantEdit::_setDir(const QAD::Dir & v) {
_path->is_dir = true;
_path->is_abs = v.is_abs;
_path->setValue(v.dir);
_path->is_abs = v.is_abs;
}

View File

@@ -75,7 +75,7 @@ public:
QString value() const {return line->text();}
bool is_dir, is_abs, is_save;
bool is_dir, is_abs;
QString filter;
private:
@@ -87,7 +87,7 @@ private:
QPushButton * butt_select;
public slots:
void setValue(const QString & v);
void setValue(const QString & v) {line->setText(v);}
private slots:
void select();

View File

@@ -199,7 +199,7 @@ public:
PIHash<Key, T> & clear() {pih_content.clear(); return *this;}
void swap(PIHash<Key, T> & other) {
pih_content.swap(other.pih_content);
piSwapBinary<PIVector<PIVector<HashEntry> > >(pih_content, other.pih_content);
}
PIHash<Key, T> & insert(const Key & key, const T & value) {

View File

@@ -394,15 +394,15 @@ void CDItemModel::rebuildModel() {
void CDItemModel::buildItem(CDItem * it, CDSection & r) {
//piCout << "build item" << r.name << r.alias;
auto i = r.cd.makeIterator();
while (i.next()) {
PIMap<int, CDType>::iterator i;
for (i = r.cd.begin(); i != r.cd.end(); ++i) {
it->childs << new CDItem(interface, i.key(), CDItem::ItemCDType, it);
}
it->item_count = it->childs.size();
auto j = r.s.makeIterator();
while (j.next()) {
PIMap<int, CDSection>::iterator j;
for (j = r.s.begin(); j != r.s.end(); ++j) {
it->childs << new CDItem(interface, j.key(), CDItem::ItemCDSection, it);
buildItem(it->childs.back(), j.valueRef());
buildItem(it->childs.back(), j.value());
}
}

View File

@@ -1,5 +1,5 @@
/*
QGL Buffer
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL Buffer
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL CubeTexture
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL CubeTexture
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL Framebuffer
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL Framebuffer
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL FramebufferMipmap
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL FramebufferMipmap
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL Material
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify
@@ -22,6 +22,66 @@
using namespace QGLEngineShaders;
/*
bool CubeTexture::create() {
//qDebug("create");
destroy();
glGenTextures(1, &id_);
glBindTexture(GL_TEXTURE_CUBE_MAP, id_);
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
//glTexParameteri(GL_TEXTURE_CUBE_MAP, GL_GENERATE_MIPMAP_SGIS, GL_TRUE);
//glClearError();
glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X, 0, format_, size, size, 0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
glTexImage2D(GL_TEXTURE_CUBE_MAP_NEGATIVE_X, 0, format_, size, size, 0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_Y, 0, format_, size, size, 0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
glTexImage2D(GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, 0, format_, size, size, 0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_Z, 0, format_, size, size, 0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
glTexImage2D(GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, 0, format_, size, size, 0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
//qDebug() << glGetError();
changed_ = false;
return id_ > 0;
}
void CubeTexture::load() {
if (isEmpty()) return;
create();
if (!path(0).isEmpty()) loadFront(path(0));
if (!path(1).isEmpty()) loadBack(path(1));
if (!path(2).isEmpty()) loadLeft(path(2));
if (!path(3).isEmpty()) loadRight(path(3));
if (!path(4).isEmpty()) loadTop(path(4));
if (!path(5).isEmpty()) loadBottom(path(5));
}
void CubeTexture::loadFromDirectory(const QString & dir) {
QDir d(dir); QFileInfoList sl;
sl = d.entryInfoList(QStringList("front.*"), QDir::Files | QDir::NoDotAndDotDot); if (!sl.isEmpty()) loadFront(sl[0].absoluteFilePath());
sl = d.entryInfoList(QStringList("back.*"), QDir::Files | QDir::NoDotAndDotDot); if (!sl.isEmpty()) loadBack(sl[0].absoluteFilePath());
sl = d.entryInfoList(QStringList("left.*"), QDir::Files | QDir::NoDotAndDotDot); if (!sl.isEmpty()) loadLeft(sl[0].absoluteFilePath());
sl = d.entryInfoList(QStringList("right.*"), QDir::Files | QDir::NoDotAndDotDot); if (!sl.isEmpty()) loadRight(sl[0].absoluteFilePath());
sl = d.entryInfoList(QStringList("top.*"), QDir::Files | QDir::NoDotAndDotDot); if (!sl.isEmpty()) loadTop(sl[0].absoluteFilePath());
sl = d.entryInfoList(QStringList("bottom.*"), QDir::Files | QDir::NoDotAndDotDot); if (!sl.isEmpty()) loadBottom(sl[0].absoluteFilePath());
}
void CubeTexture::loadPathesFromDirectory(const QString & dir) {
QDir d(dir); QFileInfoList sl;
sl = d.entryInfoList(QStringList("front.*"), QDir::Files | QDir::NoDotAndDotDot); if (!sl.isEmpty()) pathes[0] = sl[0].absoluteFilePath();
sl = d.entryInfoList(QStringList("back.*"), QDir::Files | QDir::NoDotAndDotDot); if (!sl.isEmpty()) pathes[1] = sl[0].absoluteFilePath();
sl = d.entryInfoList(QStringList("left.*"), QDir::Files | QDir::NoDotAndDotDot); if (!sl.isEmpty()) pathes[2] = sl[0].absoluteFilePath();
sl = d.entryInfoList(QStringList("right.*"), QDir::Files | QDir::NoDotAndDotDot); if (!sl.isEmpty()) pathes[3] = sl[0].absoluteFilePath();
sl = d.entryInfoList(QStringList("top.*"), QDir::Files | QDir::NoDotAndDotDot); if (!sl.isEmpty()) pathes[4] = sl[0].absoluteFilePath();
sl = d.entryInfoList(QStringList("bottom.*"), QDir::Files | QDir::NoDotAndDotDot); if (!sl.isEmpty()) pathes[5] = sl[0].absoluteFilePath();
}
*/
Map::Map() {
bitmap_id = 0;

View File

@@ -1,5 +1,5 @@
/*
QGL Material
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify
@@ -22,6 +22,57 @@
#include "glshaders_types.h"
#include "chunkstream.h"
/*
class Texture {
public:
Texture(int _width, int _height, const GLenum & _format = GL_RGBA8, const GLenum & _target = GL_TEXTURE_2D) {wid = _width; hei = _height; format_ = _format; target_ = _target; id_ = 0;}
bool create() {destroy(); createGLTexture(id_, wid, hei, format_, target_); return id_ > 0;}
void destroy() {if (id_ > 0) glDeleteTextures(1, &id_); id_ = 0;}
void bind() {if (id_ > 0) glBindTexture(target_, id_);}
void release() {glBindTexture(target_, 0);}
int width() const {return wid;}
int height() const {return hei;}
GLenum format() const {return format_;}
GLenum target() const {return target_;}
GLuint id() const {return id_;}
private:
int wid, hei;
GLenum format_, target_;
GLuint id_;
};
class CubeTexture {
public:
CubeTexture(int _size, const GLenum & _format = GL_RGBA8) {size = _size; format_ = _format; id_ = 0; changed_ = false; pathes.resize(6);}
bool create();
void destroy() {if (id_ > 0) glDeleteTextures(1, &id_); id_ = 0;}
void bind() {if (changed_) {changed_ = false; create();} if (id_ > 0) glBindTexture(GL_TEXTURE_CUBE_MAP, id_);}
void release() {glBindTexture(GL_TEXTURE_CUBE_MAP, 0);}
void resize(int _size) {size = _size; changed_ = true;}
void loadFromDirectory(const QString & dir);
void loadFront(const QString & path) {bind(); pathes[0] = path; createGLTexture(id_, rotateQImageLeft(QImage(path)).scaled(size, size, Qt::IgnoreAspectRatio, Qt::SmoothTransformation), format_, GL_TEXTURE_CUBE_MAP_POSITIVE_X);}
void loadBack(const QString & path) {bind(); pathes[1] = path; createGLTexture(id_, rotateQImageRight(QImage(path)).scaled(size, size, Qt::IgnoreAspectRatio, Qt::SmoothTransformation), format_, GL_TEXTURE_CUBE_MAP_NEGATIVE_X);}
void loadLeft(const QString & path) {bind(); pathes[2] = path; createGLTexture(id_, QImage(path).scaled(size, size, Qt::IgnoreAspectRatio, Qt::SmoothTransformation), format_, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y);}
void loadRight(const QString & path) {bind(); pathes[3] = path; createGLTexture(id_, rotateQImage180(QImage(path)).scaled(size, size, Qt::IgnoreAspectRatio, Qt::SmoothTransformation), format_, GL_TEXTURE_CUBE_MAP_POSITIVE_Y);}
void loadTop(const QString & path) {bind(); pathes[4] = path; createGLTexture(id_, rotateQImageLeft(QImage(path)).scaled(size, size, Qt::IgnoreAspectRatio, Qt::SmoothTransformation), format_, GL_TEXTURE_CUBE_MAP_NEGATIVE_Z);}
void loadBottom(const QString & path) {bind(); pathes[5] = path; createGLTexture(id_, rotateQImageLeft(QImage(path)).scaled(size, size, Qt::IgnoreAspectRatio, Qt::SmoothTransformation), format_, GL_TEXTURE_CUBE_MAP_POSITIVE_Z);}
void load();
bool isEmpty() const {foreach (const QString & i, pathes) if (!i.isEmpty()) return false; return true;}
GLenum format() const {return format_;}
void setFormat(GLenum f) {format_ = f; changed_ = true;}
GLuint id() const {return id_;}
const QString & path(int side) const {return pathes[side];}
void setPath(int side, const QString & p) {pathes[side] = p;}
void loadPathesFromDirectory(const QString & dir);
private:
bool changed_;
int size;
GLenum format_;
GLuint id_;
QVector<QString> pathes;
};
*/
class Map {
public:

View File

@@ -1,5 +1,5 @@
/*
QGL Mesh
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify
@@ -24,7 +24,7 @@
using namespace QGLEngineShaders;
//static int _count = 0;
static int _count = 0;
Mesh::Mesh(GLenum geom_type_): geom_type(geom_type_),
buffer_geom(GL_ARRAY_BUFFER, GL_STATIC_DRAW),

View File

@@ -1,5 +1,5 @@
/*
QGL Mesh
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL Primitives
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify
@@ -20,6 +20,8 @@
#include "glmesh.h"
Mesh * Primitive::plane(float width, float length) {
Mesh * ret = new Mesh();
QVector<QVector3D> & v(ret->vertices ());

View File

@@ -1,5 +1,5 @@
/*
QGL Primitives
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGLEngineShaders
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGLEngineShaders
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGLEngineShaders
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGLEngineShaders
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify
@@ -16,6 +16,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "glshaders_types.h"

View File

@@ -1,5 +1,5 @@
/*
QGLEngineShaders
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL Texture2DArray
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL Texture2DArray
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL Transform
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify
@@ -16,8 +16,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "gltransform.h"
//#include <Qt3DCore/private/sqt_p.h>
#include "gltypes.h"
#include <cmath>

View File

@@ -1,5 +1,5 @@
/*
QGL Transform
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGLView Types
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGLView Types
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify
@@ -128,7 +128,7 @@ inline float randomu() {return float(random()) / RAND_MAX;}
inline const QSizeF operator *(const QSizeF & f, const QSizeF & s) {return QSizeF(f.width() * s.width(), f.height() * s.height());}
#ifndef PIP_VERSION
template<typename T> inline void piSwap(T & f, T & s) {T t(f); f = s; s = t;}
template<typename Type> inline void piSwap(Type & f, Type & s) {Type t = f; f = s; s = t;}
template<typename Type> inline Type piMin(const Type & f, const Type & s) {return (f > s) ? s : f;}
template<typename Type> inline Type piMin(const Type & f, const Type & s, const Type & t) {return (f < s && f < t) ? f : ((s < t) ? s : t);}
template<typename Type> inline Type piMax(const Type & f, const Type & s) {return (f < s) ? s : f;}

View File

@@ -1,5 +1,5 @@
/*
QGL VertexObject
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL VertexObject
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL HDR
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL HDR
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL Loader Assimp
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL Loader Assimp
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL Loader QGL
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL Loader QGL
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL Camera
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL Camera
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL ObjectBase & Light
GLObjectBase & Light
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify
@@ -21,7 +21,7 @@
#include "glscene.h"
#include "glmesh.h"
#include <chunkstream.h>
//static int _count = 0;
static int _count = 0;
ObjectBase::ObjectBase(Mesh * geom, Material * mat) {
type_ = glMesh;

View File

@@ -1,5 +1,5 @@
/*
QGL ObjectBase & Light
GLObjectBase & Light
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL GLRendererBase
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL GLRendererBase
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL Scene
GLObjectBase & Light
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL Scene
GLObjectBase & Light
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL TextureManager
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL TextureManager
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,21 +1,3 @@
/*
QGL GLWidget
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "glwidget.h"
#include "qglview.h"
#include <QVBoxLayout>

View File

@@ -1,21 +1,3 @@
/*
QGL GLWidget
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GLWIDGET_H
#define GLWIDGET_H

View File

@@ -1,5 +1,5 @@
/*
QGL MouseController
MouseController
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL MouseController
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,21 +1,3 @@
/*
QGL OpenGLWindow
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "openglwindow.h"
#include <QCoreApplication>
#include <QOpenGLContext>

View File

@@ -1,21 +1,3 @@
/*
QGL OpenGLWindow
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <QWindow>
#include <QOpenGLExtraFunctions>

View File

@@ -150,6 +150,7 @@ public:
bool isServiceMode() const {return renderer_.edit_mode;}
void setServiceMode(bool yes) {renderer_.edit_mode = yes;}
// void addObject(GLObjectBase & o) {addObject(&o);}
Scene::SelectionMode selectionMode() const {return scene_->selectionMode();}
Qt::MouseButton selectionButton() const {return mouse.selectionButton();}
@@ -218,6 +219,7 @@ private:
Camera * camera_, * default_camera;
MouseController mouse;
QMenu context_menu;
// uint cid;
QSet<int> keys_;
QColor backColor_, fogColor_, ambientColor_, hoverHaloColor_, selectionHaloColor_;
QTime time, ktm_;

View File

@@ -1,5 +1,5 @@
/*
QGLViewWindow
Stanley Designer
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGLViewWindow
Stanley Designer
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGLViewWindow
Stanley Designer
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL Renderer
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL Renderer
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL RendererBase
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL RendererBase
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL RendererMaterial
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL RendererMaterial
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL RendererSelection
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL RendererSelection
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL RendererService
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL RendererService
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL TonemappingProc
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL TonemappingProc
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify
@@ -52,7 +52,7 @@ private:
float frame_max, cur_max;
bool need_render_sum, enabled;
std::atomic_bool exit_;
volatile bool exit_;
int timer_tone, timer_delim;
Framebuffer fbo_1x1;
FramebufferMipmap fbomm;

View File

@@ -1,5 +1,5 @@
/*
QGL MaterialEditor
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL MaterialEditor
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL MaterialMapEditor
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify
@@ -13,7 +13,7 @@
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
along with this programap-> If not, see <http://www.gnu.org/licenses/>.
*/
#include "material_map_editor.h"

View File

@@ -1,5 +1,5 @@
/*
QGL MaterialMapEditor
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL MaterialsEditor
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL MaterialsEditor
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL ObjectEditor
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
QGL ObjectEditor
QGLView
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify

View File

@@ -1,21 +1,3 @@
/*
QGL PrimitiveEditor
Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "primitiveeditor.h"
#include "ui_primitiveeditor.h"
#include <QMetaEnum>

Some files were not shown because too many files have changed in this diff Show More