More skeleton code
This commit is contained in:
		
					parent
					
						
							
								aa5588d286
							
						
					
				
			
			
				commit
				
					
						ed73064ef9
					
				
			
		
					 1 changed files with 13 additions and 15 deletions
				
			
		| 
						 | 
					@ -71,40 +71,38 @@ namespace Danbooru {
 | 
				
			||||||
        i18n("Connect..."),
 | 
					        i18n("Connect..."),
 | 
				
			||||||
        this);
 | 
					        this);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    KAction* fetch = new KAction(KIcon(QLatin1String("download")),
 | 
					    KAction* fetchAction = new KAction(KIcon(QLatin1String("download")),
 | 
				
			||||||
                                 i18n("Download"), this);
 | 
					                                 i18n("Download"), this);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    connectAction->setShortcut(KStandardShortcut::open());
 | 
					    connectAction->setShortcut(KStandardShortcut::open());
 | 
				
			||||||
    fetch->setShortcut(KStandardShortcut::find());
 | 
					    fetchAction->setShortcut(KStandardShortcut::find());
 | 
				
			||||||
    fetch->setEnabled(false);
 | 
					    fetchAction->setEnabled(false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    actionCollection()->addAction(QLatin1String("connect"), connectAction);
 | 
					    actionCollection()->addAction(QLatin1String("connect"), connectAction);
 | 
				
			||||||
    actionCollection()->addAction(QLatin1String("fetch"), fetch);
 | 
					    actionCollection()->addAction(QLatin1String("fetch"), fetchAction);
 | 
				
			||||||
    // actionCollection()->removeAction(actionCollection()->action("help_contents"));
 | 
					    // actionCollection()->removeAction(actionCollection()->action("help_contents"));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    //     KStandardAction::openNew(this, SLOT(fileNew()), actionCollection());
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    KStandardAction::quit(qApp, SLOT(close()), actionCollection());
 | 
					    KStandardAction::quit(qApp, SLOT(close()), actionCollection());
 | 
				
			||||||
    connect(connectAction, SIGNAL(triggered(bool)), this, SLOT(connectToBoard()));
 | 
					    connect(connectAction, SIGNAL(triggered(bool)), this,
 | 
				
			||||||
 | 
					            SLOT(connectToBoard()));
 | 
				
			||||||
    connect(fetch, SIGNAL(triggered(bool)), this, SLOT(downloadPosts()));
 | 
					    connect(fetch, SIGNAL(triggered(bool)), this, SLOT(downloadPosts()));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    //
 | 
					 | 
				
			||||||
    //     KStandardAction::preferences(this, SLOT(optionsPreferences()), actionCollection());
 | 
					 | 
				
			||||||
    //
 | 
					 | 
				
			||||||
    //     // custom menu and menu item - the slot is in the class DanbooruMainWindowView
 | 
					 | 
				
			||||||
    //     KAction *custom = new KAction(KIcon("colorize"), i18n("Swi&tch Colors"), this);
 | 
					 | 
				
			||||||
    //     actionCollection()->addAction( QLatin1String("switch_action"), custom );
 | 
					 | 
				
			||||||
    //     connect(custom, SIGNAL(triggered(bool)), m_view, SLOT(switchColors()));
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    void DanbooruMainWindow::connectToBoard()
 | 
					    void DanbooruMainWindow::connectToBoard()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if (!m_view) {
 | 
				
			||||||
 | 
					            return;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    void DanbooruMainWindow::downloadPosts()
 | 
					    void DanbooruMainWindow::downloadPosts()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
					        if (!m_service) {
 | 
				
			||||||
 | 
					            return;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    void DanbooruMainWindow::optionsPreferences()
 | 
					    void DanbooruMainWindow::optionsPreferences()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue