[go: up one dir, main page]

File: tobackuptool.cpp

package info (click to toggle)
tora 1.3.23-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 15,984 kB
  • ctags: 14,460
  • sloc: cpp: 123,554; sh: 16,181; makefile: 966; xml: 69
file content (42 lines) | stat: -rw-r--r-- 1,033 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include "tobackuptool.h"

#include "icons/tobackup.xpm"
#include "tobackup.h"

const char** toBackupTool::pictureXPM(void)
    {
        return const_cast<const char**>(tobackup_xpm);
    }

toBackupTool::toBackupTool() : toTool(240, "Backup Manager")
{ }
    
const char* toBackupTool::menuItem()
    {
        return "Backup Manager";
    }
    
QWidget* toBackupTool::toolWindow(QWidget *parent, toConnection &connection)
    {
        std::map<toConnection *, QWidget *>::iterator i = Windows.find(&connection);
        if (i != Windows.end())
        {
            (*i).second->setFocus();
            return NULL;
        }
        else
        {
            QWidget *window = new toBackup(this, parent, connection);
            Windows[&connection] = window;
            return window;
        }
    }

    void toBackupTool::closeWindow(toConnection &connection)
    {
        std::map<toConnection *, QWidget *>::iterator i = Windows.find(&connection);
        if (i != Windows.end())
            Windows.erase(i);
    }