kacleditwidget.h
00001 /*************************************************************************** 00002 * Copyright (C) 2005 by Sean Harmer <sh@rama.homelinux.org> * 00003 * Till Adam <adam@kde.org> * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU Library General Public License as * 00007 * published by the Free Software Foundation; either version 2 of the * 00008 * License, or (at your option) any later version. * 00009 * * 00010 * This program is distributed in the hope that it will be useful, * 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00013 * GNU General Public License for more details. * 00014 * * 00015 * You should have received a copy of the GNU General Public License * 00016 * along with this program; if not, write to the * 00017 * Free Software Foundation, Inc., * 00018 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * 00019 ***************************************************************************/ 00020 #ifndef KACLEDITWIDGET_H 00021 #define KACLEDITWIDGET_H 00022 00023 #ifdef HAVE_CONFIG_H 00024 #include <config.h> 00025 #endif 00026 00027 #ifdef Q_MOC_RUN 00028 #define USE_POSIX_ACL 00029 #endif // Q_MOC_RUN 00030 00031 #ifdef USE_POSIX_ACL 00032 00033 #include <klistview.h> 00034 #include <kacl.h> 00035 #include <kfileitem.h> 00036 00037 class KACLListViewItem; 00038 class KACLListView; 00039 class TQPushButton; 00040 00041 class KACLEditWidget : TQWidget 00042 { 00043 Q_OBJECT 00044 TQ_OBJECT 00045 public: 00046 KACLEditWidget( TQWidget *parent = 0, const char *name = 0 ); 00047 KACL getACL() const; 00048 KACL getDefaultACL() const; 00049 void setACL( const KACL & ); 00050 void setDefaultACL( const KACL & ); 00051 void setAllowDefaults( bool value ); 00052 void setReadOnly( bool value ); 00053 private slots: 00054 void slotUpdateButtons(); 00055 00056 private: 00057 KACLListView* m_listView; 00058 TQPushButton *m_AddBtn; 00059 TQPushButton *m_EditBtn; 00060 TQPushButton *m_DelBtn; 00061 }; 00062 00063 00064 #endif 00065 #endif