Commit 82fa72ef authored by Jan Möbius's avatar Jan Möbius

ViewMode Interface Skeleton for toolbars .. still a lot todo

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@7235 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 7bdfaed6
......@@ -1239,9 +1239,13 @@ void Core::setDescriptions(){
QString(tr("Toolbox Entry name,Widget")).split(","),
QString(tr("Name of the new widget in the toolbox,Pointer to the new widget")).split(","));
emit setSlotDescription("addViewMode(QString,QString)", tr("Add a new viewmode"),
emit setSlotDescription("addViewModeToolboxes(QString,QString)", tr("Set toolboxes for a viewmode"),
QString(tr("Name,Toolbox List")).split(","),
QString(tr("Name of the new Viewmode, ; seperated list of toolboxes visible in this viewmode")).split(","));
QString(tr("Name of the Viewmode, ; seperated list of toolboxes visible in this viewmode")).split(","));
emit setSlotDescription("addViewModeToolbars(QString,QString)", tr("Set toolbars for a viewmode"),
QString(tr("Name,Toolbar List")).split(","),
QString(tr("Name of the Viewmode, ; seperated list of toolbars visible in this viewmode")).split(","));
emit setSlotDescription("objectList(QString,QStringList)", tr("Returns object list"),
QString(tr("Selection type,Object types")).split(","),
......
......@@ -402,12 +402,19 @@ public slots:
//===========================================================================
public slots:
/** \brief Scripting function to add a nev viewMode
/** \brief Scripting function to set toolboxes in a view mode
@param _modeName Name of the new View Mode
@param _modeName Name of the View Mode
@param _toolboxList ; seperated list of toolboxes in the view mode
*/
void addViewMode(QString _modeName, QString _toolboxList);
void addViewModeToolboxes(QString _modeName, QString _toolboxList);
/** \brief Scripting function to set toolbars in a view mode
@param _modeName Name of the View Mode
@param _toolboxList ; seperated list of toolbars in the view mode
*/
void addViewModeToolbars(QString _modeName, QString _toolbarList);
/** @} */
......
......@@ -77,6 +77,8 @@ void Core::readApplicationOptions(INIFile& _ini) {
// Parse standard options
if ( _ini.section_exists("Options") ) {
// TODO: Load View Mode Toolbars and Context Menu Items
// load ViewModes
int viewModeCount;
if (_ini.get_entry(viewModeCount,"Options","ViewModeCount") )
......@@ -483,6 +485,7 @@ void Core::writeApplicationOptions(INIFile& _ini) {
_ini.add_entry( "Options" , key , type );
}
// TODO: Save View Mode Toolbars and Context Menu Items
// save ViewModes
QVector< QString > entries;
if ( OpenFlipper::Options::gui() )
......
......@@ -130,7 +130,7 @@ void Core::setViewMode(QString _viewMode){
//-----------------------------------------------------------------------------
void Core::addViewMode(QString _modeName, QString _toolboxList) {
void Core::addViewModeToolboxes(QString _modeName, QString _toolboxList) {
QStringList list = _toolboxList.split(";");
coreWidget_->slotAddViewModeToolboxes(_modeName,list);
......@@ -138,6 +138,14 @@ void Core::addViewMode(QString _modeName, QString _toolboxList) {
//-----------------------------------------------------------------------------
void Core::addViewModeToolbars(QString _modeName, QString _toolbarList) {
QStringList list = _toolbarList.split(";");
coreWidget_->slotAddViewModeToolbars(_modeName,list);
}
//-----------------------------------------------------------------------------
void Core::addToolbox(QString _name ,QWidget* _widget) {
int id = -1;
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment