minor cleanups.
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -11,4 +11,5 @@ doc/~$ree_thoughts.docx
|
||||
doc/~WRL0004.tmp
|
||||
UsersC998D~1.HOLAppDataLocalTemptmpj0mbo3rd
|
||||
xml/fitzefatz.xml
|
||||
build*
|
||||
build*
|
||||
doc/
|
||||
|
14
doc/Doxyfile
14
doc/Doxyfile
@@ -74,7 +74,7 @@ PROJECT_ICON =
|
||||
# entered, it will be relative to the location where Doxygen was started. If
|
||||
# left blank the current directory will be used.
|
||||
|
||||
OUTPUT_DIRECTORY =
|
||||
OUTPUT_DIRECTORY = C:/syncMePlease/sourceworx.ng/xtree.ng/doc
|
||||
|
||||
# If the CREATE_SUBDIRS tag is set to YES then Doxygen will create up to 4096
|
||||
# sub-directories (in 2 levels) under the output directory of each output format
|
||||
@@ -534,7 +534,7 @@ TIMESTAMP = NO
|
||||
# normally produced when WARNINGS is set to YES.
|
||||
# The default value is: NO.
|
||||
|
||||
EXTRACT_ALL = NO
|
||||
EXTRACT_ALL = YES
|
||||
|
||||
# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
|
||||
# be included in the documentation.
|
||||
@@ -991,7 +991,7 @@ WARN_LOGFILE =
|
||||
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
|
||||
# Note: If this tag is empty the current directory is searched.
|
||||
|
||||
INPUT = C:/syncMePlease/sourceworx.ng/xtree.ng
|
||||
INPUT = C:/syncMePlease/sourceworx.ng/xtree.ng/src
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that Doxygen parses. Internally Doxygen uses the UTF-8 encoding. Doxygen uses
|
||||
@@ -1237,7 +1237,7 @@ FORTRAN_COMMENT_AFTER = 72
|
||||
# also VERBATIM_HEADERS is set to NO.
|
||||
# The default value is: NO.
|
||||
|
||||
SOURCE_BROWSER = NO
|
||||
SOURCE_BROWSER = YES
|
||||
|
||||
# Setting the INLINE_SOURCES tag to YES will include the body of functions,
|
||||
# multi-line macros, enums or list initialized variables directly into the
|
||||
@@ -1455,7 +1455,7 @@ HTML_STYLESHEET =
|
||||
# documentation.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_EXTRA_STYLESHEET =
|
||||
HTML_EXTRA_STYLESHEET = doxygen-awesome-css/doxygen-awesome.css
|
||||
|
||||
# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
|
||||
# other source files which should be copied to the HTML output directory. Note
|
||||
@@ -1478,7 +1478,7 @@ HTML_EXTRA_FILES =
|
||||
# The default value is: AUTO_LIGHT.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_COLORSTYLE = AUTO_LIGHT
|
||||
HTML_COLORSTYLE = TOGGLE
|
||||
|
||||
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
|
||||
# will adjust the colors in the style sheet and background images according to
|
||||
@@ -2061,7 +2061,7 @@ EXTRA_SEARCH_MAPPINGS =
|
||||
# If the GENERATE_LATEX tag is set to YES, Doxygen will generate LaTeX output.
|
||||
# The default value is: YES.
|
||||
|
||||
GENERATE_LATEX = YES
|
||||
GENERATE_LATEX = NO
|
||||
|
||||
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
|
||||
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
|
||||
|
@@ -120,10 +120,7 @@ XQItem::XQPrefixExponentMap XQItem::s_PrefixExponentMap
|
||||
XQItem::XQItem()
|
||||
: XQItem{XQItemType::staticItemType()}
|
||||
{
|
||||
setFlags(Qt::NoItemFlags);
|
||||
//setText("[dummy]");
|
||||
//XQItemType::setStaticType( this );
|
||||
//setItemType(NTItemType::defaultItemType());
|
||||
|
||||
}
|
||||
|
||||
XQItem::XQItem( XQItemType* itemType )
|
||||
@@ -146,7 +143,7 @@ XQItem::XQItem(XQItemType* itemType, const QString *content, const XQNodePtr& co
|
||||
setContentNode(contentNode);
|
||||
}
|
||||
|
||||
/// ------------------ forbidden fruits ------------------
|
||||
|
||||
|
||||
XQItem::XQItem(const XQItem& other)
|
||||
: QStandardItem( other )
|
||||
@@ -309,8 +306,6 @@ void XQItem::setRenderStyle(RenderStyle renderStyle )
|
||||
}
|
||||
|
||||
|
||||
//! firz
|
||||
|
||||
XQItem::EditorType XQItem::editorType() const
|
||||
{
|
||||
return data( EditorTypeRole ).value<EditorType>();
|
||||
|
@@ -24,7 +24,6 @@
|
||||
|
||||
using XQItemList = QList<QStandardItem*>;
|
||||
|
||||
//class QStyleOptionViewItem;
|
||||
class XQItemFactory;
|
||||
class XQItemType;
|
||||
|
||||
@@ -38,9 +37,6 @@ class XQItem : public QStandardItem
|
||||
|
||||
public:
|
||||
|
||||
//friend class XQItemType;
|
||||
//friend class XQItemFactory;
|
||||
|
||||
/// Die data(enum role) Infrastruktur wird sowohl für XQItem als auch
|
||||
/// für den XQItemType verwendet, deshalb definieren wir hier _alle_
|
||||
/// notwendigen Roles
|
||||
@@ -69,11 +65,6 @@ public:
|
||||
|
||||
TypeKeyRole,
|
||||
//TypeNameRole, nicht so wichtig
|
||||
/*
|
||||
renderStyleToStringRole,
|
||||
editorTypeToStringRole,
|
||||
unitTypeToStringRole,
|
||||
*/
|
||||
RoleEnd
|
||||
};
|
||||
|
||||
@@ -94,11 +85,6 @@ public:
|
||||
CustomRenderStyle,
|
||||
RenderStyleEnd //!< Not a special editor. Keep at end of this enumeration!
|
||||
// ...
|
||||
/*
|
||||
PickerStyle
|
||||
LineEditStyle ,
|
||||
UserDefStyle ,
|
||||
*/
|
||||
};
|
||||
|
||||
// wie wirds editiert
|
||||
@@ -146,12 +132,6 @@ public:
|
||||
XQItem( XQItemType* itemType, const QString* content );
|
||||
XQItem( XQItemType* itemType, const QString* content, const XQNodePtr& contentNode );
|
||||
|
||||
/*
|
||||
XQItem(const QString& text);
|
||||
XQItem(const QIcon& icon, const QString& text);
|
||||
XQItem(int rows, int columns);
|
||||
*/
|
||||
|
||||
XQItem(const XQItem& other);
|
||||
XQItem(const QStandardItem& other);
|
||||
|
||||
@@ -161,13 +141,14 @@ public:
|
||||
//! -- not used at the moment --
|
||||
XQItem* clone() const override;
|
||||
|
||||
//!
|
||||
bool isValid() const;
|
||||
|
||||
|
||||
|
||||
// shortcuts auf XQNodePtr
|
||||
|
||||
//! gibt den zu diesem item gehörigen datenknoten
|
||||
virtual XQNodePtr contentNode() const;
|
||||
|
||||
|
||||
virtual void setContentNode(const XQNodePtr& contentNode );
|
||||
|
||||
virtual XQNodePtr sheetNode() const;
|
||||
@@ -203,6 +184,7 @@ public:
|
||||
QString renderStyleToString() const;
|
||||
void setRenderStyle(RenderStyle renderStyle );
|
||||
|
||||
//! fitze FATZE!
|
||||
EditorType editorType() const;
|
||||
QString editorTypeToString() const;
|
||||
void setEditorType(EditorType editorType);
|
||||
|
@@ -181,32 +181,6 @@ XQItemType* XQItemType::staticItemType()
|
||||
return &s_DummyItemType;
|
||||
}
|
||||
|
||||
//
|
||||
// Das ist eigentlich Blödsinn, KISS baby KISS!
|
||||
// Die ItemTypes sollten statisch bleiben, zusätzliche
|
||||
// oder geänderte Attribute eines Items landen dann
|
||||
// halt in G.N. in QStadardItem::data Vector!
|
||||
//
|
||||
/*
|
||||
XQItemType* XQItemType::storeItemType(XQItemType* protoType)
|
||||
{
|
||||
// haben wir den prototype schon?
|
||||
QString itemTypeKey = protoType->makeItemTypeKey();
|
||||
if(s_ItemTypeMap.contains( itemTypeKey ) )
|
||||
{
|
||||
// dann weg damit ...
|
||||
delete protoType;
|
||||
// ... und die alte Version zurückgeben
|
||||
return s_ItemTypeMap[itemTypeKey];
|
||||
}
|
||||
// sonst: wir speichern den prototype
|
||||
s_ItemTypeMap.insert( itemTypeKey, protoType);
|
||||
s_ItemTypeCount++;
|
||||
qDebug() << " --- ItemTypes: " << s_ItemTypeCount;
|
||||
|
||||
return protoType;
|
||||
}
|
||||
*/
|
||||
|
||||
QString XQItemType::makeItemTypeKey()
|
||||
{
|
||||
@@ -221,34 +195,6 @@ QString XQItemType::makeItemTypeKey()
|
||||
key = key.arg( icon().name() );
|
||||
key = key.arg( fixedChoicesToString() );
|
||||
|
||||
/*
|
||||
static const QList<XQItem::ItemDataRole> roleList
|
||||
{
|
||||
XQItem::RenderStyleRole,
|
||||
XQItem::EditorTypeRole,
|
||||
XQItem::UnitTypeRole,
|
||||
XQItem::ContentFormatRole,
|
||||
XQItem::FlagsRole,
|
||||
XQItem::IconRole,
|
||||
XQItem::FixedChoicesRole
|
||||
};
|
||||
|
||||
QString key;
|
||||
|
||||
for( const auto role : roleList )
|
||||
{
|
||||
qDebug() << " --- YYY trying: " << XQItem::fetchItemDataRoleName( role );
|
||||
QVariant entry = data(role);
|
||||
if( !entry.isNull() && entry.isValid())
|
||||
{
|
||||
// fckin' sonderlocke:
|
||||
key += role == XQItem::IconRole ? entry.value<QIcon>().name() : entry.toString();
|
||||
}
|
||||
key += ":";
|
||||
}
|
||||
*/
|
||||
|
||||
//qDebug() << " --- YES: KEY: " << key;
|
||||
return key;
|
||||
}
|
||||
|
||||
|
@@ -21,22 +21,14 @@
|
||||
#include <xqitem.h>
|
||||
|
||||
|
||||
///
|
||||
/// Ist das Unsinn!? Einfach ein QStandardItem mit data() nehmen?
|
||||
/// Ok, das erspart die die attribs, aber wo ist der fette gewinn?
|
||||
/// statt _editorType = x hast Du dann halt setData( QVariant::fromValue<>(x) );
|
||||
/// Aber: Du kannst T abbilden auf QString ... und dann
|
||||
///
|
||||
|
||||
using XQItemTypeMap = QMap<QString, XQItemType*>;
|
||||
|
||||
//class XQItemType : public QObject
|
||||
|
||||
class XQItemType : public XQItem// public QObject
|
||||
{
|
||||
//
|
||||
//Q_OBJECT
|
||||
// wäre auch eine möglichkeit !?
|
||||
//Q_PROPERTY(XQItem::RenderStyle renderStyle renderStyle getDate WRITE setrenderStyle )
|
||||
// Q_OBJECT
|
||||
// wäre dann auch eine möglichkeit:
|
||||
// Q_PROPERTY(XQItem::RenderStyle renderStyle renderStyle getDate WRITE setrenderStyle )
|
||||
|
||||
public:
|
||||
|
||||
@@ -52,12 +44,10 @@ public:
|
||||
QString formatToSI(const QString& rawText ) const;
|
||||
QString unFormatFromSI(const QString& valueText ) const;
|
||||
|
||||
|
||||
void replaceAttribute( XQItem* item, const QVariant& newValue, int role );
|
||||
|
||||
QString makeItemTypeKey();
|
||||
|
||||
//static XQItemType* storeItemType( XQItemType* protoType );
|
||||
static XQItemType* staticItemType();
|
||||
|
||||
protected:
|
||||
@@ -65,16 +55,6 @@ protected:
|
||||
static XQItemTypeMap s_ItemTypeMap;
|
||||
static size_t s_ItemTypeCount;
|
||||
|
||||
/*
|
||||
static void setItemType( XQItem* item, RenderStyle renderStyle, Qt::ItemFlags flags, UnitType unitType, const QString& format );
|
||||
static void setStaticType( XQItem* item );
|
||||
*/
|
||||
// fix __ch
|
||||
// static void setItemType( XQItem* item, const QString& renderStyle, const QString& unitType, const QString& itemTypeID );
|
||||
|
||||
//static XQItemType* addItemType( const QString& key, RenderStyle renderStyle, UnitType unitType);
|
||||
//static XQItemType* makeItemType( RenderStyle renderStyle, UnitType unitType);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@@ -73,47 +73,11 @@ XQItem& XQModel::xqItemFromIndex(const QModelIndex& index) const
|
||||
return XQItem::fallBackDummyItem();
|
||||
}
|
||||
|
||||
|
||||
|
||||
XQItem& XQModel::xqFirstItem(int row) const
|
||||
{
|
||||
return *static_cast<XQItem*>( QStandardItemModel::item(row) );
|
||||
}
|
||||
|
||||
|
||||
QString XQModel::fetchNodeAttribute(int row, const QString& key )
|
||||
{
|
||||
/*
|
||||
__fix
|
||||
XQItem* item = fromRow(row);
|
||||
if( item && item->hasNode() )
|
||||
return item->contentNode()->attribute( key );
|
||||
|
||||
*/
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief XQModel::fetchNodeTagName get the tag_name of the contentNode
|
||||
* in a row
|
||||
* @param row the row
|
||||
* @return
|
||||
*/
|
||||
|
||||
QString XQModel::fetchNodeTagName( int row )
|
||||
{
|
||||
// __fix
|
||||
/*
|
||||
XQItem* item = fromRow(row);
|
||||
if( item && item->hasNode() )
|
||||
return item->contentNode()->tag_name();
|
||||
*/
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
|
||||
void XQModel::onActionTriggered(QAction* action)
|
||||
{
|
||||
qDebug() << " --- onActionTriggered: count:" << XQNode::s_Count;
|
||||
|
@@ -69,10 +69,6 @@ public:
|
||||
XQItem& xqItemFromIndex(const QModelIndex& index) const;
|
||||
XQItem& xqFirstItem(int row) const;
|
||||
|
||||
// was ist das?
|
||||
QString fetchNodeAttribute(int row, const QString& key );
|
||||
QString fetchNodeTagName(int row );
|
||||
|
||||
// undo-/redo-able stuff
|
||||
|
||||
virtual void cmdToggleSection( const QModelIndex& index );
|
||||
|
@@ -34,48 +34,18 @@ std::ostream& operator<<(std::ostream& os, const QString& obj);
|
||||
using XQNode = znode::zbasic_node<QString>;
|
||||
// default shared node
|
||||
using XQNodePtr = std::shared_ptr<znode::zbasic_node<QString>>;
|
||||
// const ref on XQNodePtr, ok but what its good for?
|
||||
//using const XQNodePtr& = const XQNodePtr&;
|
||||
|
||||
/*
|
||||
class XQBasicSheetNode : public znode::zbasic_node<QString>
|
||||
{
|
||||
public:
|
||||
|
||||
//...
|
||||
};
|
||||
|
||||
using XQSheetNode = std::shared_ptr<const XQBasicSheetNode>;
|
||||
using XQSheetNodeCRef = const XQSheetNode&;
|
||||
*/
|
||||
|
||||
///
|
||||
/// __fix
|
||||
/// sollte man einen XQNodePtr einführen, um 'setAttr<XQNodePtr>()' von
|
||||
/// setAttr<XQNodePtr>() unterscheiden zu können?
|
||||
///
|
||||
/// nice try. (siehe oben). Haut aber so nicht hin, node.children() gibt wieder
|
||||
/// Pointer auf die Basisklasse zurück, ( vgl. XQItemList -> QList<QStandardItem*>.
|
||||
/// Erst dass behandeln!
|
||||
///
|
||||
|
||||
// weak pointer to znode, used for parent()
|
||||
using XQWeakNode = std::weak_ptr<znode::zbasic_node<QString>>;
|
||||
// the node factory
|
||||
using XQNodeFactory = znode::znode_factory<QString>;
|
||||
|
||||
class XQNodeList : public znode::zbasic_node<QString>::znode_list
|
||||
{
|
||||
|
||||
friend class XQSimpleClipBoard;
|
||||
|
||||
public:
|
||||
|
||||
XQNodeList() = default;
|
||||
virtual ~XQNodeList() = default;
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user