From 5fcdd424d7bd798673b1b545f7f990aba65471a9 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Thu, 16 Oct 2014 00:26:02 +0000 Subject: removed old code git-svn-id: file:///var/local/svn/basicwriter@57 daaaf23c-2e50-4459-9457-1e69db5a47bf --- src/gui/components/UIPaneFrame.cpp | 113 ------------------------------------- 1 file changed, 113 deletions(-) delete mode 100644 src/gui/components/UIPaneFrame.cpp (limited to 'src/gui/components/UIPaneFrame.cpp') diff --git a/src/gui/components/UIPaneFrame.cpp b/src/gui/components/UIPaneFrame.cpp deleted file mode 100644 index 1192bad..0000000 --- a/src/gui/components/UIPaneFrame.cpp +++ /dev/null @@ -1,113 +0,0 @@ -/* - BasicWriter - Copyright (C) 2014 Benjamin Paaßen, Andreas Stöckel - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -static void setWidgetColor(QWidget *w, const QColor c) -{ - QPalette p(w->palette()); - p.setColor(QPalette::Background, c); - w->setAutoFillBackground(true); - w->setPalette(p); -} - -UIPaneFrame::UIPaneFrame(QWidget *parent) : - QWidget(parent) -{ - // Create the layout components - rootLayout = new QVBoxLayout; - topLayout = new QHBoxLayout; - centerLayout = new QVBoxLayout; - bottomLayout = new QHBoxLayout; - - // Assemble the top bar -// QToolButton *btn = new QToolButton; -// btn->setIcon(QIcon::fromTheme("user-home")); - - QLabel *lbl = new QLabel("Dies ist nur ein Test"); - lbl->setContentsMargins(10, 0, 10, 0); - - QToolButton *btn2 = new QToolButton; - btn2->setIcon(QIcon::fromTheme("edit-find")); - - QToolButton *btn3 = new QToolButton; - btn3->setIcon(QIcon::fromTheme("window-new")); - -// topLayout->addWidget(btn); - topLayout->addWidget(lbl); - topLayout->addWidget(btn2); - topLayout->addWidget(btn3); - - QTreeView *tree = new QTreeView; - QFileSystemModel *model = new QFileSystemModel; - model->setRootPath(QDir::currentPath()); - tree->setModel(model); - centerLayout->addWidget(tree); - - // Remove the spacing of the layout components - removeLayoutSpacing(rootLayout); - removeLayoutSpacing(topLayout); - removeLayoutSpacing(centerLayout); - removeLayoutSpacing(bottomLayout); - - // Create the widget containers - topContainer = new QWidget; - centerContainer = new QWidget; - bottomContainer = new QWidget; - - // Assign the layouts to the top and bottom part, add the components to the - // root layout - topContainer->setLayout(topLayout); - topContainer->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred); - - centerContainer->setLayout(centerLayout); - - bottomContainer->setLayout(bottomLayout); - topContainer->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred); - - rootLayout->addWidget(topContainer, 0); - rootLayout->addWidget(centerContainer, 1); - rootLayout->addWidget(bottomContainer, 0); - - this->setLayout(rootLayout); -} - -UIPaneFrame::~UIPaneFrame() -{ - -} - -void UIPaneFrame::removeLayoutSpacing(QBoxLayout *layout) -{ - layout->setContentsMargins(0, 0, 0, 0); - layout->setSpacing(0); -} - -- cgit v1.2.3