File indexing completed on 2024-12-01 04:01:55
0001 /*************************************************************************** 0002 arealistview.cpp - description 0003 ------------------- 0004 begin : Weg Feb 26 2003 0005 copyright : (C) 2003 by Jan Schäfer 0006 email : janschaefer@users.sourceforge.net 0007 ***************************************************************************/ 0008 0009 /*************************************************************************** 0010 * * 0011 * This program is free software; you can redistribute it and/or modify * 0012 * it under the terms of the GNU General Public License as published by * 0013 * the Free Software Foundation; either version 2 of the License, or * 0014 * (at your option) any later version. * 0015 * * 0016 ***************************************************************************/ 0017 0018 #include "arealistview.h" 0019 0020 // Qt 0021 #include <QPushButton> 0022 #include <QToolTip> 0023 #include <QTreeWidget> 0024 #include <QVBoxLayout> 0025 0026 // KDE Frameworks 0027 #include <KLocalizedString> 0028 0029 // local 0030 #include "kimearea.h" 0031 0032 0033 AreaListView::AreaListView(QWidget *parent) 0034 : QWidget(parent) 0035 { 0036 QVBoxLayout *mainLayout = new QVBoxLayout(this); 0037 mainLayout->setSpacing(0); 0038 mainLayout->setContentsMargins(0, 0, 0, 0); 0039 0040 listView = new QTreeWidget(this); 0041 listView->setColumnCount(2); 0042 listView->setHeaderLabels(QStringList() 0043 << i18n("Areas") 0044 << i18n("Preview")); 0045 listView->setRootIsDecorated(false); 0046 listView->setSelectionMode(QAbstractItemView::ExtendedSelection); 0047 listView->setSortingEnabled(false); 0048 // FIXME: 0049 //listView->setFullWidth(true); 0050 /*listView->setWhatsThis( i18n("<h3>Area List</h3>The area list shows you all areas of the map.<br>" 0051 "The left column shows the link associated with the area; the right " 0052 "column shows the part of the image that is covered by the area.<br>" 0053 "The maximum size of the preview images can be configured.")); 0054 */ 0055 //listView->setToolTip( i18n("A list of all areas")); 0056 mainLayout->addWidget(listView); 0057 0058 QHBoxLayout *buttonsLayout = new QHBoxLayout; 0059 upBtn = new QPushButton; 0060 upBtn->setIcon(QIcon::fromTheme("go-up")); 0061 buttonsLayout->addWidget(upBtn); 0062 0063 downBtn = new QPushButton; 0064 downBtn->setIcon(QIcon::fromTheme("go-down")); 0065 buttonsLayout->addWidget(downBtn); 0066 0067 mainLayout->addLayout(buttonsLayout); 0068 0069 } 0070 0071 0072 AreaListView::~AreaListView() 0073 { 0074 }