You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
1.9 KiB
71 lines
1.9 KiB
15 years ago
|
/*
|
||
|
* This file is part of the KDE libraries
|
||
13 years ago
|
* Copyright (c) 2001 Michael Goffioul <tdeprint@swing.be>
|
||
15 years ago
|
*
|
||
|
* This library is free software; you can redistribute it and/or
|
||
|
* modify it under the terms of the GNU Library General Public
|
||
|
* License version 2 as published by the Free Software Foundation.
|
||
|
*
|
||
|
* This library 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
|
||
|
* Library General Public License for more details.
|
||
|
*
|
||
|
* You should have received a copy of the GNU Library General Public License
|
||
|
* along with this library; see the file COPYING.LIB. If not, write to
|
||
|
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||
|
* Boston, MA 02110-1301, USA.
|
||
|
**/
|
||
|
|
||
|
#include "kmpropmembers.h"
|
||
|
#include "kmprinter.h"
|
||
|
#include "kmwizard.h"
|
||
|
|
||
14 years ago
|
#include <tqtextview.h>
|
||
|
#include <tqlayout.h>
|
||
15 years ago
|
#include <klocale.h>
|
||
|
|
||
14 years ago
|
KMPropMembers::KMPropMembers(TQWidget *parent, const char *name)
|
||
15 years ago
|
: KMPropWidget(parent,name)
|
||
|
{
|
||
14 years ago
|
m_members = new TQTextView(this);
|
||
14 years ago
|
m_members->setPaper(tqcolorGroup().background());
|
||
14 years ago
|
m_members->setFrameStyle(TQFrame::NoFrame);
|
||
15 years ago
|
|
||
14 years ago
|
TQVBoxLayout *main_ = new TQVBoxLayout(this, 10, 0);
|
||
15 years ago
|
main_->addWidget(m_members);
|
||
|
|
||
13 years ago
|
m_pixmap = "tdeprint_printer_class";
|
||
15 years ago
|
m_title = i18n("Members");
|
||
|
m_header = i18n("Class Members");
|
||
|
}
|
||
|
|
||
|
KMPropMembers::~KMPropMembers()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
void KMPropMembers::setPrinter(KMPrinter *p)
|
||
|
{
|
||
|
if (p && ((p->isClass(false) && p->isLocal()) || p->isImplicit()))
|
||
|
{
|
||
14 years ago
|
TQStringList l = p->members();
|
||
|
TQString txt("<ul>");
|
||
14 years ago
|
for (TQStringList::ConstIterator it=l.begin(); it!=l.end(); ++it)
|
||
15 years ago
|
txt.append("<li>" + (*it) + "</li>");
|
||
|
txt.append("</ul>");
|
||
|
m_members->setText(txt);
|
||
|
emit enable(true);
|
||
|
emit enableChange(!p->isImplicit());
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
emit enable(false);
|
||
|
m_members->setText("");
|
||
|
}
|
||
|
}
|
||
|
|
||
|
void KMPropMembers::configureWizard(KMWizard *w)
|
||
|
{
|
||
|
w->configure(KMWizard::Class,KMWizard::Class,true);
|
||
|
}
|