• R/O
  • SSH
  • HTTPS

xspfqt: Commit


Commit MetaInfo

Révision381 (tree)
l'heure2013-06-19 22:21:02
Auteurmasakih

Message de Log

一部機能をXspfQTMovieViewControllerに委譲

Change Summary

Modification

--- branches/divideMovieViewController/XspfQTMovieWindowController.h (revision 380)
+++ branches/divideMovieViewController/XspfQTMovieWindowController.h (revision 381)
@@ -69,7 +69,7 @@
6969 {
7070 IBOutlet NSView *qtView;
7171
72- XspfQTMovieViewController *movieViewController;
72+ XspfQTMovieViewController *_movieViewController;
7373 IBOutlet NSButton *playButton;
7474
7575 IBOutlet NSView *controllerView;
--- branches/divideMovieViewController/XspfQTMovieViewController.h (revision 380)
+++ branches/divideMovieViewController/XspfQTMovieViewController.h (revision 381)
@@ -8,6 +8,16 @@
88
99 #import <Cocoa/Cocoa.h>
1010
11+#import <QTKit/QTKit.h>
12+
1113 @interface XspfQTMovieViewController : NSViewController
1214
15+@property (readonly) QTMovieView *movieView;
16+
17+- (IBAction)play:(id)sender;
18+- (IBAction)pause:(id)sender;
19+
20+- (IBAction)gotoBeginning:(id)sender;
21+- (IBAction)gotoEnd:(id)sender;
22+
1323 @end
--- branches/divideMovieViewController/XspfQTMovieWindowController.m (revision 380)
+++ branches/divideMovieViewController/XspfQTMovieWindowController.m (revision 381)
@@ -80,6 +80,8 @@
8080 @property (readonly) XspfQTDocument *qtDocument;
8181 @property (readonly) XspfQTMovieWindow *qtWindow;
8282 @property (readonly) QTMovieView *movieView;
83+
84+@property (readonly) XspfQTMovieViewController *movieViewController;
8385 @end
8486
8587 @interface XspfQTMovieWindowController (Private)
@@ -120,6 +122,8 @@
120122 @synthesize qtMovie = _qtMovie;
121123 @synthesize fullScreenMode = _fullScreenMode;
122124
125+@synthesize movieViewController = _movieViewController;
126+
123127 #pragma mark ### Static variables ###
124128 static const float sVolumeDelta = 0.1;
125129 static const NSTimeInterval sUpdateTimeInterval = 0.5;
@@ -139,7 +143,7 @@
139143 NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
140144 [nc removeObserver:self];
141145
142- [movieViewController release];
146+ [_movieViewController release];
143147
144148 self.qtMovie = nil;
145149
@@ -151,9 +155,9 @@
151155 }
152156 - (void)awakeFromNib
153157 {
154- movieViewController = [[XspfQTMovieViewController alloc] init];
158+ _movieViewController = [[XspfQTMovieViewController alloc] init];
155159 NSView *contentView = [qtView superview];
156- NSView *movieView = [movieViewController view];
160+ NSView *movieView = [self.movieViewController view];
157161 [movieView setFrame:[qtView frame]];
158162 [contentView replaceSubview:qtView with:movieView];
159163 qtView = movieView;
@@ -274,7 +278,7 @@
274278
275279 - (QTMovieView *)movieView
276280 {
277- return [movieViewController view];
281+ return [self.movieViewController movieView];
278282 }
279283 #pragma mark ### Other functions ###
280284 // Area size without QTMovieView.
@@ -508,11 +512,11 @@
508512 }
509513 - (IBAction)gotoBeginning:(id)sender
510514 {
511- [qtView gotoBeginning:sender];
515+ [self.movieViewController gotoBeginning:sender];
512516 }
513517 - (IBAction)gotoEnd:(id)sender
514518 {
515- [qtView gotoEnd:sender];
519+ [self.movieViewController gotoEnd:sender];
516520 }
517521
518522 - (IBAction)turnUpVolume:(id)sender
@@ -573,12 +577,12 @@
573577 }
574578 - (IBAction)nextTrack:(id)sender
575579 {
576- [qtView pause:sender];
580+ [self.movieViewController pause:sender];
577581 [self.qtDocument.trackList next];
578582 }
579583 - (IBAction)previousTrack:(id)sender
580584 {
581- [qtView pause:sender];
585+ [self.movieViewController pause:sender];
582586 [self.qtDocument.trackList previous];
583587 }
584588 - (IBAction)gotoBeginningOrPreviousTrack:(id)sender
@@ -769,9 +773,9 @@
769773 #pragma mark ### NSWindow Delegate ###
770774 - (BOOL)windowShouldClose:(id)sender
771775 {
772- [qtView pause:self];
776+ [self.movieViewController pause:self];
773777 self.qtMovie = nil;
774- [qtView unbind:@"movie"];
778+ [self.movieView unbind:@"movie"];
775779
776780 return YES;
777781 }
--- branches/divideMovieViewController/XspfQTMovieViewController.m (revision 380)
+++ branches/divideMovieViewController/XspfQTMovieViewController.m (revision 381)
@@ -21,4 +21,26 @@
2121 return self;
2222 }
2323
24+
25+- (QTMovieView *)movieView
26+{
27+ return (QTMovieView *)[self view];
28+}
29+
30+- (IBAction)play:(id)sender
31+{
32+ [self.movieView play:sender];
33+}
34+- (IBAction)pause:(id)sender
35+{
36+ [self.movieView pause:sender];
37+}
38+- (IBAction)gotoBeginning:(id)sender
39+{
40+ [self.movieView gotoBeginning:sender];
41+}
42+- (IBAction)gotoEnd:(id)sender
43+{
44+ [self.movieView gotoEnd:sender];
45+}
2446 @end
Afficher sur ancien navigateur de dépôt.