Configuration for blacklists
This commit is contained in:
		
					parent
					
						
							
								98577bbcb8
							
						
					
				
			
			
				commit
				
					
						64021c47e9
					
				
			
		
					 3 changed files with 125 additions and 0 deletions
				
			
		
							
								
								
									
										38
									
								
								src/blacklistpage.cpp
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								src/blacklistpage.cpp
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,38 @@
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * Copyright 2015 Luca Beltrame <lbeltrame@kde.org>
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * This file is part of Danbooru Client.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Danbooru Client 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.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Danbooru Client 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 Danbooru Client. If not, see <http://www.gnu.org/licenses/>.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "blacklistpage.h"
 | 
				
			||||||
 | 
					#include "danboorusettings.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace Danbooru {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					BlacklistPage::BlacklistPage(DanbooruSettings *preferences, QWidget *parent): QWidget(parent)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    setupUi(this);
 | 
				
			||||||
 | 
					    kcfg_TagBlacklist->insertStringList(preferences->boards());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					BlacklistPage::~BlacklistPage()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					} // namespace Danbooru
 | 
				
			||||||
							
								
								
									
										43
									
								
								src/blacklistpage.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								src/blacklistpage.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,43 @@
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * Copyright 2015 Luca Beltrame <lbeltrame@kde.org>
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * This file is part of Danbooru Client.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Danbooru Client 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.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * Danbooru Client 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 Danbooru Client. If not, see <http://www.gnu.org/licenses/>.
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifndef DANBOORU_BLACKLISTPAGE_H
 | 
				
			||||||
 | 
					#define DANBOORU_BLACKLISTPAGE_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "ui_blacklistpage.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace Danbooru {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class DanbooruSettings;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class BlacklistPage: public QWidget, public Ui::BlacklistPage {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    Q_OBJECT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public:
 | 
				
			||||||
 | 
					    explicit BlacklistPage(DanbooruSettings *preferences, QWidget* parent=0);
 | 
				
			||||||
 | 
					    ~BlacklistPage();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					} // namespace Danbooru
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
							
								
								
									
										44
									
								
								src/ui/blacklistpage.ui
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								src/ui/blacklistpage.ui
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,44 @@
 | 
				
			||||||
 | 
					<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
 | 
					<ui version="4.0">
 | 
				
			||||||
 | 
					 <class>BlacklistPage</class>
 | 
				
			||||||
 | 
					 <widget class="QWidget" name="BlacklistPage">
 | 
				
			||||||
 | 
					  <property name="geometry">
 | 
				
			||||||
 | 
					   <rect>
 | 
				
			||||||
 | 
					    <x>0</x>
 | 
				
			||||||
 | 
					    <y>0</y>
 | 
				
			||||||
 | 
					    <width>400</width>
 | 
				
			||||||
 | 
					    <height>318</height>
 | 
				
			||||||
 | 
					   </rect>
 | 
				
			||||||
 | 
					  </property>
 | 
				
			||||||
 | 
					  <property name="windowTitle">
 | 
				
			||||||
 | 
					   <string>Form</string>
 | 
				
			||||||
 | 
					  </property>
 | 
				
			||||||
 | 
					  <layout class="QGridLayout" name="gridLayout_3">
 | 
				
			||||||
 | 
					   <item row="0" column="0">
 | 
				
			||||||
 | 
					    <widget class="QGroupBox" name="blacklistGroupBox">
 | 
				
			||||||
 | 
					     <property name="title">
 | 
				
			||||||
 | 
					      <string>Blacklisted tags</string>
 | 
				
			||||||
 | 
					     </property>
 | 
				
			||||||
 | 
					     <layout class="QGridLayout" name="gridLayout_2">
 | 
				
			||||||
 | 
					      <item row="0" column="0">
 | 
				
			||||||
 | 
					       <widget class="KEditListWidget" name="kcfg_TagBlacklist">
 | 
				
			||||||
 | 
					        <property name="buttons">
 | 
				
			||||||
 | 
					         <set>KEditListWidget::Add|KEditListWidget::Remove</set>
 | 
				
			||||||
 | 
					        </property>
 | 
				
			||||||
 | 
					       </widget>
 | 
				
			||||||
 | 
					      </item>
 | 
				
			||||||
 | 
					     </layout>
 | 
				
			||||||
 | 
					    </widget>
 | 
				
			||||||
 | 
					   </item>
 | 
				
			||||||
 | 
					  </layout>
 | 
				
			||||||
 | 
					 </widget>
 | 
				
			||||||
 | 
					 <customwidgets>
 | 
				
			||||||
 | 
					  <customwidget>
 | 
				
			||||||
 | 
					   <class>KEditListWidget</class>
 | 
				
			||||||
 | 
					   <extends>QWidget</extends>
 | 
				
			||||||
 | 
					   <header>keditlistwidget.h</header>
 | 
				
			||||||
 | 
					  </customwidget>
 | 
				
			||||||
 | 
					 </customwidgets>
 | 
				
			||||||
 | 
					 <resources/>
 | 
				
			||||||
 | 
					 <connections/>
 | 
				
			||||||
 | 
					</ui>
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue