Skip to content

Commit

Permalink
Merge pull request #19 from ChrisHal/experimental
Browse files Browse the repository at this point in the history
new feature: check boxes added (Filter, overlay, autoscale)
  • Loading branch information
ChrisHal authored Jun 23, 2022
2 parents b05ab7f + ba654f0 commit f518672
Show file tree
Hide file tree
Showing 5 changed files with 172 additions and 106 deletions.
12 changes: 2 additions & 10 deletions QtPMbrowser/pmbrowserwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@
#include "hkTree.h"
#include "StimTree.h"
#include "helpers.h"
//#include "ui_pmbrowserwindow.h"
#include "DlgChoosePathAndPrefix.h"
//#include "ui_DlgChoosePathAndPrefix.h"
#include "DlgExportMetadata.h"
#include "DlgTreeFilter.h"
#include "PMparameters.h"
Expand Down Expand Up @@ -280,6 +278,8 @@ PMbrowserWindow::PMbrowserWindow(QWidget *parent)
QObject::connect(ui->actionCopy, &QAction::triggered, ui->renderArea, &RenderArea::copyToClipboard);
QAction* aboutQtAct = ui->menuHelp->addAction("About &Qt", qApp, &QApplication::aboutQt);
aboutQtAct->setStatusTip("Show the Qt library's About box");
QObject::connect(ui->pushButtonTreeFilter, &QPushButton::clicked, this, &PMbrowserWindow::on_actionFilter_triggered);
QObject::connect(ui->pushButtonShowAll, &QPushButton::clicked, this, &PMbrowserWindow::on_actionRemove_Filter_triggered);

loadSettings();
ui->renderArea->loadSettings();
Expand Down Expand Up @@ -1060,14 +1060,6 @@ void PMbrowserWindow::dropEvent(QDropEvent* event)
}
}

void PMbrowserWindow::resizeEvent(QResizeEvent* event)
{
auto s = event->size();
ui->widget->resize(s);
ui->splitterH->setGeometry(5, 5, s.width() - 10, s.height() - 30);
QMainWindow::resizeEvent(event);
}

void PMbrowserWindow::closeEvent(QCloseEvent* event)
{
if (settings_modified || ui->renderArea->isSettingsModified()) {
Expand Down
2 changes: 1 addition & 1 deletion QtPMbrowser/pmbrowserwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ private slots:
protected:
void dragEnterEvent(QDragEnterEvent* event) override;
void dropEvent(QDropEvent* event) override;
void resizeEvent(QResizeEvent* event) override;
//void resizeEvent(QResizeEvent* event) override;
void closeEvent(QCloseEvent* event) override;

private:
Expand Down
179 changes: 102 additions & 77 deletions QtPMbrowser/pmbrowserwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>666</width>
<height>662</height>
<width>592</width>
<height>629</height>
</rect>
</property>
<property name="sizeIncrement">
Expand Down Expand Up @@ -38,94 +38,119 @@
<height>1</height>
</size>
</property>
<widget class="QSplitter" name="splitterH">
<property name="geometry">
<rect>
<x>10</x>
<y>11</y>
<width>651</width>
<height>621</height>
</rect>
</property>
<property name="sizeIncrement">
<size>
<width>1</width>
<height>1</height>
</size>
</property>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<widget class="QSplitter" name="splitterV">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="QTreeWidget" name="treePulse">
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QSplitter" name="splitter_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>1</horstretch>
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="headerHidden">
<bool>true</bool>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<column>
<property name="text">
<string notr="true">1</string>
<widget class="QSplitter" name="splitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</column>
</widget>
<widget class="RenderArea" name="renderArea" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>2</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="autoFillBackground">
<bool>true</bool>
</property>
<widget class="QWidget" name="layoutWidget">
<layout class="QGridLayout" name="gridLayout">
<property name="spacing">
<number>1</number>
</property>
<item row="2" column="0" colspan="2">
<widget class="QTreeWidget" name="treePulse">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="headerHidden">
<bool>true</bool>
</property>
<column>
<property name="text">
<string notr="true">1</string>
</property>
</column>
</widget>
</item>
<item row="3" column="0">
<widget class="QPushButton" name="pushButtonTreeFilter">
<property name="focusPolicy">
<enum>Qt::WheelFocus</enum>
</property>
<property name="locale">
<locale language="English" country="UnitedStates"/>
</property>
<property name="text">
<string>Filter...</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QPushButton" name="pushButtonShowAll">
<property name="text">
<string>undo filter</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="RenderArea" name="renderArea" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>2</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="autoFillBackground">
<bool>true</bool>
</property>
</widget>
</widget>
<widget class="QTextEdit" name="textEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</widget>
</widget>
<widget class="QTextEdit" name="textEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</widget>
</item>
</layout>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>666</width>
<height>21</height>
<width>592</width>
<height>26</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
Expand Down
Loading

0 comments on commit f518672

Please sign in to comment.