1 | /****************************************************************************** |
---|
2 | * $Id: InfoWindowController.h 9156 2009-09-21 12:55:04Z livings124 $ |
---|
3 | * |
---|
4 | * Copyright (c) 2006-2009 Transmission authors and contributors |
---|
5 | * |
---|
6 | * Permission is hereby granted, free of charge, to any person obtaining a |
---|
7 | * copy of this software and associated documentation files (the "Software"), |
---|
8 | * to deal in the Software without restriction, including without limitation |
---|
9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
---|
10 | * and/or sell copies of the Software, and to permit persons to whom the |
---|
11 | * Software is furnished to do so, subject to the following conditions: |
---|
12 | * |
---|
13 | * The above copyright notice and this permission notice shall be included in |
---|
14 | * all copies or substantial portions of the Software. |
---|
15 | * |
---|
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
---|
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
---|
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
---|
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
---|
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
---|
21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
---|
22 | * DEALINGS IN THE SOFTWARE. |
---|
23 | *****************************************************************************/ |
---|
24 | |
---|
25 | #import <Cocoa/Cocoa.h> |
---|
26 | #import <transmission.h> |
---|
27 | #import <Quartz/Quartz.h> |
---|
28 | |
---|
29 | @class Torrent; |
---|
30 | @class TrackerTableView; |
---|
31 | @class FileOutlineController; |
---|
32 | @class PiecesView; |
---|
33 | |
---|
34 | @interface InfoWindowController : NSWindowController <QLPreviewPanelDataSource, QLPreviewPanelDelegate> |
---|
35 | { |
---|
36 | NSArray * fTorrents; |
---|
37 | NSMutableArray * fTrackers; |
---|
38 | |
---|
39 | IBOutlet NSView * fInfoView, * fActivityView, * fTrackerView, * fPeersView, * fFilesView, * fOptionsView; |
---|
40 | NSInteger fCurrentTabTag; |
---|
41 | IBOutlet NSMatrix * fTabMatrix; |
---|
42 | |
---|
43 | IBOutlet NSImageView * fImageView; |
---|
44 | IBOutlet NSTextField * fNameField, * fBasicInfoField; |
---|
45 | |
---|
46 | IBOutlet NSTextField * fTrackerField, * fPiecesField, * fHashField, * fSecureField, |
---|
47 | * fDataLocationField, |
---|
48 | * fDateAddedField, * fDateCompletedField, * fDateActivityField, |
---|
49 | * fCreatorField, * fDateCreatedField, |
---|
50 | * fStateField, * fProgressField, |
---|
51 | * fHaveField, * fDownloadedTotalField, * fUploadedTotalField, * fFailedHashField, |
---|
52 | * fRatioField, * fSwarmSpeedField; |
---|
53 | IBOutlet NSTextView * fCommentView; |
---|
54 | IBOutlet NSButton * fRevealDataButton; |
---|
55 | |
---|
56 | IBOutlet TrackerTableView * fTrackerTable; |
---|
57 | IBOutlet NSSegmentedControl * fTrackerAddRemoveControl; |
---|
58 | IBOutlet NSTextField * fAnnounceAddressField, * fAnnounceLastField, * fAnnounceResponseField, * fAnnounceNextField, |
---|
59 | * fScrapeAddressField, * fScrapeLastField, * fScrapeResponseField, * fScrapeNextField; |
---|
60 | |
---|
61 | NSArray * fPeers, * fWebSeeds; |
---|
62 | IBOutlet NSTableView * fPeerTable, * fWebSeedTable; |
---|
63 | IBOutlet NSTextField * fConnectedPeersField, * fDownloadingFromField, * fUploadingToField, * fKnownField, |
---|
64 | * fSeedersField, * fLeechersField, * fCompletedFromTrackerField; |
---|
65 | IBOutlet NSTextView * fErrorMessageView; |
---|
66 | IBOutlet PiecesView * fPiecesView; |
---|
67 | IBOutlet NSSegmentedControl * fPiecesControl; |
---|
68 | CGFloat fWebSeedTableHeight, fSpaceBetweenWebSeedAndPeer; |
---|
69 | NSViewAnimation * fWebSeedTableAnimation; |
---|
70 | |
---|
71 | IBOutlet FileOutlineController * fFileController; |
---|
72 | IBOutlet NSSearchField * fFileFilterField; |
---|
73 | |
---|
74 | IBOutlet NSPopUpButton * fPriorityPopUp, * fRatioPopUp; |
---|
75 | IBOutlet NSButton * fUploadLimitCheck, * fDownloadLimitCheck, * fGlobalLimitCheck; |
---|
76 | IBOutlet NSTextField * fUploadLimitField, * fDownloadLimitField, * fRatioLimitField, |
---|
77 | * fUploadLimitLabel, * fDownloadLimitLabel, * fPeersConnectLabel, |
---|
78 | * fPeersConnectField; |
---|
79 | |
---|
80 | NSCache * fTrackerIconCache; |
---|
81 | NSMutableSet * fTrackerIconLoading; |
---|
82 | |
---|
83 | NSString * fInitialString; |
---|
84 | |
---|
85 | QLPreviewPanel * fPreviewPanel; |
---|
86 | } |
---|
87 | |
---|
88 | - (void) setInfoForTorrents: (NSArray *) torrents; |
---|
89 | - (void) updateInfoStats; |
---|
90 | - (void) updateOptions; |
---|
91 | |
---|
92 | - (void) setTab: (id) sender; |
---|
93 | |
---|
94 | - (void) setNextTab; |
---|
95 | - (void) setPreviousTab; |
---|
96 | |
---|
97 | - (void) addRemoveTracker: (id) sender; |
---|
98 | |
---|
99 | - (void) setPiecesView: (id) sender; |
---|
100 | - (void) setPiecesViewForAvailable: (BOOL) available; |
---|
101 | |
---|
102 | - (void) revealDataFile: (id) sender; |
---|
103 | |
---|
104 | - (void) setFileFilterText: (id) sender; |
---|
105 | |
---|
106 | - (void) setUseSpeedLimit: (id) sender; |
---|
107 | - (void) setSpeedLimit: (id) sender; |
---|
108 | - (void) setUseGlobalSpeedLimit: (id) sender; |
---|
109 | |
---|
110 | - (void) setRatioSetting: (id) sender; |
---|
111 | - (void) setRatioLimit: (id) sender; |
---|
112 | |
---|
113 | - (void) setPriority: (id) sender; |
---|
114 | |
---|
115 | - (void) setPeersConnectLimit: (id) sender; |
---|
116 | |
---|
117 | @end |
---|