Commit 18173cce authored by Jan Möbius's avatar Jan Möbius
Browse files

Scrollarea for dockwidgets

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@4924 383ad7c9-94d9-4d36-a494-682f7c89f535
parent b9b11703
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
#include <QToolBox> #include <QToolBox>
#include <QMessageBox> #include <QMessageBox>
#include <QApplication> #include <QApplication>
#include <QScrollArea>
#include <QPluginLoader> #include <QPluginLoader>
#include "OpenFlipper/BasePlugin/BaseInterface.hh" #include "OpenFlipper/BasePlugin/BaseInterface.hh"
...@@ -138,7 +139,7 @@ void Core::loadPlugins() ...@@ -138,7 +139,7 @@ void Core::loadPlugins()
#else #else
filters << "*.so"; filters << "*.so";
#endif #endif
// Get all files in the Plugin dir // Get all files in the Plugin dir
QStringList pluginlist = tempDir.entryList(filters,QDir::Files); QStringList pluginlist = tempDir.entryList(filters,QDir::Files);
...@@ -577,13 +578,12 @@ void Core::loadPlugin(QString filename, bool silent){ ...@@ -577,13 +578,12 @@ void Core::loadPlugin(QString filename, bool silent){
if ( toolboxPlugin->initializeToolbox( widget ) ) { if ( toolboxPlugin->initializeToolbox( widget ) ) {
QDockWidget* dock = new QDockWidget(info.name , coreWidget_ ); QDockWidget* dock = new QDockWidget(info.name , coreWidget_ );
dock->setWidget(widget); QScrollArea* scrollArea = new QScrollArea(dock);
widget->setParent(dock); scrollArea->setWidget(widget);
widget->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Minimum); scrollArea->setWidgetResizable(true);
widget->setMinimumWidth(300);
widget->setMaximumWidth(600);
dock->setWidget(scrollArea);
dock->setMaximumWidth(400);
int newNumber = toolboxindex_; int newNumber = toolboxindex_;
toolboxindex_++; toolboxindex_++;
...@@ -593,11 +593,9 @@ void Core::loadPlugin(QString filename, bool silent){ ...@@ -593,11 +593,9 @@ void Core::loadPlugin(QString filename, bool silent){
coreWidget_->setDockOptions(QMainWindow::AllowTabbedDocks | QMainWindow::VerticalTabs); coreWidget_->setDockOptions(QMainWindow::AllowTabbedDocks | QMainWindow::VerticalTabs);
coreWidget_->addDockWidget(Qt::RightDockWidgetArea,dock); coreWidget_->addDockWidget(Qt::RightDockWidgetArea,dock);
dock->resize(300,widget->height() ); // dock->resize(300,widget->height() );
connect(dock, SIGNAL( visibilityChanged (bool) ), coreWidget_ , SLOT( slotVisibilityChanged(bool) )); connect(dock, SIGNAL( visibilityChanged (bool) ), coreWidget_ , SLOT( slotVisibilityChanged(bool) ));
widget->show();
info.widget = dock; info.widget = dock;
// add widget name to viewMode 'all' // add widget name to viewMode 'all'
......
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