Compare commits
2 Commits
2af38a4937
...
456516db01
Author | SHA1 | Date |
---|---|---|
|
456516db01 | |
|
df2d145809 |
|
@ -130,11 +130,18 @@ void accept_panel::AcceptPanel::dropEvent(QDropEvent *ev)
|
||||||
view_manager->doRetrieve(view);
|
view_manager->doRetrieve(view);
|
||||||
view_manager->siblingAttach(view, anchor_view, SplitType::SPLIT_V_BFIRST);
|
view_manager->siblingAttach(view, anchor_view, SplitType::SPLIT_V_BFIRST);
|
||||||
break;
|
break;
|
||||||
case HoverType::CUBE_CENTER:
|
case HoverType::CUBE_CENTER: {
|
||||||
view_manager->doRetrieve(view);
|
view_manager->doRetrieve(view);
|
||||||
anchor_view->parentRes()->replaceView(view, anchor_view);
|
auto pinst = anchor_view->parentRes();
|
||||||
view_manager->doRetrieve(anchor_view);
|
if(pinst){
|
||||||
break;
|
pinst->replaceView(view, anchor_view);
|
||||||
|
view_manager->doRetrieve(anchor_view);
|
||||||
|
}else{
|
||||||
|
view_manager->doRetrieve(anchor_view);
|
||||||
|
dynamic_cast<split_window::SplitWindow*>(view_manager)->setPresentTarget(view);
|
||||||
|
view->setVisible(true);
|
||||||
|
}
|
||||||
|
} break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,7 @@ using namespace dock_panel;
|
||||||
DragHeader::DragHeader(const QString &title, DockableView *bind_core)
|
DragHeader::DragHeader(const QString &title, DockableView *bind_core)
|
||||||
: QFrame(bind_core),
|
: QFrame(bind_core),
|
||||||
bind_core(bind_core),
|
bind_core(bind_core),
|
||||||
|
icon_holder(new QLabel(this)),
|
||||||
title_holder(new QLabel(this)),
|
title_holder(new QLabel(this)),
|
||||||
close_btn(new QPushButton("x",this)),
|
close_btn(new QPushButton("x",this)),
|
||||||
minimal_btn(new QPushButton("-",this)) {
|
minimal_btn(new QPushButton("-",this)) {
|
||||||
|
@ -22,6 +23,9 @@ DragHeader::DragHeader(const QString &title, DockableView *bind_core)
|
||||||
layout->setSpacing(0);
|
layout->setSpacing(0);
|
||||||
layout->setContentsMargins(0, 0, 0, 0);
|
layout->setContentsMargins(0, 0, 0, 0);
|
||||||
|
|
||||||
|
icon_holder->setPixmap(QIcon(":/icons/headertop/story.png").pixmap(22,22));
|
||||||
|
layout->addWidget(icon_holder, 0, Qt::AlignLeft);
|
||||||
|
|
||||||
title_holder->setText(title);
|
title_holder->setText(title);
|
||||||
title_holder->setContentsMargins(2,0, 0, 0);
|
title_holder->setContentsMargins(2,0, 0, 0);
|
||||||
layout->addWidget(title_holder, 1, Qt::AlignLeft);
|
layout->addWidget(title_holder, 1, Qt::AlignLeft);
|
||||||
|
@ -51,7 +55,7 @@ void DragHeader::setTitle(const QString &title)
|
||||||
void DragHeader::setTitle(const QString &title, const QIcon &icon)
|
void DragHeader::setTitle(const QString &title, const QIcon &icon)
|
||||||
{
|
{
|
||||||
this->setTitle(title);
|
this->setTitle(title);
|
||||||
this->title_holder->setPixmap(icon.pixmap(22, 22));
|
this->icon_holder->setPixmap(icon.pixmap(22, 22));
|
||||||
}
|
}
|
||||||
|
|
||||||
void DragHeader::optConfig(bool retrieve, bool close)
|
void DragHeader::optConfig(bool retrieve, bool close)
|
||||||
|
@ -104,6 +108,9 @@ DockableView::DockableView(split_frame::ResManager *mgr, QWidget *present)
|
||||||
layout->addWidget(new QWidget(this));
|
layout->addWidget(new QWidget(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this->icon_store = QIcon(":/icons/headertop/story.png");
|
||||||
|
title_header->setTitle("未命名", icon_store);
|
||||||
|
|
||||||
layout->setSpacing(0);
|
layout->setSpacing(0);
|
||||||
layout->setContentsMargins(0, 2, 0, 0);
|
layout->setContentsMargins(0, 2, 0, 0);
|
||||||
|
|
||||||
|
@ -121,7 +128,6 @@ DockableView::DockableView(split_frame::ResManager *mgr, QWidget *present)
|
||||||
|
|
||||||
DockableView::~DockableView() {
|
DockableView::~DockableView() {
|
||||||
manager_inst->removePresentView(this);
|
manager_inst->removePresentView(this);
|
||||||
qDebug() << "view-deleted";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DockableView::viewConfig(bool replace, bool close, bool retrieve)
|
void DockableView::viewConfig(bool replace, bool close, bool retrieve)
|
||||||
|
|
|
@ -18,6 +18,7 @@ namespace dock_panel {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
private:
|
private:
|
||||||
DockableView *const bind_core;
|
DockableView *const bind_core;
|
||||||
|
QLabel *const icon_holder;
|
||||||
QLabel *const title_holder;
|
QLabel *const title_holder;
|
||||||
QPushButton *const close_btn, *const minimal_btn;
|
QPushButton *const close_btn, *const minimal_btn;
|
||||||
std::tuple<bool, QPointF> press_flag = std::make_tuple(false, QPointF());
|
std::tuple<bool, QPointF> press_flag = std::make_tuple(false, QPointF());
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
<RCC>
|
||||||
|
<qresource prefix="/icons/headertop">
|
||||||
|
<file>story.png</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
|
@ -40,3 +40,6 @@ else:unix: LIBS += -L$$OUT_PWD/../libConfig/ -llibConfig
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../libConfig
|
INCLUDEPATH += $$PWD/../libConfig
|
||||||
DEPENDPATH += $$PWD/../libConfig
|
DEPENDPATH += $$PWD/../libConfig
|
||||||
|
|
||||||
|
RESOURCES += \
|
||||||
|
defaulticon.qrc
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
Loading…
Reference in New Issue