-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* started adding base class API for widgetInterface (on mouse events, slice change, etc.) added basic fix/hack to copy plugins to bundle on osx * major refactoring: - added signals and slots to base widget class - replaced pt_clicked by mouse_clicked (moved/released) - simplified connection/disconnection of slots in Mainwindow - added todos - biggest worry is currently: on_tissuenr_changed -> what is meaning of index passed to callback, how is it used (offset -1 all over the code makes things really confusing) * use override keyword in widgetinterface derived classes * more cleanup of WidgetInterface and derived classes * use git mv to rename files to fix capitalization * rename some classes, change pointer/reference alignment * fix several cases where slicenr_change api was not yet updated instead of calling cleanup for specific widgets, base class now has cleanup API, and Mainwindow calls it in generic block * renamed folder (and project) Plugin to Interface (iSegInterface respectively) * rename XAddon.* to XPlugin.*
- Loading branch information
Showing
117 changed files
with
4,257 additions
and
5,187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
|
||
#include "iSegCore.h" | ||
|
||
#include "Point.h" | ||
#include "Interface/Point.h" | ||
|
||
#include <vector> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/* | ||
* Copyright (c) 2018 The Foundation for Research on Information Technologies in Society (IT'IS). | ||
* | ||
* This file is part of iSEG | ||
* (see https://github.com/ITISFoundation/osparc-iseg). | ||
* | ||
* This software is released under the MIT License. | ||
* https://opensource.org/licenses/MIT | ||
*/ | ||
#pragma once | ||
|
||
#include "InterfaceApi.h" | ||
|
||
#include "DataSelection.h" | ||
#include "Point.h" | ||
|
||
#include <qcursor.h> | ||
#include <qdir.h> | ||
#include <qicon.h> | ||
#include <qwidget.h> | ||
|
||
namespace iseg { | ||
|
||
class ISEG_INTERFACE_API WidgetInterface : public QWidget | ||
{ | ||
Q_OBJECT | ||
public: | ||
WidgetInterface(QWidget* parent, const char* name, Qt::WindowFlags wFlags); | ||
virtual void init() {} | ||
virtual void newloaded() {} | ||
virtual void cleanup() {} | ||
virtual FILE* SaveParams(FILE* fp, int version) { return fp; }; | ||
virtual FILE* LoadParams(FILE* fp, int version) { return fp; }; | ||
virtual void hideparams_changed() {} | ||
static void set_hideparams(bool hide) { hideparams = hide; } | ||
static bool get_hideparams() { return hideparams; } | ||
virtual std::string GetName() { return std::string(""); } | ||
virtual QIcon GetIcon(QDir picdir) = 0; | ||
|
||
virtual void on_tissuenr_changed(int i) {} | ||
virtual void on_slicenr_changed() {} | ||
|
||
virtual void on_mouse_clicked(Point p) {} | ||
virtual void on_mouse_released(Point p) {} | ||
virtual void on_mouse_moved(Point p) {} | ||
|
||
QCursor* get_cursor() { return m_cursor; } | ||
|
||
signals: | ||
void begin_datachange(iseg::DataSelection& dataSelection, | ||
QWidget* sender = NULL, bool beginUndo = true); | ||
void end_datachange(QWidget* sender = NULL, | ||
iseg::EndUndoAction undoAction = iseg::EndUndo); | ||
|
||
private slots: | ||
void tissuenr_changed(int i) { on_tissuenr_changed(i); } | ||
void slicenr_changed() { on_slicenr_changed(); } | ||
|
||
// \todo duplicate slots (and connections) and pass argument source_or_target to callbacks | ||
void mouse_clicked(Point p) { on_mouse_clicked(p); } | ||
void mouse_released(Point p) { on_mouse_released(p); } | ||
void mouse_moved(Point p) { on_mouse_moved(p); } | ||
|
||
protected: | ||
QCursor* m_cursor; | ||
|
||
static bool hideparams; | ||
}; | ||
|
||
} // namespace iseg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.