Add basic code to associate shortcuts with profiles and load/save those shortcut/profile pairs. Move Profile class into its own source file. Move old TODO list into the 'old' directory.

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=664308
This commit is contained in:
Robert Knight
2007-05-13 16:38:59 +00:00
parent ecdb2781d0
commit c5ab0f3cec
14 changed files with 971 additions and 802 deletions

View File

@@ -58,20 +58,14 @@ MainWindow::MainWindow()
_bookmarkHandler(0),
_pluggedController(0)
{
// add a small amount of space between the top of the window and the main widget
// to prevent the menu bar and main widget borders touching (which looks very ugly) in styles
// where the menu bar has a lower border
//setContentsMargins(0,2,0,0);
// create actions for menus
// the directory ('konsole') is included in the path here so that the XML
// file can be found when this code is being used in the Konsole part.
setXMLFile("konsole/konsoleui.rc");
setupActions();
// create view manager
// the directory ('konsole') is included in the path here so that the XML
// file can be found when this code is being used in the Konsole part.
//setXMLFile("konsole/konsoleui.rc");
_viewManager = new ViewManager(this,actionCollection());
_viewManager = new ViewManager(this,actionCollection());
connect( _viewManager , SIGNAL(empty()) , this , SLOT(close()) );
connect( _viewManager , SIGNAL(activeViewChanged(SessionController*)) , this ,
SLOT(activeViewChanged(SessionController*)) );
@@ -256,27 +250,6 @@ void MainWindow::showRemoteConnectionDialog()
emit requestSession(dialog.sessionKey(),_viewManager);
}
void MainWindow::mergeWindows()
{
// merges all of the open Konsole windows into this window
// by merging the view manager associated with the other Konsole windows
// into this window's view manager
QListIterator<QWidget*> topLevelIter( QApplication::topLevelWidgets() );
while (topLevelIter.hasNext())
{
QWidget* w = topLevelIter.next();
qDebug() << "Top level widget: " << w->metaObject()->className();
MainWindow* window = qobject_cast<MainWindow*>(w);
if ( window && window != this )
{
_viewManager->merge( window->_viewManager );
//window->close();
}
}
}
void MainWindow::setupWidgets()
{
QWidget* widget = new QWidget(this);